nutz-book-project 使用默认配置
上传uflo jar包后,点击启用,提示失败,后台报错:
11:41:50.066 DEBUG (Hotplug.java:432) getHotPlugJarList - check hotplug.localdir : D:\var\lib\hotplug
11:41:50.125 DEBUG (Hotplug.java:444) visit - found hotplug name=uflo version=3.1.0 enable=false
11:41:50.205 INFO (AnnotationIocLoader.java:50) <init> - > scan 'net.wendal.nutzbook.uflo'
11:41:50.206 DEBUG (Scans.java:280) scan - Found 6 resource by src( net/wendal/nutzbook/uflo/ ) , regex( ^.+[.]class$ )
11:41:50.216 INFO (AnnotationIocLoader.java:98) addClass - > add 'ufloModule ' - net.wendal.nutzbook.uflo.module.UfloModule
11:41:50.223 DEBUG (ComboIocLoader.java:116) createIocLoader - found spring -- org.nutz.integration.spring.SpringIocLoader
11:41:50.244 DEBUG (LogTimeProcessor.java:24) process - [POST]URI=/admin/hotplug/enable 200 186ms
11:41:50.244 WARN (FailProcessor.java:28) process - Error@/admin/hotplug/enable :
org.nutz.lang.born.BorningException: Fail to born or cast to 'org.nutz.integration.spring.SpringIocLoader'
by args: [@(classpath*:spring-context.xml)]
because:java.lang.IllegalStateException
at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:25) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.lang.Mirror.born(Mirror.java:1010) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.ioc.loader.combo.ComboIocLoader.createIocLoader(ComboIocLoader.java:124) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.ioc.loader.combo.ComboIocLoader.<init>(ComboIocLoader.java:98) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.plugins.hotplug.Hotplug.abc(Hotplug.java:370) ~[nutzcn-core-3.1.0.jar:3.1.0]
at org.nutz.plugins.hotplug.Hotplug.enable(Hotplug.java:217) ~[nutzcn-core-3.1.0.jar:3.1.0]
at net.wendal.nutzbook.core.module.HotplugModule.enable(HotplugModule.java:90) ~[nutzcn-core-3.1.0.jar:3.1.0]
at net.wendal.nutzbook.core.module.HotplugModule$FM$enable$aa2c1b264ec0f513aced22c71e5c6192.invoke(HotplugModule.java) ~[nutz-1.r.65-SNAPSHOT.jar:3.1.0]
at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:30) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.integration.shiro.NutShiroProcessor.process(NutShiroProcessor.java:126) ~[nutzcn-core-3.1.0.jar:3.1.0]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at net.wendal.nutzbook.common.mvc.DailyUniqueUsersProcessor.process(DailyUniqueUsersProcessor.java:45) ~[nutzcn-core-3.1.0.jar:3.1.0]
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at net.wendal.nutzbook.common.mvc.LogTimeProcessor.process(LogTimeProcessor.java:19) ~[nutzcn-core-3.1.0.jar:3.1.0]
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202) [nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.nutz.plugins.hotplug.HotplugFilter.doFilter(HotplugFilter.java:73) [nutzcn-core-3.1.0.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [nutzcn-core-3.1.0.jar:3.1.0]
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [nutzcn-core-3.1.0.jar:3.1.0]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548) [jetty-security-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473) [jetty-servlet-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.Server.handle(Server.java:530) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256) [jetty-server-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) [jetty-io-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102) [jetty-io-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) [jetty-io-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626) [jetty-util-9.4.8.v20171121.jar:9.4.8.v20171121]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: java.lang.IllegalStateException
at org.eclipse.jetty.servlet.ServletContextHandler$Context.setInitParameter(ServletContextHandler.java:1296) ~[?:?]
at org.nutz.integration.spring.SpringIocLoader.<init>(SpringIocLoader.java:40) ~[?:?]
at org.nutz.integration.spring.SpringIocLoader$FC$ab706b0cf40b3b24094a0af312e173b9.invoke(SpringIocLoader.java) ~[?:?]
at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:19) ~[nutz-1.r.65-SNAPSHOT.jar:1.r.65-SNAPSHOT]
我看了代码Uflow也是采用了插件的形式开发的,其他插件我试过是可以启用的,但是就是uflow启用不了。
顺便有个小BUG, 该项目启动后,若直接访问http://localhost:8080/ 会报错,追踪代码后发现是net.wendal.nutzbook.adminlte.module.index中
调用了 req.setAttribute("profile", userService.getUserProfile(Toolkit.uid(), false));
其中Toolkit.uid()方法中u = SecurityUtils.getSubject().getPrincipal(); 直接返回了1 导致后台查询数据库时uid不对,初始化部分参数出错