[size=large] 我把程序部署到JBOSS4.2.2G 服务器上去了。当我使用main方法进行测试时候报错了。[/size]
Exception in thread "main" 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(NamingManager.java:657)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:197)
at com.ejb.test.EjbTest.selectScustomer(EjbTest.java:19)
at com.ejb.test.EjbTest.main(EjbTest.java:25)
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
... 5 more
[size=large]到网上查了下资料,说是包的问题。 我不不知道是不是,但我又不知道删除那个包!!!求解
现在发下包[/size]
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\resources.jar
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\rt.jar
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\jsse.jar
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\jce.jar
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\charsets.jar
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\ext\dnsns.jar
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\ext\localedata.jar
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\ext\sunjce_provider.jar
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\ext\sunmscapi.jar
com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\ext\sunpkcs11.jar
com.genuitec.eclipse.j2eedt.core_8.6.0.me201007292038\data\libraryset\EE_5\javaee.jar
com.genuitec.eclipse.j2eedt.core_8.6.0.me201007292038\data\libraryset\EE_5\jsf-impl.jar
com.genuitec.eclipse.j2eedt.core_8.6.0.me201007292038\data\libraryset\EE_5\jsf-api.jar
com.genuitec.eclipse.j2eedt.core_8.6.0.me201007292038\data\libraryset\EE_5\jstl-1.2.jar
如果还需要别的什么的请说,求解决!!!!!!!!!!小弟在此谢谢了! 可以加我MSN帮忙解决也行 qcs4712248@live.com