1 Reply Latest reply on May 7, 2007 11:51 AM by Mahesh Shinde

    lookup NoClassDefFoundError

    horikawa yoji Newbie

      hi all.

      I'm facing a lookup can't find error for about a day....

      I have created a EAR file called "Ad.ear".
      Inside of the EAR file, there is a JAR&WAR files.
      In Jar file, I have a Remote interface called "ResetObj" and implemented Stateless Session bean called "ResetObjBean".

      Here's what I'm tryin to do.

      I created another EAR file called Ad2.ear which only contains the Servlet.
      From the servlet, I'm tryin to call the Remote Session Bean like this:

      Context ctx = new InitialContext();
      ResetObj rst = (ResetObj )ctx.lookup("Ad/ResetObjBean/remote"); //this part fails
      rst.resetObject();
      


      but the prob is that it gives me following error:
      java.lang.NoClassDefFoundError: ad/session/flow/ResetObj
       java.lang.Class.getDeclaredConstructors0(Native Method)
       java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
       java.lang.Class.getConstructor0(Unknown Source)
       java.lang.Class.newInstance0(Unknown Source)
       java.lang.Class.newInstance(Unknown Source)
       org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       java.lang.Thread.run(Unknown Source)


      JBoss:4.0.5GA
      JVM:1.5.0_10

      I've set ClassPath to both JAVA_HOME and JBOSS_HOME.

      PLZ help!