Discussions

Web tier: servlets, JSP, Web frameworks: java.lang.NoClassDefFoundError:help me!!

  1. java.lang.NoClassDefFoundError:help me!! (3 messages)

    hi,

    I am using BEA weblogic server 9.0.I created a new domain named myproject.I have created directory mywebapp under applications dir.

    i.e C:\bea\user_projects\domains\myproject\applications\mywebapp

    I have placed my servlet class in :

    C:\bea\user_projects\domains\myproject\applications\mywebapp\WEB-INF\classes\Mypackage
    I deployed my apllication mywebapp using admin console.
    when i run the program in the browser,i get this error:

    Error 500--Internal Server Error
    javax.servlet.ServletException: [HTTP:101250][weblogic.servlet.internal.WebAppServletContext@ec32de - name: 'mywebapp', context-path: '/mywebapp']: Servlet class Mypackage.HelloServlet for servlet myHello could not be loaded because a class on which it depends was not found in the classpath C:\bea\user_projects\domains\myproject\applications\mywebapp\WEB-INF\classes.
    java.lang.NoClassDefFoundError: Mypackage/HelloServlet (wrong name: HelloServlet).
    at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:5 03)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:234)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebA ppServletContext.java:2970)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.j ava:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletCont ext.java:1888)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.jav a:1810)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1274)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:167)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:139)

    Kindly help me.
    bye

    Threaded Messages (3)

  2. pls.Check ur path[ Go to top ]

    The path which you have given is the wrong one.

    The error says that your HelloServlet.class file is not finding in particular location.

    Please check your path.


    Srikanth Kondeti,
    India
  3. java.lang.NoClassDefFoundError:[ Go to top ]

    hi,

    I am new to servlet programming.You have mentioned that the
    path is wrong .Can u please explain me in detail.

    bye
  4. java.lang.NoClassDefFoundError[ Go to top ]

    I am getting the same error can anybody help me