dcsimg
Running EJBs in VAJ
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sumana_Reddy
Posted On:   Sunday, January 27, 2002 12:22 AM

I wrote a simple session bean and tested in VAJ using Test Client option that is present in VAJ.It's working perfect.I wrote a client class and when tried to access the EJBs Exception is thrown saying "javax.naming.NoInitialContextException: Cannot instantiate class: com.ibm.ejs.ns.jndi.CNInitialContextFactory [Root exception is java.lang.ClassNotFoundException: com.ibm.ejs.ns.jndi.CNInitialContextFactory]"


Why is it not able to find the CNInitialContextFactory class.


Please Help

Re: Running EJBs in VAJ

Posted By:   Eric_Rizzo  
Posted On:   Sunday, January 27, 2002 07:53 PM

Assuming the client class you wrote is an executable class (has a main() method), then you have to make sure the Project that contains the CNInitialContextFactory class is on the test client's runtime classpath.

See Why do I get java.lang.NoClassDefFoundError exceptions when I run my code in VisualAge for Java? for more info on setting an application's runtime classpath.
About | Sitemap | Contact