NutzCN Logo
问答 根据NutzBook配置 shiro 报NutDaoRealm异常
发布于 2046天前 作者 Longitude 1282 次浏览 复制 上一个帖子 下一个帖子
标签:
十月 14, 2016 2:32:10 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:inutz' did not find a matching property.
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version:        Apache Tomcat/7.0.72
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built:          Sep 14 2016 12:12:26 UTC
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number:         7.0.72.0
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name:               Windows 8.1
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version:            6.3
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture:          amd64
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home:             D:\Env\Java\jdk1.7.0_80\jre
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version:           1.7.0_80-b15
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor:            Oracle Corporation
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE:         D:\Env\Apache-tomcat-7.0.72
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME:         D:\Env\Apache-tomcat-7.0.72
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:55255
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\Env\Apache-tomcat-7.0.72
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\Env\Apache-tomcat-7.0.72
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\Env\Apache-tomcat-7.0.72\webapps
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\Env\Apache-tomcat-7.0.72\endorsed
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
十月 14, 2016 2:32:10 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Env\Java\jdk1.7.0_80\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:\Env\Java\jdk1.7.0_80\jre\bin;D:/Env/Java/jre1.8.0_102/bin/server;D:/Env/Java/jre1.8.0_102/bin;D:/Env/Java/jre1.8.0_102/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Users\Longitude\AppData\Local\Microsoft\WindowsApps;;D:\Env\Eclipse\eclipse;;.
十月 14, 2016 2:32:10 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
十月 14, 2016 2:32:10 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
十月 14, 2016 2:32:10 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 2260 ms
十月 14, 2016 2:32:10 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
十月 14, 2016 2:32:10 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.72
十月 14, 2016 2:32:13 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Shiro environment
2016-10-14 14:32:13,485 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:128) INFO  - Starting Shiro environment initialization.
2016-10-14 14:32:13,504 org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:76) DEBUG - Checking any specified config locations.
2016-10-14 14:32:13,504 org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:81) DEBUG - No INI instance or config locations specified.  Trying default config locations.
2016-10-14 14:32:13,512 org.apache.shiro.io.ResourceUtils.loadFromClassPath(ResourceUtils.java:159) DEBUG - Opening resource from class path [shiro.ini]
2016-10-14 14:32:13,519 org.apache.shiro.config.Ini.load(Ini.java:351) DEBUG - Parsing [main]
2016-10-14 14:32:13,523 org.apache.shiro.config.Ini.load(Ini.java:351) DEBUG - Parsing [urls]
2016-10-14 14:32:13,524 org.apache.shiro.web.env.IniWebEnvironment.getDefaultIni(IniWebEnvironment.java:136) DEBUG - Discovered non-empty INI configuration at location 'classpath:shiro.ini'.  Using for configuration.
2016-10-14 14:32:13,528 org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:122) DEBUG - Creating instance from Ini [sections=main,urls]
2016-10-14 14:32:14,452 org.apache.shiro.web.env.EnvironmentLoader.initEnvironment(EnvironmentLoader.java:146) ERROR - Shiro environment initialization failed
org.apache.shiro.config.ConfigurationException: Unable to instantiate class [com.starsoft.module.shiro.realm.NutDaoRealm] for object named 'nutzdao_realm'.  Please ensure you've specified the fully qualified class name correctly.
	at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:309)
	at org.apache.shiro.config.ReflectionBuilder$InstantiationStatement.doExecute(ReflectionBuilder.java:927)
	at org.apache.shiro.config.ReflectionBuilder$Statement.execute(ReflectionBuilder.java:887)
	at org.apache.shiro.config.ReflectionBuilder$BeanConfigurationProcessor.execute(ReflectionBuilder.java:765)
	at org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:260)
	at org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:167)
	at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:130)
	at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:108)
	at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:94)
	at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:46)
	at org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:123)
	at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47)
	at org.apache.shiro.web.env.IniWebEnvironment.createWebSecurityManager(IniWebEnvironment.java:203)
	at org.apache.shiro.web.env.IniWebEnvironment.configure(IniWebEnvironment.java:99)
	at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:92)
	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.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.shiro.util.UnknownClassException: Unable to load class named [com.starsoft.module.shiro.realm.NutDaoRealm] from the thread context, current, or system/application ClassLoaders.  All heuristics have been exhausted.  Class could not be found.
	at org.apache.shiro.util.ClassUtils.forName(ClassUtils.java:152)
	at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:168)
	at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:302)
	... 28 more
