• 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

Application runs only inside WSAD

 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
    Sincerely,
    Francisco
    [ April 08, 2003: Message edited by: Francisco A Guimaraes ]
     
    author
    Posts: 3892
    5
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • 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.
    Kyle
     
    Francisco A Guimaraes
    Ranch Hand
    Posts: 182
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    That was exactly the problem. Thanks very much.
    Francisco
     
    Self destruct mode activated. Instructions for deactivation encoded in 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