Adding jar files to EJB - WAS 6.1 - Websphere

This is a discussion on Adding jar files to EJB - WAS 6.1 - Websphere ; Hi I want to add a jar file to an EJB module in WAS 6.1..I added it under Java Build Path Libraries and also checked the jar under order and export...no compile errors..however while starting WAS it throws ClassNotFound error..any ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Adding jar files to EJB - WAS 6.1

  1. Adding jar files to EJB - WAS 6.1

    Hi I want to add a jar file to an EJB module in WAS 6.1..I added it under Java Build Path Libraries and also checked the jar under order and export...no compile errors..however while starting WAS it throws ClassNotFound error..any help on this appreciated..thanks..

    ------Start of DE processing------ = [7/12/09 16:28:02:728 EDT] , key = com.ibm.ws.exception.RuntimeWarning com.ibm.ws.runtime.component.ApplicationMgrImpl 348
    Exception = com.ibm.ws.exception.RuntimeWarning
    Source = com.ibm.ws.runtime.component.ApplicationMgrImpl
    probeid = 348
    Stack Dump = com.ibm.ws.exception.RuntimeWarning: java.lang.NoClassDefFoundError: com.package1.subscribe.Receiver
    at com.ibm.ws.runtime.component.EJBContainerImpl.inst all(EJBContainerImpl.java:3027)
    at com.ibm.ws.runtime.component.EJBContainerImpl.star t(EJBContainerImpl.java:3693)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.st art(ApplicationMgrImpl.java:1312)
    at com.ibm.ws.runtime.component.DeployedApplicationIm pl.fireDeployedObjectStart(DeployedApplicationImpl .java:1129)
    at com.ibm.ws.runtime.component.DeployedModuleImpl.st art(DeployedModuleImpl.java:569)
    at com.ibm.ws.runtime.component.DeployedApplicationIm pl.start(DeployedApplicationImpl.java:814)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl.st artApplication(ApplicationMgrImpl.java:965)
    at com.ibm.ws.runtime.component.ApplicationMgrImpl$Ap pInitializer.run(ApplicationMgrImpl.java:2131)
    at com.ibm.wsspi.runtime.component.WsComponentImpl$_A synchInitializer.run(WsComponentImpl.java:341)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1469)
    Caused by: java.lang.NoClassDefFoundError: com.package1.subscribe.Receiver
    at java.lang.J9VMInternals.verifyImpl(Native Method)
    at java.lang.J9VMInternals.verify(J9VMInternals.java: 66)
    at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:127)
    at java.lang.Class.newInstanceImpl(Native Method)
    at java.lang.Class.newInstance(Class.java:1300)
    at com.ibm.ejs.container.EJSContainer.loadBeanMetaDat a(EJSContainer.java:1631)
    at com.ibm.ejs.container.HomeOfHomes.loadBeanMetaData (HomeOfHomes.java:641)
    at com.ibm.ejs.container.HomeRecord.getHomeAndInitial ize(HomeRecord.java:476)
    at com.ibm.ejs.container.EJSContainer.getHomeWrapperC ommon(EJSContainer.java:1271)
    at com.ibm.ejs.container.EJSContainer.getHomeInstance (EJSContainer.java:1180)
    at com.ibm.ejs.container.EJSContainer.startBean(EJSCo ntainer.java:1166)
    at com.ibm.ws.runtime.component.EJBContainerImpl.star tBean(EJBContainerImpl.java:3447)
    at com.ibm.ws.runtime.component.EJBContainerImpl.inst all(EJBContainerImpl.java:2858)
    ... 9 more

    Dump of callerThis =
    null

  2. Re: Adding jar files to EJB - WAS 6.1

    Hi Kim,

    How is the new JAR file packaged in WAS? Is it part of the EAR? A shared libarary? This is important because the contents of the JAR must be visible to the EJB module at runtime.

    If it is part of the EAR, then make sure that you have updated the Classpath field to include the new JAR file in the META-INF/MANIFEST.MF file for the EJB JAR. If not, then you will need to create a shared library for this new JAR file and make sure that it is accessible from your EAR. Alternatively, you could drop the new JAR into WAS_HOME/lib/ext to make it accessible to the entire server.

    Hope this helps,

    Andy

  3. Re: Adding jar files to EJB - WAS 6.1

    Thanks...i finally made all jars part of my ear...and added dependencies in EJB module..

+ Reply to Thread