为了账号安全,请及时绑定邮箱和手机立即绑定

Receiver class com.mysql.jdbc.PreparedStatement does not define 连接数据库问题

报错如下:应该是跟老师教程上的代码一致,不知是否遗漏了什么步骤
WARNING: An illegal reflective access operation has occurred

WARNING: Illegal reflective access by org.apache.ibatis.reflection.Reflector (file:/C:/Users/Administrator/eclipse-workspace/MicorMessage/WebContent/WEB-INF/lib/mybatis-3.4.6.jar) to method java.lang.Class.checkPackageAccess(java.lang.SecurityManager,java.lang.ClassLoader,boolean)

WARNING: Please consider reporting this to the maintainers of org.apache.ibatis.reflection.Reflector

WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations

WARNING: All illegal access operations will be denied in a future release

Exception in thread "main" java.lang.AbstractMethodError: Receiver class com.mysql.jdbc.PreparedStatement does not define or inherit an implementation of the resolved method abstract isClosed()Z of interface java.sql.Statement.

at org.apache.ibatis.executor.BaseExecutor.closeStatement(BaseExecutor.java:285)

at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:65)

at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:326)

at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)

at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)

at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:83)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:136)

at com.imooc.dao.MessageDao.queryMessageList(MessageDao.java:25)

at com.imooc.dao.MessageDao.main(MessageDao.java:84)


正在回答

1 回答

是jar包的问题吗,可以再看看老师配置了哪些与MySQL相关的jar包

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

Receiver class com.mysql.jdbc.PreparedStatement does not define 连接数据库问题

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信