I fixed this problem, the bug is come from the classloader attached in the
current Thread in NT Service can not load the jndi.jar , I had to recreate
a new classloader for NT Service of Jonas and load the jndi.jar  before the
Jonas started. After then the Client could connected and run the program
correctly. The code look like this :

 Thread t=Thread.currentThread();
 t.setContextClassLoader(new Myclassloader());

try
{
   org.objectweb.jonas.server.Server.main(new String[1]); // start Jonas
}
catch (Throwable th)
{...}


Conclusion :
 for Jonas Run as NT Service We should have :

1) A new classloader for NT Service of RMIRegistry,
2) A new classloader for NT Service of Jonas Service.

-----------------------------------------------------------------------------------
Best Regards ! Bonne Réception
Mu-Hsien HWANG
------------------------------------------------------------------------------




Mu-Hsien Hwang
12/02/2001 16:56

Pour :    [EMAIL PROTECTED]
cc :  [EMAIL PROTECTED]
Objet :   Re : problem when running Jonas as NTService


The problem with NT Service, I found the solution :
 I had to recreate a new  classloader for the NT Service of RMIRegistry and attached 
it for current Thread and  after then
the NT Service of Jonas could started correctly.

But now i have a new problem : when a test Client  to connect to NT Service of Jonas, 
I had the following message error  :

java -Dinstall.root=x:\Generated\lib\i386\checked 
-Djava.security.policy=x:\Generated\lib\i386\checked/java.policy com.
bull.sct.samples.jonas.eb.ejb.ClientAccount AccountExplHome
Getting a UserTransaction object from JNDI
javax.naming.NameNotFoundException: javax.transaction.UserTransaction
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java :93)
        at com.sun.jndi.rmi.registry.RegistryContext.lookup(RegistryContext.java :101)
        at javax.naming.InitialContext.lookup(InitialContext.java:350)
        at com.bull.sct.samples.jonas.eb.ejb.ClientAccount.main(ClientAccount.java:92)
Cannot lookup UserTransaction: javax.naming.NameNotFoundException: 
javax.transaction.UserTransaction



---------------------- Réacheminé par Mu-Hsien Hwang/FR/BULL sur 12/02/2001
16:37 ---------------------------


Mu-Hsien Hwang
06/02/2001 17:50

Pour :    [EMAIL PROTECTED]
cc :
Objet :   problem when running Jonas as NTService


I have the problem NT Service, when I try to run the Jonas as NT Service, I
have already RmiRegistry run as NT Service,  and I got an exception message
:
javax.naming.CommunicationException.  Root exception is java.rmi.ServerException: 
RemoteEx
ception occurred in server thread; nested exception is:
        java.rmi.UnmarshalException: error unmarshalling arguments; nested exception 
is:
        java.lang.ClassNotFoundException: 
org.objectweb.jonas_tm.TransactionFactoryImpl_Stub

But, this class is in RMI_Jonar.jar, and this file is in my classpath for
RmiRegistry and the Jonas Service.

I try find the solution from the mailling list, but the nobody talked about
it.




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