有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

javajavax。命名。NameNotFoundException:com。javacodegeeks。实例服务AccountServiceRemote

我已经完成了这个教程,它在运行时崩溃了。我尝试了下载的教程代码,它也崩溃了。教程中的代码已经完成

http://examples.javacodegeeks.com/enterprise-java/ejb3/ejb-tutorial-beginners/

我用过

  • NetBeans 8.1版
  • 玻璃鱼4.1.1
  • JDK1.7
  • Windows 8.1

我可以构建和运行Servlet,在Servlet中填充两个字符串

单击“创建”后,我得到以下信息: Image of the error, in the web browser

完整的错误消息:

type Exception report
messageInternal Server Error
descriptionThe server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Error instantiating servlet class com.javacodegeeks.example.tester.AccountController
root cause
com.sun.enterprise.container.common.spi.util.InjectionException: Error creating managed object for class: class com.javacodegeeks.example.tester.AccountController
root cause
com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Remote ejb-ref name=com.javacodegeeks.example.tester.AccountController/accountService,Remote 3.x interface =com.javacodegeeks.example.service.AccountServiceRemote,ejb-link=null,lookup=,mappedName=,jndi-name=com.javacodegeeks.example.service.AccountServiceRemote,refType=Session into class com.javacodegeeks.example.tester.AccountController: Lookup failed for 'java:comp/env/com.javacodegeeks.example.tester.AccountController/accountService' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}
root cause
javax.naming.NamingException: Lookup failed for 'java:comp/env/com.javacodegeeks.example.tester.AccountController/accountService' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=com.javacodegeeks.example.tester.AccountController/accountService,Remote 3.x interface =com.javacodegeeks.example.service.AccountServiceRemote,ejb-link=null,lookup=,mappedName=,jndi-name=com.javacodegeeks.example.service.AccountServiceRemote,refType=Session' .  Actual (possibly internal) Remote JNDI name used for lookup is 'com.javacodegeeks.example.service.AccountServiceRemote#com.javacodegeeks.example.service.AccountServiceRemote' [Root exception is javax.naming.NamingException: Lookup failed for 'com.javacodegeeks.example.service.AccountServiceRemote#com.javacodegeeks.example.service.AccountServiceRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: com.javacodegeeks.example.service.AccountServiceRemote#com.javacodegeeks.example.service.AccountServiceRemote not found]]]
root cause
javax.naming.NamingException: Exception resolving Ejb for 'Remote ejb-ref name=com.javacodegeeks.example.tester.AccountController/accountService,Remote 3.x interface =com.javacodegeeks.example.service.AccountServiceRemote,ejb-link=null,lookup=,mappedName=,jndi-name=com.javacodegeeks.example.service.AccountServiceRemote,refType=Session' .  Actual (possibly internal) Remote JNDI name used for lookup is 'com.javacodegeeks.example.service.AccountServiceRemote#com.javacodegeeks.example.service.AccountServiceRemote' [Root exception is javax.naming.NamingException: Lookup failed for 'com.javacodegeeks.example.service.AccountServiceRemote#com.javacodegeeks.example.service.AccountServiceRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: com.javacodegeeks.example.service.AccountServiceRemote#com.javacodegeeks.example.service.AccountServiceRemote not found]]
root cause
javax.naming.NamingException: Lookup failed for 'com.javacodegeeks.example.service.AccountServiceRemote#com.javacodegeeks.example.service.AccountServiceRemote' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: com.javacodegeeks.example.service.AccountServiceRemote#com.javacodegeeks.example.service.AccountServiceRemote not found]
root cause
javax.naming.NameNotFoundException: com.javacodegeeks.example.service.AccountServiceRemote#com.javacodegeeks.example.service.AccountServiceRemote not found
note The full stack traces of the exception and its root causes are available in the GlassFish Server Open Source Edition 4.1.1 logs.

共 (0) 个答案