java ee - EJB modules cannot find class from another EJB module on glassfish -
i have ejb 3 module deployed on glassfish 2.1 server.
i'm trying deploy second ejb module, depends on first module, deployment fails java.lang.noclassdeffounderror class can found in first ejb module.
what's best way solve dependecy between 2 ejb modules? want deploy them separately, , not have them in same ear.
more specifically, have dependecy injection of ejb first ejb module in 1 of ejbs of second ejb module:
@ejb (name="ejb/firstejb") private firstejbremote ejb;
but during deployment noclassdeffounderror class firstejbremote:
error in annotation processing: java.lang.noclassdeffounderror: firstejbremote
miljen mikic has point whole classloaders loading commonly named classes if wouldn't isolated.
but glassfish, should in case place first ejb module in directory glassfish_home/domains/domain1/lib/applibs. during deployment of second ejb module can specify first ejb module's jar should loaded ejb module being deployed.
that's called application-specific class loading, , here's more it: http://docs.oracle.com/cd/e19798-01/821-1752/gatej/index.html
Comments
Post a Comment