Start New Discussion within our Software Development Community

Hi folks ,

I'm new to j2ee programming and using Netbeans 5.5 , i created a session bean program and deployed successfully in JOnAS application server but i'm not able to run the client program which invokes session bean (EJB module ).

when i run client program i'm getting the following error .

javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial 
        at javax.naming.spi.NamingManager.getInitialContext( 
        at javax.naming.InitialContext.getDefaultInitCtx( 
        at javax.naming.InitialContext.getURLOrDefaultInitCtx( 
        at javax.naming.InitialContext.lookup( 
        at SimpleSessionClient.Main.main( 
BUILD SUCCESSFUL (total time: 21 seconds)

but the same program runnig perfectly when i deploy in Java System Application Server(8.2(JSAS))

I included j2ee.jar and appserv-rt jar in classpath of client program for JSAS i don't know what are the jar files (which does the same function as,appserv-rt.jar ) which is to be included for JOnAS .

i'm struggling with this for the past two weeks . please tell me the solution .

Thanks in advance

You'll need to find those application specific client files AND the application specific environment setting you need for that server.
I can't help you with that, but the server documentation should be a logical first step.

Then there's the internet, especially the vendor suppost site (most of which have forums and/or wikis of some sort).

This article has been dead for over six months. Start a new discussion instead.