Home > Back-end >  Configuration in web.xml servlet exists obviously, but newspaper ClassNotFound exception
Configuration in web.xml servlet exists obviously, but newspaper ClassNotFound exception

Time:09-16

In a recent study Huang Yong "architecture adventure - from scratch to write Java Web framework", according to the book wrote a smart - framework framework, in yoga project to test the framework, start tomcat anomaly,
Java. Lang. ClassNotFoundException: org. Smart4j. Smart_framework. DispatcherServlet
The at org. Apache. Catalina. Loader. WebappClassLoaderBase. LoadClass (WebappClassLoaderBase. Java: 1269)
The at org. Apache. Catalina. Loader. WebappClassLoaderBase. LoadClass (WebappClassLoaderBase. Java: 1104)
The at org. Apache. Catalina. Core. DefaultInstanceManager. LoadClass (DefaultInstanceManager. Java: 508)
The at org. Apache. Catalina. Core. DefaultInstanceManager. LoadClassMaybePrivileged (DefaultInstanceManager. Java: 489)
The at org. Apache. Catalina. Core. DefaultInstanceManager. NewInstance (DefaultInstanceManager. Java: 119)
The at org. Apache. Catalina. Core. StandardWrapper. LoadServlet (StandardWrapper. Java: 1041)
At org. Apache. Catalina. Core. StandardWrapper. Load (980) StandardWrapper. Java:
The at org. Apache. Catalina. Core. StandardContext. LoadOnStartup (StandardContext. Java: 4819)
The at org. Apache. Catalina. Core. StandardContext. StartInternal (StandardContext. Java: 5129)
The at org. Apache. Catalina. Util. LifecycleBase. Start (LifecycleBase. Java: 183)
The at org. Apache. Catalina. Core. ContainerBase $StartChild. Call (1425) ContainerBase. Java:
The at org. Apache. Catalina. Core. ContainerBase $StartChild. Call (1415) ContainerBase. Java:
The at Java. Util. Concurrent. FutureTask. Run (FutureTask. Java: 266)
At org, apache tomcat. Util. Threads. InlineExecutorService. Execute (InlineExecutorService. Java: 75)
The at Java. Util. Concurrent. AbstractExecutorService. Submit (AbstractExecutorService. Java: 134)
The at org. Apache. Catalina. Core. ContainerBase. StartInternal (ContainerBase. Java: 941)
The at org. Apache. Catalina. Core. StandardHost. StartInternal (StandardHost. Java: 839)
The at org. Apache. Catalina. Util. LifecycleBase. Start (LifecycleBase. Java: 183)
The at org. Apache. Catalina. Core. ContainerBase $StartChild. Call (1425) ContainerBase. Java:
The at org. Apache. Catalina. Core. ContainerBase $StartChild. Call (1415) ContainerBase. Java:
The at Java. Util. Concurrent. FutureTask. Run (FutureTask. Java: 266)
At org, apache tomcat. Util. Threads. InlineExecutorService. Execute (InlineExecutorService. Java: 75)
The at Java. Util. Concurrent. AbstractExecutorService. Submit (AbstractExecutorService. Java: 134)
The at org. Apache. Catalina. Core. ContainerBase. StartInternal (ContainerBase. Java: 941)
The at org. Apache. Catalina. Core. StandardEngine. StartInternal (StandardEngine. Java: 258)
The at org. Apache. Catalina. Util. LifecycleBase. Start (LifecycleBase. Java: 183)
The at org. Apache. Catalina. Core. StandardService. StartInternal (StandardService. Java: 422)
The at org. Apache. Catalina. Util. LifecycleBase. Start (LifecycleBase. Java: 183)
The at org. Apache. Catalina. Core. StandardServer. StartInternal (StandardServer. Java: 770)
The at org. Apache. Catalina. Util. LifecycleBase. Start (LifecycleBase. Java: 183)
The at org. Apache. Catalina. Startup. Catalina. Start (catalina. Java: 657)
At sun. Reflect. NativeMethodAccessorImpl. Invoke0 (Native Method)
At sun. Reflect. NativeMethodAccessorImpl. Invoke (NativeMethodAccessorImpl. Java: 62)
At sun. Reflect. DelegatingMethodAccessorImpl. Invoke (43) DelegatingMethodAccessorImpl. Java:
The at Java. Lang. Reflect. Method. Invoke (483) Method. The Java:
At org. Apache. Catalina. Startup. The Bootstrap. Start (355) the Bootstrap. Java:
At org. Apache. Catalina. Startup. The Bootstrap. Main (495) the Bootstrap. Java:

September 24, 2017 10:54:50 morning org. Apache. Coyote. AbstractProtocol start
Message: Starting ProtocolHandler [HTTP - nio - 8080 ""]
September 24, 2017 10:54:50 morning org. Apache. Coyote. AbstractProtocol start
Message: Starting ProtocolHandler [ajp - nio - 8009 ""]
September 24, 2017 10:54:50 morning org. Apache. Catalina. Startup. Catalina start
Information: the Server startup in 880 ms
I on the web. XML configuration for the servlet org. Smart4j. Smart_framework. DispatcherServlet, could also find DispatcherServlet classes, click on the link below is web. The XML configuration

Archetype Created Web Application

DispatcherServlet

Org. Smart4j. Smart_framework. DispatcherServlet
1


DispatcherServlet
/* & lt;/url - pattern>



The following is the project structure of chapter3, punctuated with org. Smart4j. Smart_framework. DispatcherServlet class

CodePudding user response:

May not have jars tomcat compiled in the project, you can open a tomcat project file folder, see have no jars

CodePudding user response:

May be there is no corresponding jar package

CodePudding user response:

I met a super pit, & lt; Value> * * * * * *
Because the line resolution can not find, finally & lt; Value> * * * * * * & lt;/value> Remove the newline is run successfully

CodePudding user response:

Look at is the version of the jar is not problem

CodePudding user response:

nullnullnullnull
  • Related