Hi all,
I have a problem when I try to deploy a simple
application containing a single servlet. This servlet uses some other utility
classes.
When I invoke this servlet from the client browser,
the following error message comes out in the server log file:
[01.09.07 13:33:42:060 GMT+01:00] 215d1ca5
WebGroup
X SRVE0026E:
[Servlet-Fehler]-[LoginServlet]: java.lang.NoClassDefFoundError:
com/wiley/compBooks/EJwithUML/TimecardServlets/LoginServlet
(wrong name:
com/wiley/compBooks/EJwithUML/TimeCardServlets/LoginServlet)
at
java.lang.ClassLoader.defineClass0(Native Method)
at
java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at
com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled
Code))
at
com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled
Code))
at
com.ibm.ws.classloader.ClassLoaderGroup.findClass(ClassLoaderGroup.java(Compiled
Code))
at
com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled
Code))
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled
Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled
Code))
at
com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:66)
at
java.beans.Beans.instantiate(Beans.java:196)
at
java.beans.Beans.instantiate(Beans.java:57)
at
com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:148)
at
com.ibm.servlet.engine.webapp.WebAppServletManager.getServletReference(WebAppServletManager.java:287)
at
com.ibm.servlet.engine.webapp.WebApp.getServletReference(WebApp.java:354)
...
The XML descriptor file has the following
content:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app (View Source for full doctype...)>
-
<web-app id="WebApp_ID">
<display-name>LoginServletwithUML</display-name>
<description>Sample from the book UML</description>
-
<servlet id="Servlet_1">
<servlet-name>LoginServlet</servlet-name>
<display-name>Login Servlet with UML Book</display-name>
<servlet-class>com.wiley.compBooks.EJwithUML.TimecardServlets.LoginServlet</servlet-class>
</servlet>
- <servlet-mapping
id="ServletMapping_1">
<servlet-name>LoginServlet</servlet-name>
<url-pattern>LoginServletwithUML</url-pattern>
</servlet-mapping>
</web-app>
I wonder why this error (loading class file) can
happen, since I can yet see all the class files with the exact
fully qualified package names are present in the .war web module file
???
I also have another small question, as it seems to
me that I cannot specify the file name for a newly created web module, WebSphere
will always fix this name already???
Many thanks in advance,
Dang Quang Minh