LifecycleListener, @EJB and Classpaths in Glassfish (SJAS 9)
843833Jan 23 2007 — edited Feb 10 2007Hi,
I'm trying to call my EJB from a Glassfish Lifecycle listener module, but I'm having trouble with the class lookups [classpath].
I've deployed an EJBModule with the EJBs in it deploys and works ok.
Then I am creating Lifecycle module and I am injecting my EJB using @EJB annotation. Everything works fine. The lifecycle module loads and does some logging. Till all is OK ...
However, when I try to call some of the business methods of my injected EJB I am getting: NoClassDefFoundError error in my Lifecycle module.
My Lifecyclemodule is installed in the $install/domains/domain1/lib directory. I can get around this by replicating the Remote interface class in the lifecycle module or copying the ejbmodule to the lib directory, but this doesn't seem good work around for me.
Can anyone help, please?
Thanks!