For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 6 replies, 3 voices, and was last updated 18 years, 1 month ago by
Loyal Water.
-
AuthorPosts
-
shayan672Memberi am new to ejbs. read the tutorial “http://www.myeclipseide.com/documentation/quickstarts/ejb3/” for having a start on ejbs 3.0. i am using Application server “jboss-4.2.2.GA” and myeclipse ide “MyEclipse_5.5.1GA”.
i have created the session bean and deployed it successfully. but now when i run the client, i get the following exceptionjavax.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(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.myeclipseide.ejb3.MyBeanClient.main(MyBeanClient.java:16)can anyone tell the reason for this exception and what to do in order to slve this problem. if the answer can be please in detail. thanks
July 8, 2008 at 9:39 am #286849
Loyal WaterMemberCan you paste the entire error here for me. Could you cross post this query on the ejb forums as well.
Can you go to MyEclipse > Installation Summary > Installation Details and paste the information here for me.
July 8, 2008 at 9:43 am #286850
Loyal WaterMemberYou can go through this as well:-
http://forum.java.sun.com/thread.jspa?threadID=5012497July 10, 2008 at 3:24 pm #286989
shayan672Memberits the entire error that i have pasted already here. i face this error onlywhen ever i try to run the ejb client.
July 11, 2008 at 1:49 pm #287030
Jean-Michel PargnyMembershayan672:
This is the error you get from JBoss when you omit the jndi.properties file (right under src). This file should contain the following entries:java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=localhost:1099
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfacesCheers,
Jean-MichelJuly 15, 2008 at 12:47 am #287125
shayan672Memberwell, after adding the jndi.properties file under the src, now i get the following exception
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 com.myeclipseide.ejb3.MyBeanClient.main(MyBeanClient.java:17)
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
… 5 more?????????????
July 15, 2008 at 9:48 am #287139
Loyal WaterMembershayan672,
There is a user who has listed out the jars that need to be present to overcome this error. Can you make sure your not missing any of these jars:-
http://www.jboss.com/?module=bb&op=viewtopic&t=57223 -
AuthorPosts
