users@glassfish.java.net

[gf-users] EJB module uses remote interface in a different JAR

From: thufir <hawat.thufir_at_gmail.com>
Date: Wed, 25 Feb 2015 15:46:18 -0800

The EJB module I built uses a remote interface. Because that remote
interface is in a different JAR, that library JAR containing the
interface must be placed in Glassfish first so that the EJB module (JAR)
can find the library? Or, rather, so that Glassfish can find that
library for the EJB.

I'm getting an error:

   Error in annotation processing: {0}.
java.lang.NoClassDefFoundError: net/bounceme/doge/greeter/ejb/GreeterRemote


which I take to mean that Glassfish cannot find the class GreeterRemote
because it's not on the classpath...for the EJB?

How do I add the library to glassfish for the EJB?


I googled and found:

http://www.coderanch.com/t/507913/EJB-JEE/java/Glassfish-return-java-lang-NoClassDefFoundError

which I think is the exact problem, but that solution didn't seem to
work for me; he puts the library JAR in:

<glassfish_home>/domains/domain1/lib


I don't mind reading the glassfish manuals, but thought I'd ask here
before digging through them.



thanks,

Thufir