NutzCN Logo
问答 单元测试一直卡住不动
发布于 3133天前 作者 CXW0504 6371 次浏览 复制 上一个帖子 下一个帖子
标签:
@Before
	public void before() throws Exception {
		IocBy iocBy = MainModule.class.getAnnotation(IocBy.class);
		IocLoader loader = new ComboIocLoader(iocBy.args());
		Ioc ioc = new NutIoc(loader);
 		dao = ioc.get(Dao.class);(一直卡在这里不动)
12 回复

看最后一句日志

@wendal
log4j:WARN No such property [maxBackupIndex] in org.apache.log4j.DailyRollingFileAppender.
log4j:WARN No such property [maxFileSize] in org.apache.log4j.DailyRollingFileAppender.

@cxw0504 log4j都没配好,要么删掉log4j,要么配好它,不能出log4j的警告

@cxw0504 一句日志都没有?log4j到底配了啥?全部写文件了?

@wendal

 2016-05-25  16:56:41,154  [org.nutz.ioc.loader.json.JsonLoader]-[DEBUG]Loaded 5 bean define from reader --
[txREPEATABLE_READ, txREAD_COMMITTED, txNONE, txSERIALIZABLE, txREAD_UNCOMMITTED]
  2016-05-25  16:56:41,157  [org.nutz.ioc.loader.combo.ComboIocLoader]-[WARN]Found Duplicate beanName=scheduler, pls check you config! loader=class com.hgd.task.quartz.QuartzIocLoader
  2016-05-25  16:56:41,157  [org.nutz.ioc.loader.combo.ComboIocLoader]-[WARN]Found Duplicate beanName=nutQuartzCronJobFactory, pls check you config! loader=class com.hgd.task.quartz.QuartzIocLoader
  2016-05-25  16:56:41,157  [org.nutz.ioc.loader.combo.ComboIocLoader]-[WARN]Found Duplicate beanName=jobFactory, pls check you config! loader=class com.hgd.task.quartz.QuartzIocLoader
  2016-05-25  16:56:41,168  [org.nutz.ioc.impl.NutIoc]-[INFO]NutIoc init begin ...
  2016-05-25  16:56:41,173  [org.nutz.ioc.impl.NutIoc]-[INFO]... NutIoc init complete
  2016-05-25  16:56:45,273  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'dao'<interface org.nutz.dao.Dao>
  2016-05-25  16:56:45,277  [org.nutz.ioc.aop.SimpleAopMaker]-[DEBUG]Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
  2016-05-25  16:56:45,279  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Load definition name=dao
  2016-05-25  16:56:45,281  [org.nutz.ioc.loader.map.MapLoader]-[DEBUG]Loading define for name=dao
  2016-05-25  16:56:45,290  [org.nutz.ioc.loader.combo.ComboIocLoader]-[DEBUG]Found IocObject(dao) in JsonLoader(paths=[ioc/])
  2016-05-25  16:56:45,290  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Make...'dao'<interface org.nutz.dao.Dao>
  2016-05-25  16:56:45,312  [org.nutz.ioc.aop.impl.DefaultMirrorFactory]-[DEBUG]Load class org.nutz.dao.impl.NutDao without AOP
  2016-05-25  16:56:45,314  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Save object 'dao' to [app] 
  2016-05-25  16:56:45,318  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'dataSource'<>
  2016-05-25  16:56:45,319  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Load definition name=dataSource
  2016-05-25  16:56:45,319  [org.nutz.ioc.loader.map.MapLoader]-[DEBUG]Loading define for name=dataSource
  2016-05-25  16:56:45,320  [org.nutz.ioc.loader.combo.ComboIocLoader]-[DEBUG]Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
  2016-05-25  16:56:45,320  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Make...'dataSource'<>
  2016-05-25  16:56:45,367  [org.nutz.ioc.aop.impl.DefaultMirrorFactory]-[DEBUG]Load class com.alibaba.druid.pool.DruidDataSource without AOP
  2016-05-25  16:56:45,368  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Save object 'dataSource' to [app] 
  2016-05-25  16:56:45,439  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  16:56:45,440  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Load definition name=conf
  2016-05-25  16:56:45,440  [org.nutz.ioc.loader.map.MapLoader]-[DEBUG]Loading define for name=conf
  2016-05-25  16:56:45,440  [org.nutz.ioc.loader.combo.ComboIocLoader]-[DEBUG]Found IocObject(conf) in JsonLoader(paths=[ioc/])
  2016-05-25  16:56:45,441  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Make...'conf'<>
  2016-05-25  16:56:45,442  [org.nutz.ioc.aop.impl.DefaultMirrorFactory]-[DEBUG]Load class org.nutz.ioc.impl.PropertiesProxy without AOP
  2016-05-25  16:56:45,442  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Save object 'conf' to [app] 
  2016-05-25  16:56:45,465  [org.nutz.resource.Scans]-[DEBUG]Found 3 resource by src( custom/ ) , regex( ^.+[.]properties$ )
  2016-05-25  16:56:45,476  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  16:56:45,477  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  16:56:45,478  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  16:56:45,479  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  16:56:45,662  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Remove object 'dataSource' from [app] 
  2016-05-25  16:56:45,663  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Remove object 'dao' from [app] 
  

报错信息没显示出来

@wendal

2016-05-25  17:04:02,289  [org.nutz.resource.impl.ErrorResourceLocation]-[INFO][loc=C:\Users\Administrator\.m2\repository\mysql\mysql-connector-java\6.0.2\mysql-connector-java-6.0.2.jar]not exist
  2016-05-25  17:04:02,946  [org.nutz.resource.Scans]-[DEBUG]Locations for Scans:
[JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\org\json\json\20090211\json-20090211.jar], JarResourceLocation [jarPath=C:\Program Files\Java\jdk1.7.0_80\lib\tools.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\jasper-el.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\com\alibaba\druid\1.0.18\druid-1.0.18.jar], JarResourceLocation [jarPath=E:\jar\slf4j-api-1.7.21.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-i18n-es.jar], FileSystemResourceLocation [root=E:\git\HGD\target\test-classes], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\ecj-4.5.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-websocket.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-api.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-jdbc.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\org\slf4j\slf4j-api\1.6.1\slf4j-api-1.6.1.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\com\squareup\okio\okio\1.6.0\okio-1.6.0.jar], FileSystemResourceLocation [root=D:\eclipse-committers-mars-2-win32-x86_64\eclipse\configuration\org.eclipse.osgi\225\0\.cp], JarResourceLocation [jarPath=E:\jar\commons-codec-1.6.jar], FileSystemResourceLocation [root=E:\git\HGD\target\classes], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\com\squareup\okhttp\okhttp\2.7.1\okhttp-2.7.1.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-dbcp.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\org\quartz-scheduler\quartz\2.1.1\quartz-2.1.1.jar], JarResourceLocation [jarPath=E:\jar\slf4j-log4j12-1.6.1.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-jni.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\annotations-api.jar], FileSystemResourceLocation [root=D:\eclipse-committers-mars-2-win32-x86_64\eclipse\configuration\org.eclipse.osgi\226\0\.cp], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\el-api.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\redis\clients\jedis\2.7.3\jedis-2.7.3.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-i18n-fr.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\catalina-ant.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-i18n-ja.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\catalina-storeconfig.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\com\qiniu\qiniu-java-sdk\7.0.9\qiniu-java-sdk-7.0.9.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\com\google\code\gson\gson\2.3.1\gson-2.3.1.jar], JarResourceLocation [jarPath=E:\jar\jaxen-1.1-beta-6.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\jasper.jar], JarResourceLocation [jarPath=E:\git\HGD\WebContent\WEB-INF\lib\mysql-connector-java-6.0.2-bin.jar], JarResourceLocation [jarPath=E:\jar\commons-httpclient-3.0.1.jar], JarResourceLocation [jarPath=E:\jar\commons-logging-1.1.1.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\org\nutz\nutz\1.r.56.r3\nutz-1.r.56.r3.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-util-scan.jar], JarResourceLocation [jarPath=C:\Program Files\Java\jdk1.7.0_80\lib\jconsole.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\catalina-tribes.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-coyote.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\org\zbus\zbus\6.2.7\zbus-6.2.7.jar], JarResourceLocation [jarPath=D:\eclipse-committers-mars-2-win32-x86_64\eclipse\plugins\org.hamcrest.core_1.3.0.v201303031735.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\catalina-ha.jar], FileSystemResourceLocation [root=E:\git\HGD], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\org\apache\commons\commons-pool2\2.3\commons-pool2-2.3.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\servlet-api.jar], JarResourceLocation [jarPath=C:\Users\Administrator\.m2\repository\c3p0\c3p0\0.9.1.1\c3p0-0.9.1.1.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\jsp-api.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\tomcat-util.jar], JarResourceLocation [jarPath=D:\eclipse-committers-mars-2-win32-x86_64\eclipse\plugins\org.junit_4.12.0.v201504281640\junit.jar], JarResourceLocation [jarPath=E:\jar\dom4j-1.6.1.jar], JarResourceLocation [jarPath=E:\jar\taobao-sdk-java-auto_1455552377940-20160314.jar], JarResourceLocation [jarPath=E:\jar\taobao-sdk-java-auto_1455552377940-20160314-source.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\websocket-api.jar], ErrorResourceLocation [loc=C:\Users\Administrator\.m2\repository\mysql\mysql-connector-java\6.0.2\mysql-connector-java-6.0.2.jar], JarResourceLocation [jarPath=D:\tomcat\apache-tomcat-8.0.33-windows-x64\apache-tomcat-8.0.33\lib\catalina.jar]]
  2016-05-25  17:04:02,992  [org.nutz.resource.Scans]-[DEBUG]Found 5 resource by src( ioc/ ) , regex( ^(.+[.])(js|json)$ )
  2016-05-25  17:04:02,993  [org.nutz.ioc.loader.json.JsonLoader]-[DEBUG]loading ioc js config from [dao.js]
  2016-05-25  17:04:03,003  [org.nutz.ioc.loader.json.JsonLoader]-[DEBUG]loading ioc js config from [qiniu.js]
  2016-05-25  17:04:03,004  [org.nutz.ioc.loader.json.JsonLoader]-[DEBUG]loading ioc js config from [quartz.js]
  2016-05-25  17:04:03,005  [org.nutz.ioc.loader.json.JsonLoader]-[DEBUG]loading ioc js config from [redis.js]
  2016-05-25  17:04:03,009  [org.nutz.ioc.loader.json.JsonLoader]-[DEBUG]loading ioc js config from [TaobaoClient.js]
  2016-05-25  17:04:03,010  [org.nutz.ioc.loader.json.JsonLoader]-[DEBUG]Loaded 10 bean define from path=[ioc/] --> [qiniu, dataSource,dao, conf, jedisPool]
  2016-05-25  17:04:03,136  [org.nutz.resource.Scans]-[DEBUG]Found 146 resource by src( com/hgd/ ) , regex( ^.+[.]class$ )
  2016-05-25  17:04:03,266  [org.nutz.ioc.loader.annotation.AnnotationIocLoader]-[DEBUG]Found : class com.yd.action.ActicleAction
  2016-05-25  17:04:03,711  [org.nutz.castor.Castors]-[DEBUG]Using 94 castor for Castors
  2016-05-25  17:04:03,717  [org.nutz.ioc.loader.annotation.AnnotationIocLoader]-[INFO]Found 47 classes in 1 base-packages!
