|
I'm having this error as explained
below.
I have written a Stateless Session
EJB. The package name is "com.dyt.cw" and appears in each of the following
EJB classes.
1. AutoOwner.java (Remote
interface)
2. AutoOwnerHome.java (Home
interface)
3. AutoOwnerEJB.java (Bean
implementation class)
4. AutoOwnerInfo.java (a value
object and the only external class)
I have created ejb jar file
AutoOwner.jar that does include the AutoOwnerInfo external class (knowing
that if external classes are included in the jar file, then it doesn't
require to specify these explicitly in the WL CLASSPATH) and I'm able to
successfully deploy it in WebLogic 5.1. I'm also able to access it using a Java
client application (of course in that case AutoOwner.jar is explicitly
specified in the client JVM CLASSPATH). But when I tried to access it
through JSP page (that's also deployed on the WebLogic AS), NoClassDefFound
exception is raised for AutoOwnerInfo class. However if I explicitly
specify the classpath through weblogic.class.path property (using
startWebLogic.cmd file), then the problem is solved. Please not that I have got
the "import com.dyt.cw.*" statement in the relevant JSP page (and it's compiled
successfully).
Now I have got the following
questions.
1. If I use an external class for
an Entity EJB, then no exception is raised in that case. I have been using
Entity EJBs with values object classes and these are accessed successfully
through JSP pages (without requiring any explicit classpath settings). But in
case of Stateless Session EJB "NoClassDefFound" exception is raised for the
external class i.e. AutoOwnerInfo class. Does Session EJB have a different
mechanism? (I don't think it should have.)
2. If the external class is not
included in the ejb jar file (and not deployed with the EJB), then there has
been a genuine reason for NoClassDefFound exception. But once I have
included it in jar file, it should be accessible to WL classloader (both to EJB
container as well as JSP container) without an explicit classpath setting. Is
there anything wrong with this approach?
Please let me know if some one has
got a reason for it.
Thanks
Zahid.
|
- SQLCodes from Entity Beans Zahid Iqbal
- SQLCodes from Entity Beans Steve Brown
- Re: SQLCodes from Entity Beans Krishnan Subramanian
