• 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
  • salvin francis
  • Piet Souris

Application runs only inside WSAD

Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I made a sample to see if I knew how to deploy an application in WAS. It consisted of two simple elements:
  • a Session Bean called Hello, with a print method that printed "Hello!" to the standard out and returned this string
  • a servlet that called the session bean and printed the result in the browser.

  • Inside WSAD it ran fine, but when I deployed it to WAS it gave the following error:
    this is the browser message:
    "Error 500: Failed to load target servlet [Test]"
    this is what I got from the log:

    Servlet Error-[Test]: Failed to load servlet: java.lang.NoClassDefFoundError: com/invenire/test/HelloHome
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:254)
    at java.beans.Beans.instantiate(Beans.java:213)
    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)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcherInfo.calculateInfo(WebAppRequestDispatcherInfo.java:130)
    at com.ibm.servlet.engine.webapp.WebAppRequestDispatcherInfo.<init>(WebAppRequestDispatcherInfo.java:46)
    at com.ibm.servlet.engine.webapp.WebApp.getRequestDispatcher(WebApp.java:1133)
    at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:118)
    at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
    at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
    at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
    at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:313)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:242)
    at com.ibm.ws.util.CachedThread.run(ThreadPool.java:122)

    Apparently, the server isn�t finding the class of the Home interface, although I don�t know why. If I remove from the servlet where it calls the EJB, the application runs fine and prints "Hello!", so the problem is not the servlet, the HTTP server, or the plugin configuration.
    I�m using the WAS 4 Test Environment inside WSAD 5 and my WAS is 4.0.1 Advanced Edition, can somebody help me? I really don�t know what�s happening. If anybody wants, I can show the source code, I didn�t put the code here because the message would be too long. Any help is deeply appreciated.
    [ April 08, 2003: Message edited by: Francisco A Guimaraes ]
    Posts: 3892
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    This sounds like a classloader issue to me. Try adding the EJB-JAR file to the classpath in the manifest of the WAR file.
    Francisco A Guimaraes
    Ranch Hand
    Posts: 182
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    That was exactly the problem. Thanks very much.
    Shiny ad:
    Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!