十月 14, 2016 2:32:14 下午 org.apache.catalina.core.StandardContext listenerStart
严重: Exception sending context initialized event to listener instance of class org.apache.shiro.web.env.EnvironmentLoaderListener
org.apache.shiro.config.ConfigurationException: Unable to instantiate class [com.starsoft.module.shiro.realm.NutDaoRealm] for object named 'nutzdao_realm'.  Please ensure you've specified the fully qualified class name correctly.
	at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:309)
	at org.apache.shiro.config.ReflectionBuilder$InstantiationStatement.doExecute(ReflectionBuilder.java:927)
	at org.apache.shiro.config.ReflectionBuilder$Statement.execute(ReflectionBuilder.java:887)
	at org.apache.shiro.config.ReflectionBuilder$BeanConfigurationProcessor.execute(ReflectionBuilder.java:765)
	at org.apache.shiro.config.ReflectionBuilder.buildObjects(ReflectionBuilder.java:260)
	at org.apache.shiro.config.IniSecurityManagerFactory.buildInstances(IniSecurityManagerFactory.java:167)
	at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:130)
	at org.apache.shiro.config.IniSecurityManagerFactory.createSecurityManager(IniSecurityManagerFactory.java:108)
	at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:94)
	at org.apache.shiro.config.IniSecurityManagerFactory.createInstance(IniSecurityManagerFactory.java:46)
	at org.apache.shiro.config.IniFactorySupport.createInstance(IniFactorySupport.java:123)
	at org.apache.shiro.util.AbstractFactory.getInstance(AbstractFactory.java:47)
	at org.apache.shiro.web.env.IniWebEnvironment.createWebSecurityManager(IniWebEnvironment.java:203)
	at org.apache.shiro.web.env.IniWebEnvironment.configure(IniWebEnvironment.java:99)
	at org.apache.shiro.web.env.IniWebEnvironment.init(IniWebEnvironment.java:92)
	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.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5634)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571)
	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.shiro.util.UnknownClassException: Unable to load class named [com.starsoft.module.shiro.realm.NutDaoRealm] from the thread context, current, or system/application ClassLoaders.  All heuristics have been exhausted.  Class could not be found.
	at org.apache.shiro.util.ClassUtils.forName(ClassUtils.java:152)
	at org.apache.shiro.util.ClassUtils.newInstance(ClassUtils.java:168)
	at org.apache.shiro.config.ReflectionBuilder.createNewInstance(ReflectionBuilder.java:302)
	... 28 more

十月 14, 2016 2:32:14 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more listeners failed to start. Full details will be found in the appropriate container log file
十月 14, 2016 2:32:14 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/inutz] startup failed due to previous errors
十月 14, 2016 2:32:14 下午 org.apache.catalina.core.ApplicationContext log
信息: Cleaning up Shiro Environment
十月 14, 2016 2:32:14 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Env\Apache-tomcat-7.0.72\webapps\docs
十月 14, 2016 2:32:14 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Env\Apache-tomcat-7.0.72\webapps\docs has finished in 94 ms
十月 14, 2016 2:32:14 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Env\Apache-tomcat-7.0.72\webapps\examples
十月 14, 2016 2:32:15 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
十月 14, 2016 2:32:15 下午 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
十月 14, 2016 2:32:15 下午 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@3c56f7e5')
十月 14, 2016 2:32:15 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Env\Apache-tomcat-7.0.72\webapps\examples has finished in 501 ms
十月 14, 2016 2:32:15 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Env\Apache-tomcat-7.0.72\webapps\host-manager
十月 14, 2016 2:32:15 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Env\Apache-tomcat-7.0.72\webapps\host-manager has finished in 82 ms
十月 14, 2016 2:32:15 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Env\Apache-tomcat-7.0.72\webapps\manager
十月 14, 2016 2:32:15 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Env\Apache-tomcat-7.0.72\webapps\manager has finished in 160 ms
十月 14, 2016 2:32:15 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\Env\Apache-tomcat-7.0.72\webapps\ROOT
十月 14, 2016 2:32:15 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\Env\Apache-tomcat-7.0.72\webapps\ROOT has finished in 137 ms
十月 14, 2016 2:32:15 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
十月 14, 2016 2:32:15 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
十月 14, 2016 2:32:15 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 4688 ms

4 回复

是不是类名写错了?没编译过去?确认一下class文件在不在

nutzdao_realm = com.starsoft.module.shiro.realm.NutDaoRealm 确定没错。

@wendal 不知道为什么,calen 项目 和 tomcat 都无法编译

@qq_5cfdd686 clean and build,并确保class文件能找到

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