hi, I have build an EJB that i deployed on my jBoss application server (version: jboss-4.0.3RC2). I have also written a nice client as end user application (swing client). I use eclip 3.1 as java editor. When I run my client application from within eclips al works fine. My remote bean on the jBoss server gets contacted and I am able to launch all buisness methods from the bean. But When I package my client application in an executable jar, the bean can not be contacted. My client jar has contains the jbossall-client.jar. The error that I get is = Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
I sure would like to solve this. How can I fix this? Thanks for reading my issue. the code that fails is the following: | protected Context getInitialContext() throws Exception { | try{ | Hashtable<String, String> props = new Hashtable<String, String>(); | props.put( | Context.INITIAL_CONTEXT_FACTORY, | "org.jnp.interfaces.NamingContextFactory"); | props.put( | Context.URL_PKG_PREFIXES, | "org.jboss.naming:org.jnp.interfaces"); | props.put(Context.PROVIDER_URL, "jnp://" + this.Server + ":" + this.Port); | Context ctx = new InitialContext(props); | return ctx; | }catch(Exception e){ | | BufferedWriter out = new BufferedWriter(new FileWriter("getInitialContext.txt")); | try { | | out.write(e.getMessage()); | | out.close(); | } catch (IOException ee) { | | } | return null; | } | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3908299#3908299 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3908299 ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user