按照例子但是启动报错 java.lang.ClassNotFoundException: net.wendal.nutzbook.MainModule
用了eclipse,jdk1.8 和 tomcat7. 文件目录也是按照 教程来的
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/7.0.69
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Apr 11 2016 07:57:09 UTC
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.69.0
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jdk1.8.0_121\jre
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_121-b13
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:\java\apache-tomcat-7.0.69
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\java\apache-tomcat-7.0.69
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\java\apache-tomcat-7.0.69\endorsed
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
四月 17, 2017 2:15:12 下午 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: C:\Program Files\Java\jdk1.8.0_121\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/java/eclipse/jre/bin/client;D:/java/eclipse/jre/bin;D:/java/eclipse/jre/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\java\eclipse;;.
四月 17, 2017 2:15:12 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
四月 17, 2017 2:15:12 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 616 ms
四月 17, 2017 2:15:12 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
四月 17, 2017 2:15:12 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.69
四月 17, 2017 2:15:13 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [132] milliseconds.
四月 17, 2017 2:15:13 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\conf\Catalina\localhost\nutzbook.xml
四月 17, 2017 2:15:13 下午 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:nutzbook' did not find a matching property.
四月 17, 2017 2:15:13 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2017-4-17 14:15:13.737 INFO [localhost-startStop-1] Select SystemLog as Nutz.Log implement
2017-4-17 14:15:13.742 INFO [localhost-startStop-1] NutFilter[nutz] starting ...
2017-4-17 14:15:13.946 DEBUG [localhost-startStop-1] Locations for Scans:
[Dir[path=D:\java\eclipse], Jar[path=D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\nutz-1.r.60.jar], Jar[path=D:\java\apache-tomcat-7.0.69\bin\bootstrap.jar], Jar[path=D:\java\apache-tomcat-7.0.69\bin\tomcat-juli.jar], Jar[path=C:\Program Files\Java\jdk1.8.0_121\lib\tools.jar]]
2017-4-17 14:15:14.30 DEBUG [localhost-startStop-1] Locations for Scans:
{D:\java\eclipse=Dir[path=D:\java\eclipse], D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\nutz-1.r.60.jar=Jar[path=D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\nutz-1.r.60.jar], D:\java\apache-tomcat-7.0.69\bin\bootstrap.jar=Jar[path=D:\java\apache-tomcat-7.0.69\bin\bootstrap.jar], D:\java\apache-tomcat-7.0.69\bin\tomcat-juli.jar=Jar[path=D:\java\apache-tomcat-7.0.69\bin\tomcat-juli.jar], C:\Program Files\Java\jdk1.8.0_121\lib\tools.jar=Jar[path=C:\Program Files\Java\jdk1.8.0_121\lib\tools.jar], D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\classes=Dir[path=D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\classes], D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\druid-1.0.29.jar=Jar[path=D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\druid-1.0.29.jar]}
2017-4-17 14:15:14.87 DEBUG [localhost-startStop-1] Using 95 castor for Castors
四月 17, 2017 2:15:14 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.NutConfigException: java.lang.ClassNotFoundException: net.wendal.nutzbook.MainModule
at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:134)
at org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:51)
at org.nutz.mvc.ActionHandler.(ActionHandler.java:18)
at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4908)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5602)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
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)
Caused by: java.lang.ClassNotFoundException: net.wendal.nutzbook.MainModule
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.nutz.lang.Lang.loadClass(Lang.java:2022)
at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:127)
... 20 more
四月 17, 2017 2:15:14 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
四月 17, 2017 2:15:14 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/nutzbook] startup failed due to previous errors
四月 17, 2017 2:15:14 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deployment of configuration descriptor D:\java\workspace.metadata.plugins\org.eclipse.wst.server.core\tmp1\conf\Catalina\localhost\nutzbook.xml has finished in 840 ms
四月 17, 2017 2:15:14 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
四月 17, 2017 2:15:14 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
四月 17, 2017 2:15:14 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1322 ms
package net.wendal.nutzbook;
import org.nutz.mvc.annotation.IocBy;
import org.nutz.mvc.annotation.Modules;
import org.nutz.mvc.ioc.provider.ComboIocProvider;
@IocBy(type = ComboIocProvider.class, args = { "*js", "ioc/", "*anno",
"net.wendal.nutzbook", "*tx", // 事务拦截 aop
"*async" })
// 异步执行aop
@Modules(scanPackage = true)
public class MainModule {
}
package net.wendal.nutzbook;
import org.nutz.mvc.annotation.IocBy;
import org.nutz.mvc.annotation.Modules;
import org.nutz.mvc.ioc.provider.ComboIocProvider;
@IocBy(type = ComboIocProvider.class, args = { "*js", "ioc/", "*anno",
"net.wendal.nutzbook", "*tx", // 事务拦截 aop
"*async" })
// 异步执行aop
@Modules(scanPackage = true)
public class MainModule {
}
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/7.0.69
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Apr 11 2016 07:57:09 UTC
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 7.0.69.0
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 7
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 6.1
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: C:\Program Files\Java\jdk1.8.0_121\jre
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_121-b13
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:\java\apache-tomcat-7.0.69
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\java\apache-tomcat-7.0.69
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\java\apache-tomcat-7.0.69\endorsed
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=UTF-8
四月 17, 2017 2:15:12 下午 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: C:\Program Files\Java\jdk1.8.0_121\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;D:/java/eclipse/jre/bin/client;D:/java/eclipse/jre/bin;D:/java/eclipse/jre/lib/i386;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;D:\java\eclipse;;.
四月 17, 2017 2:15:12 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
四月 17, 2017 2:15:12 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-bio-8009"]
四月 17, 2017 2:15:12 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 616 ms
四月 17, 2017 2:15:12 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
四月 17, 2017 2:15:12 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.69
四月 17, 2017 2:15:13 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [132] milliseconds.
四月 17, 2017 2:15:13 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deploying configuration descriptor D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\Catalina\localhost\nutzbook.xml
四月 17, 2017 2:15:13 下午 org.apache.catalina.startup.SetContextPropertiesRule begin
警告: [SetContextPropertiesRule]{Context} Setting property 'source' to 'org.eclipse.jst.jee.server:nutzbook' did not find a matching property.
四月 17, 2017 2:15:13 下午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2017-4-17 14:15:13.737 INFO [localhost-startStop-1] Select SystemLog as Nutz.Log implement
2017-4-17 14:15:13.742 INFO [localhost-startStop-1] NutFilter[nutz] starting ...
2017-4-17 14:15:13.946 DEBUG [localhost-startStop-1] Locations for Scans:
[Dir[path=D:\java\eclipse], Jar[path=D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\nutz-1.r.60.jar], Jar[path=D:\java\apache-tomcat-7.0.69\bin\bootstrap.jar], Jar[path=D:\java\apache-tomcat-7.0.69\bin\tomcat-juli.jar], Jar[path=C:\Program Files\Java\jdk1.8.0_121\lib\tools.jar]]
2017-4-17 14:15:14.30 DEBUG [localhost-startStop-1] Locations for Scans:
{D:\java\eclipse=Dir[path=D:\java\eclipse], D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\nutz-1.r.60.jar=Jar[path=D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\nutz-1.r.60.jar], D:\java\apache-tomcat-7.0.69\bin\bootstrap.jar=Jar[path=D:\java\apache-tomcat-7.0.69\bin\bootstrap.jar], D:\java\apache-tomcat-7.0.69\bin\tomcat-juli.jar=Jar[path=D:\java\apache-tomcat-7.0.69\bin\tomcat-juli.jar], C:\Program Files\Java\jdk1.8.0_121\lib\tools.jar=Jar[path=C:\Program Files\Java\jdk1.8.0_121\lib\tools.jar], D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\classes=Dir[path=D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\classes], D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\druid-1.0.29.jar=Jar[path=D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\nutzbook\WEB-INF\lib\druid-1.0.29.jar]}
2017-4-17 14:15:14.87 DEBUG [localhost-startStop-1] Using 95 castor for Castors
四月 17, 2017 2:15:14 下午 org.apache.catalina.core.StandardContext filterStart
严重: Exception starting filter nutz
org.nutz.mvc.NutConfigException: java.lang.ClassNotFoundException: net.wendal.nutzbook.MainModule
at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:134)
at org.nutz.mvc.config.AbstractNutConfig.createLoading(AbstractNutConfig.java:51)
at org.nutz.mvc.ActionHandler.<init>(ActionHandler.java:18)
at org.nutz.mvc.NutFilter._init(NutFilter.java:87)
at org.nutz.mvc.NutFilter.init(NutFilter.java:65)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4908)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5602)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:679)
at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1966)
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)
Caused by: java.lang.ClassNotFoundException: net.wendal.nutzbook.MainModule
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1858)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1701)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.nutz.lang.Lang.loadClass(Lang.java:2022)
at org.nutz.mvc.config.AbstractNutConfig.getMainModule(AbstractNutConfig.java:127)
... 20 more
四月 17, 2017 2:15:14 下午 org.apache.catalina.core.StandardContext startInternal
严重: One or more Filters failed to start. Full details will be found in the appropriate container log file
四月 17, 2017 2:15:14 下午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/nutzbook] startup failed due to previous errors
四月 17, 2017 2:15:14 下午 org.apache.catalina.startup.HostConfig deployDescriptor
信息: Deployment of configuration descriptor D:\java\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\conf\Catalina\localhost\nutzbook.xml has finished in 840 ms
四月 17, 2017 2:15:14 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]
四月 17, 2017 2:15:14 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["ajp-bio-8009"]
四月 17, 2017 2:15:14 下午 org.apache.catalina.startup.Catalina start
信息: Server startup in 1322 ms