日期:2014-05-20  浏览次数:20969 次

jboss 异常: javax.naming.NameNotFoundException:
今天开始接触EJB,下了jboss-4.0.5.GA ,然后把端口改成了8082 可按照视频里步骤走下去,就是报异常了
异常如下:
Java code

Exception in thread "main" javax.naming.NameNotFoundException: FirstEjbBean not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:267)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
    at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
    at sun.rmi.server.UnicastRef.invoke(Unknown Source)
    at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at com.xxm.simonton.FirstEjbClient.main(FirstEjbClient.java:14)


我知道作为一个新手学知识不能浮躁,可是我这问题在google baidu里都搜了,按照步骤怎么都是解决不了,
jboss 也换了几个了 还是不行,都郁闷一天了
  对这个异常懂的前辈多指点下,希望不会是我操作系统问题,实在是不想重装了

JBOSS版本号:jboss-4.0.5.GA 
JBOSS_HOME:jboss-4.0.5.GA
端口该成:8082
异常:javax.naming.NameNotFoundException

JNDI.properties
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=localhost



------解决方案--------------------
呵呵 我也是今天接触ejb的,也报这个错!
我早网上找了好久没找出问题来,也发了个贴,也没有人回!!!
我帮你顶!
------解决方案--------------------
没遇见这样的问题,应该是配置的问题,帮顶