报空的问题解决了,现在有一个问题是在
SqlTplIocEventListener类中调用
private SqlsTplHolder getSqlsTplHolder(Class klass, String fileName, ISqlTemplteEngine sqlTemplteEngine)时
String xmlPath = klass.getPackage().getName().replace(".", File.separator) + File.separator + fileName;
URL url = klass.getClassLoader().getResource(xmlPath);
url为null,在service的同级目录下创建了TestService.xml(com\risun\nutzBeetl\service\TestService.xml),取到的xmlPath的路劲是相对路劲,
[DEBUG] 09:07:43.631 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:712) - Processing socket [org.apache.tomcat.util.net.NioChannel@58192f43:java.nio.channels.SocketChannel[connected local=/0:0:0:0:0:0:0:1:8080 remote=/0:0:0:0:0:0:0:1:2609]] with status [OPEN_READ]
[DEBUG] 09:07:43.631 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:724) - Found processor [null] for socket [org.apache.tomcat.util.net.NioChannel@58192f43:java.nio.channels.SocketChannel[connected local=/0:0:0:0:0:0:0:1:8080 remote=/0:0:0:0:0:0:0:1:2609]]
[DEBUG] 09:07:43.632 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:793) - Popped processor [org.apache.coyote.http11.Http11Processor@42cdc9ee] from cache
[DEBUG] 09:07:43.636 org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:402) - Received [GET /test/ctx HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: zh-CN,zh;q=0.9
Cookie: sid=rr1n58asl0hvroap9udhq782sm; Hm_lvt_d3f0f80430e686f09e671b88b927fa01=1579158716,1579222570,1581577223,1581642275
]
[DEBUG] 09:07:43.638 org.nutz.mvc.impl.UrlMappingImpl.get(UrlMappingImpl.java:101) - Found mapping for [GET] path=/test/ctx : TestBeetl.withContext(TestBeetl.java:24)
[DEBUG] 09:07:43.638 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) - Get 'testBeetl'<class com.risun.nutzBeetl.module.TestBeetl>
[DEBUG] 09:07:43.638 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:192) - >> Load definition name=testBeetl
[DEBUG] 09:07:43.639 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(testBeetl) in AnnotationIocLoader(packages=[com.risun.nutzBeetl])
[DEBUG] 09:07:43.639 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:223) - >> Make...'testBeetl'<class com.risun.nutzBeetl.module.TestBeetl>
[DEBUG] 09:07:43.639 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:65) - Save object 'testBeetl' to [app]
[DEBUG] 09:07:43.641 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) - Load class com.risun.nutzBeetl.module.TestBeetl without AOP
[DEBUG] 09:07:43.641 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) - Get 'testService'<class com.risun.nutzBeetl.service.TestService>
[DEBUG] 09:07:43.641 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:192) - >> Load definition name=testService
[DEBUG] 09:07:43.641 org.nutz.ioc.loader.combo.ComboIocLoader.printFoundIocBean(ComboIocLoader.java:226) - Found IocObject(testService) in AnnotationIocLoader(packages=[com.risun.nutzBeetl])
[DEBUG] 09:07:43.641 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:223) - >> Make...'testService'<class com.risun.nutzBeetl.service.TestService>
[DEBUG] 09:07:43.642 org.nutz.ioc.impl.ScopeContext.save(ScopeContext.java:65) - Save object 'testService' to [app]
[DEBUG] 09:07:43.642 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) - Get 'dao'<>
[DEBUG] 09:07:43.647 org.nutz.ioc.aop.impl.DefaultMirrorFactory.getMirror(DefaultMirrorFactory.java:76) - Load class com.risun.nutzBeetl.service.TestService without AOP
[DEBUG] 09:07:43.647 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) - Get 'dao'<>
[DEBUG] 09:07:43.647 org.nutz.service.EntityService.<init>(EntityService.java:41) - Get TypeParams for self : com.risun.nutzBeetl.bean.User
[DEBUG] 09:07:43.648 org.nutz.ioc.impl.NutIoc.get(NutIoc.java:166) - Get 'beetlSqlTemplteEngineImpl'<class com.github.threefish.nutz.sqltpl.BeetlSqlTemplteEngineImpl>
[DEBUG] 09:07:45.845 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:85) - Remove object 'testService' from [app]
[DEBUG] 09:07:45.845 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:85) - Remove object 'testBeetl' from [app]
[WARN ] 09:07:45.846 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/test/ctx :
org.nutz.ioc.IocException: IocBean[testBeetl] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:153)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:124)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.nutz.mvc.WhaleFilter.doFilter(WhaleFilter.java:171)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:528)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: IocBean[testBeetl] fail at field=[testService]
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:40)
at org.nutz.ioc.weaver.DefaultWeaver.fill(DefaultWeaver.java:67)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:138)
... 35 more
Caused by: org.nutz.ioc.IocException: IocBean[testService] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:153)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
at org.nutz.ioc.val.ReferTypeValue.get(ReferTypeValue.java:60)
at org.nutz.ioc.weaver.FieldInjector.inject(FieldInjector.java:32)
... 37 more
Caused by: com.github.threefish.nutz.error.NutzSqlTemplateXmlNotFoundError: sqls xml [TestService.xml] is not exists!!!
at com.github.threefish.nutz.sqltpl.SqlTplIocEventListener.getSqlsTplHolder(SqlTplIocEventListener.java:96)
at com.github.threefish.nutz.sqltpl.SqlTplIocEventListener.afterCreate(SqlTplIocEventListener.java:44)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:92)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
... 40 more
[DEBUG] 09:07:45.860 org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:76) - Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@304d535c:org.apache.tomcat.util.net.NioChannel@58192f43:java.nio.channels.SocketChannel[connected local=/0:0:0:0:0:0:0:1:8080 remote=/0:0:0:0:0:0:0:1:2609]], Status in: [OPEN_READ], State out: [OPEN]
[DEBUG] 09:07:45.860 org.apache.coyote.AbstractProtocol$ConnectionHandler.release(AbstractProtocol.java:1001) - Pushed Processor [org.apache.coyote.http11.Http11Processor@42cdc9ee]
[DEBUG] 09:07:53.665 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:712) - Processing socket [org.apache.tomcat.util.net.NioChannel@36ae86ea:java.nio.channels.SocketChannel[connected local=/0:0:0:0:0:0:0:1:8080 remote=/0:0:0:0:0:0:0:1:2610]] with status [OPEN_READ]
[DEBUG] 09:07:53.665 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:724) - Found processor [null] for socket [org.apache.tomcat.util.net.NioChannel@36ae86ea:java.nio.channels.SocketChannel[connected local=/0:0:0:0:0:0:0:1:8080 remote=/0:0:0:0:0:0:0:1:2610]]
[DEBUG] 09:07:53.666 org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:793) - Popped processor [org.apache.coyote.http11.Http11Processor@42cdc9ee] from cache
[DEBUG] 09:07:53.666 org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:711) - Error parsing HTTP request header
java.io.EOFException
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.fillReadBuffer(NioEndpoint.java:1289)
at org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper.read(NioEndpoint.java:1223)
at org.apache.coyote.http11.Http11InputBuffer.fill(Http11InputBuffer.java:737)
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:368)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:682)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:810)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
[DEBUG] 09:07:53.666 org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:76) - Socket: [org.apache.tomcat.util.net.NioEndpoint$NioSocketWrapper@6e6dd25f:org.apache.tomcat.util.net.NioChannel@36ae86ea:java.nio.channels.SocketChannel[connected local=/0:0:0:0:0:0:0:1:8080 remote=/0:0:0:0:0:0:0:1:2610]], Status in: [OPEN_READ], State out: [CLOSED]
[DEBUG] 09:07:53.667 org.apache.coyote.AbstractProtocol$ConnectionHandler.release(AbstractProtocol.java:1001) - Pushed Processor [org.apache.coyote.http11.Http11Processor@42cdc9ee]