I have problem that I don't get EAServer to find data
classes in other components. An example:
I have one component, some.package.EJB1, that have a data
class some.package.data.Information.
The EJB1 have one method in the remote interface that
returns an Information object.
In the /deploy/ejbjars/ejb1/some/package/data the file
Information.class exists. This all looks fine.
I then create another component some.other.package.EJB2.
This component also uses the same
some.package.data.Information object. But this causes an
exception to occure.
It's possible to compile the EJB2 (since I have
/deploy/ejbjars/ejb1/ in my classpath) but when I deploy it
to the EAServer I get an exception
java.lang.NoClassDefFoundError:
some/package/data/Information. I have tried to deploy both
by putting the EJB2.jar file in the deploy folder and by
using ant scripts with the same result.
Can you please help me with this?
Best regards,
Mattias
Try putting both the EJB-JAR with Information.class in the CLASSPATH
before calling the deploy tool. This should help with deployment, but
at runtime you need to ensure that the class will also be accessible to
all EJB-JARs that have code referencing it. You can put it into a JAR in
the lib/ext folder, or somewhere that is accessible to the class loader
named "lib.default-ext" (which you can define in the web console).
Or, put Information.class in both EJB-JAR files.