首页新闻找找看学习计划

使用p6spy时能插入数据,但控制台打印不出sql语句,报下面的错误

0
[待解决问题]

Cannot instantiate com.p6spy.engine.logging.appender.StdoutLogger, even on second attempt.
java.lang.ClassNotFoundException: com.p6spy.engine.logging.appender.StdoutLogger
 at java.net.URLClassLoader.findClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
 at java.lang.ClassLoader.loadClass(Unknown Source)
 at com.p6spy.engine.spy.option.P6OptionsRepository.parse(P6OptionsRepository.java:91)
 at com.p6spy.engine.spy.option.P6OptionsRepository.set(P6OptionsRepository.java:63)
 at com.p6spy.engine.spy.P6SpyOptions.setAppender(P6SpyOptions.java:328)
 at com.p6spy.engine.spy.P6SpyOptions.load(P6SpyOptions.java:95)
 at com.p6spy.engine.spy.P6ModuleManager.loadOptions(P6ModuleManager.java:181)
 at com.p6spy.engine.spy.P6ModuleManager.<init>(P6ModuleManager.java:126)
 at com.p6spy.engine.spy.P6ModuleManager.initMe(P6ModuleManager.java:73)
 at com.p6spy.engine.spy.P6ModuleManager.<clinit>(P6ModuleManager.java:61)
 at com.p6spy.engine.spy.P6Core.initialize(P6Core.java:54)
 at com.p6spy.engine.spy.P6SpyDriver.<init>(P6SpyDriver.java:61)
 at com.p6spy.engine.spy.P6SpyDriver.<clinit>(P6SpyDriver.java:40)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 at java.lang.reflect.Constructor.newInstance(Unknown Source)
 at java.lang.Class.newInstance(Unknown Source)
 at java.util.ServiceLoader$LazyIterator.nextService(Unknown Source)
 at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
 at java.util.ServiceLoader$1.next(Unknown Source)
 at java.sql.DriverManager$2.run(Unknown Source)
 at java.sql.DriverManager$2.run(Unknown Source)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.sql.DriverManager.loadInitialDrivers(Unknown Source)
 at java.sql.DriverManager.<clinit>(Unknown Source)
 at org.apache.ibatis.datasource.unpooled.UnpooledDataSource.<clinit>(UnpooledDataSource.java:53)
 at org.apache.ibatis.datasource.unpooled.UnpooledDataSourceFactory.<init>(UnpooledDataSourceFactory.java:38)
 at org.apache.ibatis.datasource.pooled.PooledDataSourceFactory.<init>(PooledDataSourceFactory.java:25)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
 at java.lang.reflect.Constructor.newInstance(Unknown Source)
 at java.lang.Class.newInstance(Unknown Source)
 at org.apache.ibatis.builder.xml.XMLConfigBuilder.dataSourceElement(XMLConfigBuilder.java:274)
 at org.apache.ibatis.builder.xml.XMLConfigBuilder.environmentsElement(XMLConfigBuilder.java:232)
 at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:104)
 at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:92)
 at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80)
 at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:66)
 at com.java1995.dao.impl.One2MenyDaoImpl.init(One2MenyDaoImpl.java:29)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 at java.lang.reflect.Method.invoke(Unknown Source)
 at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
 at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
 at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
 at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
 at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
 at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
 at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
 at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
 at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
 at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
 at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
 at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
User [id=null, username=aaa, password=838528296, orderList=null]
result=1
当前插入数据的主键为=22

JAVA_宇的主页 JAVA_宇 | 菜鸟二级 | 园豆:202
提问于:2018-03-22 10:22
< >
分享
所有回答(2)
0

这个类com.p6spy.engine.logging.appender.StdoutLogger 找不到,是否缺少相关的jar包

2012 | 园豆:18894 (专家六级) | 2018-03-24 16:25
0

MybatisPlus 低版本是没有这个包的,换一个最新的版本试试.

三目鸟 | 园豆:202 (菜鸟二级) | 2019-12-10 22:02
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册