Question

having a little problem with WAS 8 here.

I have the following structure:

ear file
    META-INF/
    ejb.jar
    web.war
    (common.jar)

The common.jar contains interfaces for the ejb, war and for other applications (RMI). Inside the ejb.jar there is a UserServiceImpl using an interface from the common.jar. While deploy WebSphere is complaining that he can not find the common interface class.

I tried to lace the common.jar direct in the ear file, inside the ear using a lib folder, inside the ejb file. nothing works (on WebSphere)

Strange is if I use the RAD to deploy, everything is okay. When i export or build (through maven) i got this error. The deployed ear which works from RAD directly dose not contains more, something may be changed by the RAD but i don't know what.

Can anyone help me?

Was it helpful?

Solution

Of the options you mentioned:

  1. If common.jar is placed directly in the EAR file, then other modules must reference common.jar in the Class-Path of the respective META-INF/MANIFEST.MF files. I suspect RAD is doing this for you.

  2. If common.jar is placed inside the EAR using the lib folder, then either application.xml must not exist (which implies EE 5 or later), or if it exists, it must contain version="5" or later.

  3. Libraries cannot be placed literally inside EJB JARs. This approach can only work if the contents of common.jar are merged into the EJB JAR.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top