NutzCN Logo
问答 部署nutzwk3.3.x时报错
发布于 2924天前 作者 qq_4cb3f8b1 1561 次浏览 复制 上一个帖子 下一个帖子
标签: nutzwk
test_not_sql_group(org.nutz.dao.texp.CndTest)  Time elapsed: 0 sec  <<< ERROR!
org.nutz.ioc.IocException: [dao, dataSource, config] # FAIL to create Ioc Bean name=[config]
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:149)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.ioc.java.IocObjectNode.getValue(IocObjectNode.java:19)
	at org.nutz.ioc.java.ChainNode.eval(ChainNode.java:24)
	at org.nutz.ioc.java.ChainNode.eval(ChainNode.java:19)
	at org.nutz.ioc.val.JavaValue.get(JavaValue.java:69)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:31)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:135)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:210)
	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:210)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:239)
	at org.nutz.dao.test.DaoCase.setUp(DaoCase.java:22)
	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.RuntimeException: Fail to set '[nutz-test.properties]'[ [Ljava.lang.String;@14a2f921 ] by setter org.nutz.ioc.impl.PropertiesProxy.'setPaths()' because [java.lang.RuntimeException: folder or file like '^.+[.]properties$' no found in nutz-test.properties]: folder or file like '^.+[.]properties$' no found in nutz-test.properties
	at org.nutz.lang.Lang.makeThrow(Lang.java:132)
	at org.nutz.lang.inject.InjectBySetter.inject(InjectBySetter.java:44)
	at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
	at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:56)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:135)
	... 44 more

Running org.nutz.dao.util.DaoUpTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.001 sec <<< FAILURE!
org.nutz.dao.util.DaoUpTest  Time elapsed: 0 sec  <<< ERROR!
java.lang.NullPointerException
	at java.util.Properties$LineReader.readLine(Properties.java:434)
	at java.util.Properties.load0(Properties.java:353)
	at java.util.Properties.load(Properties.java:341)
	at org.nutz.dao.util.DaoUp.init(DaoUp.java:169)
	at org.nutz.dao.util.DaoUpTest.setUp(DaoUpTest.java:74)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
	at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

Running org.nutz.el.El2Test
class org.nutz.lang.Maths
Tests run: 42, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec
Running org.nutz.el.issue125.Issue125Test
a1
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.nutz.el.RPNTest
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.nutz.el.speed.SimpleSpeedTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.001 sec
Running org.nutz.filepool.NutFilePoolTest
fuck
C:\Users\Administrator\tmp_nutz\00\00\00\00\00\00\00\01
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.27 sec
Running org.nutz.filepool.PoolsTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running org.nutz.http.dns.HttpDNSTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.496 sec
Running org.nutz.http.HttpTest

环境是jdk8+tomcat8

7 回复

这不是nutz源码的testcase吗?不是nutzwk吧?

sorry,我也发现了。
启动nutzwk的报错是这样的:

[INFO] Deploying war to http://localhost:8080/nutzwk  
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 02:05 min
[INFO] Finished at: 2016-12-21T13:20:05+08:00
[INFO] Final Memory: 25M/568M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:redeploy (default-cli) on project nutzwk: Cannot invoke Tomcat manager: Error writing to server -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

@qq_4cb3f8b1

Deploying war to http://localhost:8080/nutzwk

执行的是啥???

我运行的时候选的是run as mavenbuild....
如果选run on server的话,会这样:

十二月 21, 2016 1:56:56 下午 org.apache.catalina.startup.ContextConfig processAnnotationsJar
严重: Unable to process Jar entry [org/nutz/filepool/Pools.class] from Jar [jar:file:/D:/apache-tomcat-8.0.9/wtpwebapps/nutzwk/WEB-INF/lib/nutz-1.r.59.jar!/] for annotations
java.io.EOFException
	at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
	at org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:187)
	at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:159)
	at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:76)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:226)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:101)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1987)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1940)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1915)
	at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1876)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1145)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:767)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5083)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1686)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

十二月 21, 2016 1:56:56 下午 org.apache.catalina.startup.ContextConfig processAnnotationsJar
严重: Unable to process Jar entry [org/nutz/filepool/SimpleFilePool.class] from Jar [jar:file:/D:/apache-tomcat-8.0.9/wtpwebapps/nutzwk/WEB-INF/lib/nutz-1.r.59.jar!/] for annotations
java.io.EOFException
	at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
	at org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:187)
	at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:159)
	at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:76)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:226)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:101)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1987)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1940)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1915)
	at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1876)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1145)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:767)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5083)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1686)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

十二月 21, 2016 1:56:56 下午 org.apache.catalina.startup.ContextConfig processAnnotationsJar
严重: Unable to process Jar entry [org/nutz/filepool/SynchronizedFilePool.class] from Jar [jar:file:/D:/apache-tomcat-8.0.9/wtpwebapps/nutzwk/WEB-INF/lib/nutz-1.r.59.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Constant pool at index 0 is null.
	at org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:204)
	at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:83)
	at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:76)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:226)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:101)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1987)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1940)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1915)
	at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1876)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1145)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:767)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5083)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1686)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

十二月 21, 2016 1:56:56 下午 org.apache.catalina.startup.ContextConfig processAnnotationsJar
严重: Unable to process Jar entry [org/nutz/filepool/UU32FilePool.class] from Jar [jar:file:/D:/apache-tomcat-8.0.9/wtpwebapps/nutzwk/WEB-INF/lib/nutz-1.r.59.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Expected class `CONSTANT_Utf8' at index 1 and got [10]
	at org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:207)
	at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:83)
	at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:76)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:226)
	at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:101)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1987)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1940)
	at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1915)
	at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1876)
	at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1145)
	at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:767)
	at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:302)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
	at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5083)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:581)
	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1686)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

而且会oom...

不是oom,是tomcat版本低,更新到tomcat最新版即可

可以了,感谢

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