Here is my situation.
I can access an EJB through a Java application.

Java Application Client -> RMI -> --> EJBServer-> JNDI -> MyEJB

I do not need to specify the path to MyEJB because it is found though
the EJBServer

However when I run a similar client as a servlet instead of an
application, I get the message

Cannot lookup CategoryHome: javax.naming.CommunicationException [Root
exception is java.rmi.UnmarshalException: error unmarshalling return;
nested exception is:
 java.lang.ClassNotFoundException:
com.mytoc.ejb.category.JOnASCategoryBeanCategoryHome_Stub]

If I put the path to
com.mytoc.ejb.category.JOnASCategoryBeanCategoryHome_Stub in the
jserv.properties file, I can access the bean.

It seams strange that I would need to specify that path because for one
I don't need to when run as an application and two, I thought that the
EJBServer should find it.  I know that the servlet is communicating to
RMI and JNDI because I can access the UserTransaction object  by using
PortableRemoteObject.narrow().
By having to specify the path to the stub and skel files handled by
EJBServer there would be know way to load balance and have my EJBs on
remote machines.

Once again, I can make the servlet work if I set a classpath to Jonas
generated class files.
The EJBServer deploys a jar file called Category.jar which contains
com.mytoc.ejb.category.JOnASCategoryBeanCategoryHome_Stub.

Another observation:
If the classpath in the servlet environment points to a duplicate
Category.jar in a different location than the EJBServer deploys, the
servlet will work.  So, maybe the servlet needs the definitions of the
stub and skel files but actually accesses it through the EJBServer.
That is my conclusion. Has anybody else encountered a similar situation?

Paul-

----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to