From where is this code - an ejb, servlet, standalone client?
Please post the jndi.properties that you are using...
i use standalone client..
Then you need jnp-client.jar on your classpath.
Make sure you don't have Sun J2EE RI in your classpath when you run your client.
Out of curiosity, is it also possible with JBoss to use:
to create the InitialContextFactory?
I know that this is not possible with WebLogic without
either using IIOP or giving weblogic.jar to the clients (which means that, should the App Server be upgraded then all clients would need a new weblogic.jar file too!).
So, I assume that, similarily, it is not possible with JBoss either....hence the existence of jnp-client.jar
I stand to be corrected on this...
(when I started on this route I must admit that I never dreamt for one minute that using JNDI to lookup a bean would be so proprietary....sigh....)