• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Failed to load servlet

 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am getting the following error while try to deploy a simplr Application in WebSphere AE 4.0.1. I used Aplication Assembly tool to create my EAR file. please help me
[4/23/03 14:59:53:631 IST] 2dda5383 WebGroup X Servlet Error-[myservlet]: Failed to load servlet: java.lang.NoClassDefFoundError: myservlet/MyServlet (wrong name: myServlet/MyServlet)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:703)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:133)
at com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:432)
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:392)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:255)
at java.lang.ClassLoader.loadClass(ClassLoader.java:448)
at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:79)
at java.beans.Beans.instantiate(Beans.java:216)
at java.beans.Beans.instantiate(Beans.java:77)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:141)
at com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:325)
at com.ibm.servlet.engine.webapp.WebApp.loadServletManager(WebApp.java:1217)
at com.ibm.servlet.engine.webapp.WebApp.init(WebApp.java:145)
at com.ibm.servlet.engine.srt.WebGroup.loadWebApp(WebGroup.java:259)
at com.ibm.servlet.engine.srt.WebGroup.init(WebGroup.java:168)
at com.ibm.servlet.engine.ServletEngine.addWebApplication(ServletEngine.java:856)
at com.ibm.ws.runtime.WebContainer.install(WebContainer.java:36)
at com.ibm.ws.runtime.Server.startModule(Server.java:617)
at com.ibm.ejs.sm.active.ActiveModule.startModule(ActiveModule.java:511)
at com.ibm.ejs.sm.active.ActiveModule.startAction(ActiveModule.java:355)
at com.ibm.ejs.sm.active.ActiveObject.startObject(ActiveObject.java:722)
at com.ibm.ejs.sm.active.ActiveObject.start(ActiveObject.java:131)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:93)
at com.ibm.ejs.sm.active.ActiveObject.invokeContainedObject(ActiveObject.java:525)
at com.ibm.ejs.sm.agent.AdminAgentImpl.activeObjectInvocation(AdminAgentImpl.java:110)
at com.ibm.ejs.sm.agent.AdminAgentImpl.invokeActiveObject(AdminAgentImpl.java:62)
at com.ibm.ejs.sm.agent._AdminAgentImpl_Tie._invoke(_AdminAgentImpl_Tie.java:73)
at com.ibm.CORBA.iiop.ExtendedServerDelegate.dispatch(ExtendedServerDelegate.java:532)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:2395)
at com.ibm.CORBA.iiop.OrbWorker.run(OrbWorker.java:186)
at com.ibm.ejs.oa.pool.ThreadPool$PooledWorker.run(ThreadPool.java:104)
at com.ibm.ws.util.CachedThread.run(ThreadPool.java:138)
Thanks
Karthik
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

java.lang.NoClassDefFoundError: myservlet/MyServlet (wrong name: myServlet/MyServlet)


1) Does the generated .ear/.war file contain your MyServlet.class file?
2) Is your package "myservlet" or "myServlet"? I believe this should be the same in all places...
3) Have you used "myservlet/MyServlet" where you should've used "myservlet.MyServlet"?
 
Karthik Prabu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
I missed the second point you mentioned. thanks for ur reply now its working fine
Karthik
 
Karthik Prabu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lasse Koskela,
I created a new Context path as /saran but when i try to access it, WebSphere is not throwing any exception and also it is not showing the files there. 404 exception is thorwn in the browser. Please tell me what would be the problem. If u want i can send u the ear file i deployed.
thanks
Karthik
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the 404 page saying something about "directory listing disabled"? If it is, you might have forgotten to define the welcome files in web.xml.
Another thing to consider is that the URL for a web application is of the form
<server>:<port>/<appname>/<webappname>
If you have deployed a single .war file with the admin console, WebSphere has created an application based on the .war file's name. For example, deploying a webapp "myweb.war" would be accessible at <server>:<port>/myweb/myweb.
[ April 23, 2003: Message edited by: Lasse Koskela ]
 
Karthik Prabu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Lasse Koskela
Thanks for ur reply. The problem is I'm using IMM Http Server with Websphere. But forgot to regenrate the plungin-cfg.xml file. That is why when i access thru Http Server it shows an exception. Now i generated it and it is working fine. Thank you very much for your reply.
Thanks
Kathik
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic