Hi,

I just fixed the problem, it was not a JBoss problem (of course) =)

It's a bugg in JWS,
JWS does something wrong with the classloaders.

Before creating any InitialContext, 
this code snipped must be included:
(Found it on the discussion forum for JWS,
http://forum.java.sun.com/read/56761/qAWFW4miqiQgAAY-i#LR).)


try {
  final ClassLoader jnlpCL = this.getClass().getClassLoader();
  java.awt.EventQueue eq =
java.awt.Toolkit.getDefaultToolkit().getSystemEventQueue();
  eq.invokeAndWait(new Runnable() {
    public void run() {
      Thread.currentThread().setContextClassLoader(jnlpCL);
    }
  });
}
catch (Exception e) {
}

We are evaluating JWS and it looks good, 
but there are a few bugs and it is not so stable, yet.

thank you for your interest

// Johan



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Michel &
> Anke
> Sent: den 22 mars 2001 21:04
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] JBoss and Java Web Start
> 
> 
> Hi,
> 
> I think you need to set the option 
> -Djavax.naming.initialcontext to the class
> that implements the initialcontext (f.e. 
> javax.naming.InitialContext). I'm not
> sure I typed the right option name, so check the JNDI spec for this.
> 
> Do you like Web Start?
> 
> Michel de Groot
> 
> 
> > Hi !
> >
> > We are trying to get a client application communicating 
> with JBoss to work
> > with Java Web Start.
> >
> > When creating the InitialContext,
> > javax.naming.NoInitialContextException...
> > (Se stacktrace).
> >
> > When we directly run the application, there is no problem.
> >
> > We tried to unpack the jnp-client and jta-spec files and 
> included them
> > into our own application jar file, and the same error occured !
> >
> > It really looks like that the file isn't loaded into the 
> Classpath.. but why
> > ?
> >
> > Anyone having any ideas ?
> >
> > Regards
> > // Johan
> >
> > ** System configuration
> >         Win2k
> >         JDK1.3
> >         JBoss 2.0 FINAL and JBoss 2.1 (Tried it both, same problem).
> >
> > ** The files that are included in the client classpath
> >         jboss-client.jar
> >         ejb.jar
> >         jnp-client.jar
> >         jta-spec1_0_1.jar
> >
> > ** Code for creating the InitialContext
> > ...
> >
> >         Properties contextProps = new Properties();
> >
> >
> > 
> contextProps.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.inte
> rfaces.NamingC
> > ontextFactory");
> >         contextProps.put("java.naming.factory.url.pkgs",
> > "org.jboss.naming");
> >
> >         if (System.getProperty(Context.PROVIDER_URL) == null) {
> >                 contextProps.put(Context.PROVIDER_URL, "localhost");
> >         }
> >
> >         iContext = new InitialContext( contextProps ); 
> <---- Exception is
> > thrown
> >
> > ...
> >
> > ** Stack trace
> > javax.naming.NoInitialContextException: Cannot instantiate class:
> > org.jnp.interfaces.NamingContextFactory.  Root exception is
> > java.lang.ClassNotFoundException: 
> org.jnp.interfaces.NamingContextFactory
> >
> > at java.net.URLClassLoader$1.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> > at java.lang.Class.forName0(Native Method)
> > at java.lang.Class.forName(Unknown Source)
> > at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
> > at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
> > at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
> > at javax.naming.InitialContext.init(Unknown Source)
> > at javax.naming.InitialContext.<init>(Unknown Source)
> > at
> > 
> se.speakup.kvalitid.jndi.InitialContextFactory.getInitialConte
> xt(InitialCont
> > extFactory.java:44)
> >
> > ________________________________________________
> > johan.nordin
> >
> > SpeakUp DevCon AB
> > Nygatan 3, 803 20 Gävle
> > Tel +46-(0)26-600 690, Fax +46-(0)26-600 691
> > Mobile +46-(0)70-778 17 70
> > E-mail [EMAIL PROTECTED], Web www.speakup.se
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to