akhikhl / gretty

Advanced gradle plugin for running web-apps on jetty and tomcat.
MIT License
655 stars 174 forks source link

java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet #424

Open milujite opened 6 years ago

milujite commented 6 years ago

三月 12, 2018 9:04:29 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin 警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SSM-V0.1' did not find a matching property. 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server version: Apache Tomcat/8.0.36 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server built: Jun 9 2016 13:55:50 UTC 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Server number: 8.0.36.0 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: OS Name: Windows 7 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: OS Version: 6.1 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Architecture: amd64 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Java Home: C:\Program Files\Java\jdk1.8.0_73\jre 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: JVM Version: 1.8.0_73-b02 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: JVM Vendor: Oracle Corporation 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_BASE: D:\java_workspace\framework.metadata.plugins\org.eclipse.wst.server.core\tmp0 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: CATALINA_HOME: D:\apache-tomcat-8.0.36 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dcatalina.base=D:\java_workspace\framework.metadata.plugins\org.eclipse.wst.server.core\tmp0 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dcatalina.home=D:\apache-tomcat-8.0.36 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dwtp.deploy=D:\java_workspace\framework.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Djava.endorsed.dirs=D:\apache-tomcat-8.0.36\endorsed 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.VersionLoggerListener log 信息: Command line argument: -Dfile.encoding=UTF-8 三月 12, 2018 9:04:29 下午 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_73\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:/Program Files/Java/jdk1.8.0_73/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_73/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_73/bin/../jre/lib/amd64;C:\Program Files\Java\jdk1.8.0_73\bin;C:\Program Files\Java\jdk1.8.0_73\jre\bin;C:\Program Files\Java\jre1.8.0_73\bin;C:\ProgramData\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\MySQL\MySQL Server 5.5\bin;;C:\Program Files (x86)\eclipse-64;;. 三月 12, 2018 9:04:29 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["http-nio-80"] 三月 12, 2018 9:04:29 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 信息: Using a shared selector for servlet write/read 三月 12, 2018 9:04:29 下午 org.apache.coyote.AbstractProtocol init 信息: Initializing ProtocolHandler ["ajp-nio-8009"] 三月 12, 2018 9:04:29 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector 信息: Using a shared selector for servlet write/read 三月 12, 2018 9:04:29 下午 org.apache.catalina.startup.Catalina load 信息: Initialization processed in 883 ms 三月 12, 2018 9:04:29 下午 org.apache.catalina.core.StandardService startInternal 信息: Starting service Catalina 三月 12, 2018 9:04:29 下午 org.apache.catalina.core.StandardEngine startInternal 信息: Starting Servlet Engine: Apache Tomcat/8.0.36 三月 12, 2018 9:04:31 下午 org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom 信息: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [1,596] milliseconds. 三月 12, 2018 9:04:32 下午 org.apache.jasper.servlet.TldScanner scanJars 信息: 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. 三月 12, 2018 9:04:32 下午 org.apache.catalina.core.ApplicationContext log 信息: No Spring WebApplicationInitializer types detected on classpath 三月 12, 2018 9:04:32 下午 org.apache.catalina.core.ApplicationContext log 信息: Marking servlet dispatcherServlet as unavailable 三月 12, 2018 9:04:32 下午 org.apache.catalina.core.StandardContext loadOnStartup 严重: Servlet [dispatcherServlet] in web application [/SSM-V0.1] threw load() exception java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166) at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:518) at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:499) at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1102) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1038) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5027) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5337) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1407) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1397) 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)

三月 12, 2018 9:04:32 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["http-nio-80"] 三月 12, 2018 9:04:32 下午 org.apache.coyote.AbstractProtocol start 信息: Starting ProtocolHandler ["ajp-nio-8009"] 三月 12, 2018 9:04:32 下午 org.apache.catalina.startup.Catalina start 信息: Server startup in 3564 ms

javabrett commented 6 years ago

Possibly related: https://stackoverflow.com/questions/11227395/java-lang-classnotfoundexception-org-springframework-web-servlet-dispatcherserv .

henrik242 commented 6 years ago

@milujite Do you still get this with the latest release? (Version 2.1.0 @ https://github.com/gretty-gradle-plugin/gretty)