Hi:
I am having a small dillema when trying to stop JOnAS.  The scenerios are as
follows:
1.  I am running JOnAS as a Server from the command line where I am setting
the CLASSPATH to %JONAS_ROOT%\lib\JEREMIE_jonas.jar and sending the
following to the JVM
-Djava.naming.factory.initial=org.objectweb.jeremie.libs.services.registry.j
ndi.JRMIInitialContextFactory
(I am running JEREMIE!).  It runs fine and when I do CTRL-C it stops JOnAS
perfectly.

2. In this scenerio I am running the JOnAS as an NT Service using the
javaserv (http://www.kcmultimedia.com/javaserv/).  The wrapper class I have
written utilizes the same server class in the above scenerio.  When I try to
stop the JOnAS service I get the following error:

        javax.naming.NoInitialContextException: Cannot instatiate class:
org.objectweb.jeremie.libs.services.registry.jndi.JRMIInitialContextF
actory [Root exception is java.lang.ClassNotFoundException:
org/objectweb/jeremie/libs/services/registry/jndi/JRMIInitialContextFactory]

I have checked to ensure that the CLASSPATH and the
java.naming.factory.initial are correctly set and sent to the JVM.

The stopping method code follows:

   public static void stopJOnAS(
   )
   {
       Log.getInstance().debug("Stop JOnAS...");

       // stop jonas from a new thread giving this method a chance
       // to complete before the main thread.
       Thread stoper = new Thread(){
         public void run() {
           String admName = JONAS_NAME + Adm.ADMNAME_SUFFIX;
           try
           {
             InitialContext initialContext = new InitialContext();
             AdmInterface admI = (AdmInterface)
initialContext.lookup(admName);
             admI.stopServer();
             Log.getInstance().debug("JOnAS stopped.");
           }
           catch (Exception e)
           {
             System.err.println ("JonasServer.stopJOnAS : " + e);
           }
         }
       };
       stopper.start();
     }

Any help in this will be highly appreciated.

Thanks in advance.

Murad Meghani
Consultant
Compuware Corporation
15305 Dallas Parkway, Suite 900
Addison, Texas, 75001
972-960-0960 x1379
www.compuware.com

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