I wrote a very simple stateless session bean to test the IDE.
It only has 1 business method and i followed the steps in the java boss IDE tutorial to set up the jndi-name etc and it deploys fine.
Then i wrote a simple client application in java, that is supposed to call that 1 method.
But i get a problem with initializing the Naming Context. i took the method from the o'reilly book"Enterprise JavaBeans" 2002 edition.
it works as follows
public static Context getInititalContext() throws NamingException{ Properties p = new Properties( ); try { p.load(new java.io.FileInputStream("C:/jboss6/server/default/conf/jndi.properties")); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } return new InitialContext(p); }
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory ] 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 Client_1.getInitialContext(Client_1.java:48)