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.interfaces.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.getInitialContext(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