beans = ["pService""acticle"]
  2016-05-25  17:04:03,719  [org.nutz.ioc.loader.json.JsonLoader]-[DEBUG]Loaded 5 bean define from reader --
[txREPEATABLE_READ, txREAD_COMMITTED, txNONE, txSERIALIZABLE, txREAD_UNCOMMITTED]
  2016-05-25  17:04:03,721  [org.nutz.ioc.loader.combo.ComboIocLoader]-[WARN]Found Duplicate beanName=scheduler, pls check you config! loader=class com.yd.task.quartz.QuartzIocLoader
  2016-05-25  17:04:03,722  [org.nutz.ioc.loader.combo.ComboIocLoader]-[WARN]Found Duplicate beanName=nutQuartzCronJobFactory, pls check you config! loader=class com.yd.task.quartz.QuartzIocLoader
  2016-05-25  17:04:03,722  [org.nutz.ioc.loader.combo.ComboIocLoader]-[WARN]Found Duplicate beanName=jobFactory, pls check you config! loader=class com.yd.task.quartz.QuartzIocLoader
  2016-05-25  17:04:03,732  [org.nutz.ioc.impl.NutIoc]-[INFO]NutIoc init begin ...
  2016-05-25  17:04:03,736  [org.nutz.ioc.impl.NutIoc]-[INFO]... NutIoc init complete
  2016-05-25  17:04:03,737  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'dao'<interface org.nutz.dao.Dao>
  2016-05-25  17:04:03,740  [org.nutz.ioc.aop.SimpleAopMaker]-[DEBUG]Load AopConfigure for anno=org.nutz.ioc.aop.Aop by type=org.nutz.ioc.aop.config.impl.AnnotationAopConfigration
  2016-05-25  17:04:03,741  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Load definition name=dao
  2016-05-25  17:04:03,743  [org.nutz.ioc.loader.map.MapLoader]-[DEBUG]Loading define for name=dao
  2016-05-25  17:04:03,748  [org.nutz.ioc.loader.combo.ComboIocLoader]-[DEBUG]Found IocObject(dao) in JsonLoader(paths=[ioc/])
  2016-05-25  17:04:03,749  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Make...'dao'<interface org.nutz.dao.Dao>
  2016-05-25  17:04:03,767  [org.nutz.ioc.aop.impl.DefaultMirrorFactory]-[DEBUG]Load class org.nutz.dao.impl.NutDao without AOP
  2016-05-25  17:04:03,768  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Save object 'dao' to [app] 
  2016-05-25  17:04:03,771  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'dataSource'<>
  2016-05-25  17:04:03,771  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Load definition name=dataSource
  2016-05-25  17:04:03,771  [org.nutz.ioc.loader.map.MapLoader]-[DEBUG]Loading define for name=dataSource
  2016-05-25  17:04:03,772  [org.nutz.ioc.loader.combo.ComboIocLoader]-[DEBUG]Found IocObject(dataSource) in JsonLoader(paths=[ioc/])
  2016-05-25  17:04:03,772  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Make...'dataSource'<>
  2016-05-25  17:04:03,807  [org.nutz.ioc.aop.impl.DefaultMirrorFactory]-[DEBUG]Load class com.alibaba.druid.pool.DruidDataSource without AOP
  2016-05-25  17:04:03,808  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Save object 'dataSource' to [app] 
  2016-05-25  17:04:03,860  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  17:04:03,860  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Load definition name=conf
  2016-05-25  17:04:03,860  [org.nutz.ioc.loader.map.MapLoader]-[DEBUG]Loading define for name=conf
  2016-05-25  17:04:03,861  [org.nutz.ioc.loader.combo.ComboIocLoader]-[DEBUG]Found IocObject(conf) in JsonLoader(paths=[ioc/])
  2016-05-25  17:04:03,861  [org.nutz.ioc.impl.NutIoc]-[DEBUG]	 >> Make...'conf'<>
  2016-05-25  17:04:03,862  [org.nutz.ioc.aop.impl.DefaultMirrorFactory]-[DEBUG]Load class org.nutz.ioc.impl.PropertiesProxy without AOP
  2016-05-25  17:04:03,863  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Save object 'conf' to [app] 
  2016-05-25  17:04:03,933  [org.nutz.resource.Scans]-[DEBUG]Found 3 resource by src( custom/ ) , regex( ^.+[.]properties$ )
  2016-05-25  17:04:03,941  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  17:04:03,942  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  17:04:03,943  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  17:04:03,944  [org.nutz.ioc.impl.NutIoc]-[DEBUG]Get 'conf'<>
  2016-05-25  17:04:04,096  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Remove object 'dataSource' from [app] 
  2016-05-25  17:04:04,097  [org.nutz.ioc.impl.ScopeContext]-[DEBUG]Remove object 'dao' from [app] 
  (全部日志)

org.nutz.ioc.IocException: [dao, dataSource] # FAIL to create Ioc Bean name=[dataSource]
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209)
at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:75)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:209)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:235)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:146)
at test.hgd.before(hgd.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
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)
Caused by: java.lang.RuntimeException: java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0
at org.nutz.lang.Lang.wrapThrow(Lang.java:153)
at org.nutz.lang.Lang.wrapThrow(Lang.java:152)
at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:21)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:72)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
... 30 more
Caused by: java.lang.UnsupportedClassVersionError: com/mysql/jdbc/Driver : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:535)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:648)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.nutz.ioc.trigger.MethodEventTrigger.trigger(MethodEventTrigger.java:18)
... 32 more

"mysql-connector-java 6.0.2" 这版本好高,好像还是测试版吧, 看来是需要JDK8的

添加回复
请先登陆
回到顶部