EJB can be accessed in java application but not by a servlet.

jserv.properties

# CLASSPATH environment value passed to the JVM
# Syntax: wrapper.classpath=[path] (String)
# Default: NONE (Sun's JDK/JRE already have a default classpath)
# Note: if more than one line is supplied these will be concatenated using
#       ":" or ";" (depending wether Unix or Win32) characters. JVM must be
#       able to find JSDK and JServ classes and any utility classes used by
#       your servlets.
# Note: the classes you want to be automatically reloaded upon modification
#       MUST NOT be in this classpath or the classpath of the shell
#       you start the Apache from.
#
wrapper.classpath=/home/apache/libexec/ApacheJServ.jar
wrapper.classpath=/usr/local/etc/JSDK2.0/lib/jsdk.jar

#JDBC
#MySQL
wrapper.classpath=/usr/local/etc/mm.mysql.jdbc-1.2a/mysql.jar
#postgreSQL
wrapper.classpath=/usr/local/pgsql/jdbc/jdbc6.5-1.2.jar

#MyServlets
#wrapper.classpath=/home/projects/servlets/mytoc/mytoc.jar

#EJB
wrapper.classpath=/usr/local/etc/ejb/lib/jdbc2_0-stdext.jar
wrapper.classpath=/usr/local/etc/ejb/lib/jta-spec1_0_1.jar
wrapper.classpath=/usr/local/etc/ejb/lib/jndi.jar
wrapper.classpath=/usr/local/etc/ejb/lib/rmiregistry.jar
wrapper.classpath=/usr/local/etc/ejb/lib/providerutil.jar
wrapper.classpath=/usr/local/etc/ejb/jonas_jdk1.2/lib/RMI_jonas.jar

#end jserv.properties

#zone1.properties

repositories=/home/projects/servlets
repositories=/home/projects/ejb

#EjbClient - this gives the error
servlet.ejbclient.code=com.ejbtest.EjbClient

#end zone1.properties


#runCategories.sh - this works
_CLASSPATH=/usr/local/etc/ejb/lib/jdbc2_0-stdext.jar:/usr/local/etc/ejb/lib/jta-spec1_0_1.jar:/usr/local/etc/ejb/lib/jndi.jar:/usr/local/etc/ejb/lib/rmiregistry.jar:/usr/local/etc/ejb/lib/providerutil.jar:/usr/local/etc/ejb/jonas_jdk1.2/lib/RMI_jonas.jar

java -classpath $_CLASSPATH:/home/projects/ejb com.mytoc.ejb.category.Client
CategoryHome 2

I run EJBServer from /home/projects/ejb/mytoc
this directory contains Category.jar and Category.ser
and it says that the Category bean was loaded

*note: I found that I need to place Category.ser in the directory that I run
EJBServer even though it is contained in the Category.jar file. For some
reason the EJBServer does not find the .ser file contained in the .jar file/


The beans, stub and skel files are in com.mytoc.ejb.category package in the
Category.jar file

Thanks for your help
Paul-


Jim Richards wrote:

> Can you post your jserv.properties file and your <zone>.properties file,
> and give a bit of information about your directory structure (where are
> the beans, stub, skel class files kept), otherwise we don't know where
> your problem is.
>
> At 10:02 PM 13/03/00 -0500, Jchart Staff wrote:
> >When I try to access an Entity Bean from a servlet (Apache/Jserv) I get
> >javax.naming.CommunicationException
> >java.lang.ClassNotFoundException:
> >com.mytoc.ejb.category.JOnASCategoryBeanCategoryHome_Stub]
> >
> >I can access it no problem using a Java application program but not a
> >servlet.
> >I sounds like a classpath problem but the paths are set similar in both
> >environments.  Then I thought that it may be a permissions problem but I
> >don't know.
>
> --
> Mr Grumpy is now a virtual personality ...
>  http://www.cyber4.org/members/grumpy/camera/index.html
>
> ----
> 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".

----
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