NutzCN Logo
问答 shiro-start 启动报错 错误如下
发布于 15天前 作者 Rekoe 46 次浏览 复制 上一个帖子 下一个帖子
标签:
[ERROR] 12:15:40.632 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:146) - Shiro environment initialization failed
org.nutz.ioc.IocException: IocBean[shiroWebSecurityManager] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:150)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.boot.starter.shiro.NbResourceBasedWebEnvironment.createWebSecurityManager(NbResourceBasedWebEnvironment.java:47)
	at org.nutz.boot.starter.shiro.NbResourceBasedWebEnvironment.configure(NbResourceBasedWebEnvironment.java:30)
	at org.nutz.boot.starter.shiro.NbResourceBasedWebEnvironment.init(NbResourceBasedWebEnvironment.java:24)
	at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
	at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
	at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:221)
	at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:133)
	at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
	at org.nutz.boot.starter.shiro.NbShiroEnvironmentLoaderListener.contextInitialized(NbShiroEnvironmentLoaderListener.java:40)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:890)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:853)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1514)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1476)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
	at org.eclipse.jetty.server.Server.start(Server.java:449)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:416)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:69)
	at org.nutz.boot.AppContext.startServers(AppContext.java:128)
	at org.nutz.boot.NbApp.run(NbApp.java:164)
	at com.rekoe.MainLauncher.main(MainLauncher.java:23)
Caused by: org.nutz.lang.InvokingException: Fail to invoke [org.nutz.boot.starter.shiro.ShiroEnvStarter].getWebSecurityManager() by args:
 
For the reason: Fail to find Method javax.sql.DataSource->close with params:
[]
	at org.nutz.lang.Invoking.invoke(Invoking.java:195)
	at org.nutz.lang.Mirror.invoke(Mirror.java:1120)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:78)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:115)
	... 31 more
Caused by: java.lang.NoSuchMethodException: Fail to find Method javax.sql.DataSource->close with params:
[]
	at org.nutz.lang.Mirror.findMethod(Mirror.java:1179)
	at org.nutz.ioc.impl.ObjectMakerImpl.createTrigger(ObjectMakerImpl.java:172)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:107)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.boot.starter.jdbc.DataSourceStarter.getDataSource(DataSourceStarter.java:58)
	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.nutz.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77)
	at org.nutz.lang.Invoking.invoke(Invoking.java:192)
	at org.nutz.lang.Mirror.invoke(Mirror.java:1120)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:78)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:115)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:62)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
	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:136)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.boot.starter.shiro.ShiroEnvStarter.getWebSecurityManager(ShiroEnvStarter.java:65)
	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.nutz.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77)
	at org.nutz.lang.Invoking.invoke(Invoking.java:192)
	... 35 more
[WARN ] 12:15:40.635 org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:554) - Failed startup of context o.e.j.w.WebAppContext@6e9a5ed8{/,[],UNAVAILABLE}
org.nutz.ioc.IocException: IocBean[shiroWebSecurityManager] throw Exception when creating
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:150)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.boot.starter.shiro.NbResourceBasedWebEnvironment.createWebSecurityManager(NbResourceBasedWebEnvironment.java:47)
	at org.nutz.boot.starter.shiro.NbResourceBasedWebEnvironment.configure(NbResourceBasedWebEnvironment.java:30)
	at org.nutz.boot.starter.shiro.NbResourceBasedWebEnvironment.init(NbResourceBasedWebEnvironment.java:24)
	at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:45)
	at org.apache.shiro.util.LifecycleUtils.init(LifecycleUtils.java:40)
	at org.apache.shiro.web.env.EnvironmentLoader.createEnvironment(EnvironmentLoader.java:221)
	at org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:133)
	at org.apache.shiro.web.env.EnvironmentLoaderListener.contextInitialized(EnvironmentLoaderListener.java:58)
	at org.nutz.boot.starter.shiro.NbShiroEnvironmentLoaderListener.contextInitialized(NbShiroEnvironmentLoaderListener.java:40)
	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:890)
	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:532)
	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:853)
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:344)
	at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1514)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1476)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:785)
	at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:261)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
	at org.eclipse.jetty.server.Server.start(Server.java:449)
	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
	at org.eclipse.jetty.server.Server.doStart(Server.java:416)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
	at org.nutz.boot.starter.jetty.JettyStarter.start(JettyStarter.java:69)
	at org.nutz.boot.AppContext.startServers(AppContext.java:128)
	at org.nutz.boot.NbApp.run(NbApp.java:164)
	at com.rekoe.MainLauncher.main(MainLauncher.java:23)
Caused by: org.nutz.lang.InvokingException: Fail to invoke [org.nutz.boot.starter.shiro.ShiroEnvStarter].getWebSecurityManager() by args:
 
For the reason: Fail to find Method javax.sql.DataSource->close with params:
[]
	at org.nutz.lang.Invoking.invoke(Invoking.java:195)
	at org.nutz.lang.Mirror.invoke(Mirror.java:1120)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:78)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:115)
	... 31 more
Caused by: java.lang.NoSuchMethodException: Fail to find Method javax.sql.DataSource->close with params:
[]
	at org.nutz.lang.Mirror.findMethod(Mirror.java:1179)
	at org.nutz.ioc.impl.ObjectMakerImpl.createTrigger(ObjectMakerImpl.java:172)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:107)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.boot.starter.jdbc.DataSourceStarter.getDataSource(DataSourceStarter.java:58)
	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.nutz.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77)
	at org.nutz.lang.Invoking.invoke(Invoking.java:192)
	at org.nutz.lang.Mirror.invoke(Mirror.java:1120)
	at org.nutz.ioc.impl.ObjectMakerImpl$1.born(ObjectMakerImpl.java:78)
	at org.nutz.ioc.weaver.DefaultWeaver.born(DefaultWeaver.java:67)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:115)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
	at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:62)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.val.ReferValue.get(ReferValue.java:24)
	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:136)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:216)
	at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:245)
	at org.nutz.boot.starter.shiro.ShiroEnvStarter.getWebSecurityManager(ShiroEnvStarter.java:65)
	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.nutz.lang.Invoking$NullArgInvoker.invoke(Invoking.java:77)
	at org.nutz.lang.Invoking.invoke(Invoking.java:192)
	... 35 more
[INFO ] 12:15:40.678 org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:286) - Started ServerConnector@19932c16{HTTP/1.1,[http/1.1]}{127.0.0.1:8083}
[INFO ] 12:15
2 回复

pull一下nutz就好了

pull 了 好像问题依旧这样

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