Dirk Koschuetzki wrote:
>
> Hello,
>
> I try to figure out a way to deploy new beans to a running JOnAS
> server. My current understanding is, that I may use the JonasAdmin to
> deploy a new bean encapsulated within an ejb-jar file.
>
> The problem is that I have to add the ejb-jar file to the CLASSPATH of
> the rmiregistry and to the EJBServer or the deployment fails.
>
> So the question is simple: May I deploy new bean with JonasAdmin
> without editing the CLASSPATH of the servers?
>
> A more detailed explanation of my current deployment process:
> (Classpath in all cases is shown at the end of the file, does not
> contain the new bean!)
>
> * First try:
>
> Start rmiregistry:
> $ registry
>
> Start JOnAS:
> $ EJBServer
>
> Deploy new bean:
> $ JonasAdmin -n jonas-at-moon -a test2.jar
>
> Result in the JonasAdmin shell:
> admI.addBeans: java.rmi.ServerException: RemoteException occurred in
> server thread; nested exception is:
> java.rmi.RemoteException: cannot create a new JOnAS container
>
> Result in the EJBShell (with tracing enabled):
> Adm.ping
> Adm.addBeans
> CompNamingContext rebind filename
> EJBService: createContainer
> CompNamingContext lookup filename
> Cannot read the deployment descriptors 'test2.jar':
> org.objectweb.jonas.deployment.api.DeploymentDescException:
> META-INF/ejb-jar.xml resource not found
>
> The source code of JOnAS shows that the ejb-jar.xml file should be
> loaded from the classpath and this load operation failed.
>
> * Second try:
>
> Add the ejb-jar file to the CLASSPATH of the two shells for
> registry and EJBServer:
>
> Same problem as above. The JOnAS Server cannot read the deployment
> descriptor. THIS is strange to me, as the descriptor is available
> within the ejb-jar file and the ejb-jar file is encapsulated in the
> CLASSPATH of the registry and the JOnAS server.
>
> * Third try:
>
> Add the ejb-jar file to the CLASSPATH of the shell for JonasAdmin:
>
> Same problem as above. This is strange to me to.
>
> * Fourth try:
>
> Adding the ejb-jar file to the jonas.property
> "jonas.beans.descriptors" in the installation location of JOnAS:
>
> The server starts and the bean is available without running JonasAdmin.
>
> My problem is: I do not want to use the fourth process. :-(
> So, what do I have to do to deploy a new bean without restarting the
> servers?
>
> Regards
> Dirk
>
> Ps.: The Server is JOnAS 2.1.1 running on linux, an Oracle 8i R2
> is connected as the datasource and running on the same machine,
> JOnAS uses RMI and the Sun JDK 1.2.2 ist used.
>
> PPs.: CLASSPATH for JOnAS and rmiregistry.
> /opt/jonas-2-1-1
> /opt/jonas-2-1-1/examples/classes
> /usr/local/lib/idb.jar
> /usr/local/lib/idbexmpl.jar
> /u01/app/oracle/product/8.1.6/jdbc/lib/classes111.zip
> /usr/local/lib/jndi.jar
> /usr/local/lib/providerutil.jar
> /usr/local/lib/rmiregistry.jar
> .
> /home/dk01/Working/medialift/build/jars/parser.jar
> /home/dk01/Working/medialift/build/jars/jaxp.jar
> /home/dk01/Working/medialift/build/classes
> /opt/sun-jdk1.2.2/jre/lib
> /opt/sun-jdk1.2.2/jre/lib/rt.jar
> /opt/sun-jdk1.2.2/jre/lib/i18n.jar
> /opt/sun-jdk1.2.2/lib/
> /opt/sun-jdk1.2.2/lib/tools.jar
> /opt/sun-jdk1.2.2/lib/jpda.jar
> /opt/sun-jdk1.2.2/lib/dt.jar
> /usr/share/java/postgresql.jar
> /opt/junit-3.2/junit.jar
> /opt/jonas-2-1-1/lib/RMI_jonas.jar
Hi,
I think that the following error:
> Cannot read the deployment descriptors 'test2.jar':
> org.objectweb.jonas.deployment.api.DeploymentDescException:
> META-INF/ejb-jar.xml resource not found
>
is due to the fact that test2.jar is not in the directory where
you have launched the EJBServer
You must give as "-a" parameter of JOnASAdmin an absolute path to the
test2.jar
or a relative path to the directory where you have run EJBServer.
Unfortunately in this case, ejb-jar.xml will be found but
you may have problem if registry has been launched without
the visibility of test2.jar
I am afraid you will have this sort of exception:
java.lang.ClassNotFoundException: xxx.yyy.JOnASZZHome_Stub]
I am not sure that you can bypass this problem by using
-Djava.rmi.server.codebase when you start EJBServer.
So I think that if you want to deploy new beans without
restarting the server you must de-jar the ejb-jar file
in order to install the classes in a place viewed via
the CLASSPATH of the registry and EJBServer,
and deploy the bean in the running server via
JonasAdmin -a xxx.xml
This may be considered as a bug in JOnAS or a restriction.
As you know JOnAS is in open source and all contributions
are welcome! and we'll be very happy if someone in the
jonas-users community want to resolve this problem....
Best regards,
--
Philippe
Philippe Coq Evidian Phone: (33) 04 76 29 78 49
Bull S.A - 1 rue de Provence - 38432 Echirolles Cedex France
Download our EJBServer at http://www.objectweb.org
----
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".