cancel
Showing results for 
Search instead for 
Did you mean: 

EJB(3.0) Session Bean error : javax.naming.NoInitialContextException

Former Member
0 Kudos

Hi Guru's

I need your help to fix my first EJB programme

I have created a DC project for EJB 3.0. (SampleClass & SampleClassRemote)

I have created DC Java project for calling the session class.

But I think the lookup string is wrong. When I checked "ejb-j2ee-engine.xml" not shown any JNDI property like old EJB project.

String lookupString = "ejb:/interfaceName=com.test.ejb01.SampleClass";

and getting 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 "

I have attached the two projects with this.If possible can you please check that code and correct me?

below is the project structure of my programme

Thanks in Advance:

Jacob

Accepted Solutions (1)

Accepted Solutions (1)

Sreejith1
Contributor
0 Kudos

Hi,

One more thing

You can verify it in NWA

Troubleshooting>Java>JNDI Browser

and select your application it will give the details

Regards,

Ram

Answers (1)

Answers (1)

Sreejith1
Contributor
0 Kudos

Hi Jacob,

usually it will be  <package>.<remote>

for you, com.test.ejb01.SampleClassRemote

Object obj = ctx.lookup("ejb:/interfaceName=com.test.ejb01.SampleClassRemote");