急请Banq解答,多谢!

04-11-03 tbanhui

我现在做一个J2EE的项目,使用swing客户端调用远程的会话bean。当swing客户端在JBoss在同一台电脑上的时候,一切都正常,但是当我使用swing调用局域网内的另外一台JBoss服务器的时候则会发生如下的异常,我已经可以通过这样的地址http://192.168.1.100:9080/web-console/访问目标JBoss服务器了。

非常着急。。。。。。。。。。。。

异常信息:

com.sunrise.amrdcs.util.JndiLookupException: Look up ejb home object error:ComSetupEJB

Current settings:{}

at com.sunrise.amrdcs.util.HomeFactory.lookupHome(HomeFactory.java:233)

at com.sunrise.amrdcs.util.HomeFactory.lookupHome(HomeFactory.java:191)

at com.sunrise.amrdcs.gui.para.CommControler.getCommControler(CommControler.java:56)

at com.sunrise.amrdcs.gui.para.CommControler.<init>(CommControler.java:46)

at com.sunrise.amrdcs.gui.para.CommControler.getInstance(CommControler.java:33)

at com.sunrise.amrdcs.AmrProject.initialization(AmrProject.java:188)

at com.sunrise.amrdcs.AmrProject.main(AmrProject.java:160)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)

Caused by: javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]

at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:648)

at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)

at javax.naming.InitialContext.lookup(InitialContext.java:347)

at com.sunrise.amrdcs.util.HomeFactory.lookupHome(HomeFactory.java:221)

... 11 more

Caused by: java.rmi.NoSuchObjectException: no such object in table

at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)

at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)

at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)

at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)

at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:529)

... 14 more

java.lang.Exception: Look up ejb home object error:ComSetupEJB

Current settings:{}

at com.sunrise.amrdcs.gui.para.CommControler.getCommControler(CommControler.java:67)

at com.sunrise.amrdcs.gui.para.CommControler.<init>(CommControler.java:46)

at com.sunrise.amrdcs.gui.para.CommControler.getInstance(CommControler.java:33)

at com.sunrise.amrdcs.AmrProject.initialization(AmrProject.java:188)

at com.sunrise.amrdcs.AmrProject.main(AmrProject.java:160)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)

java.lang.Exception: Look up ejb home object error:ComSetupEJB

Current settings:{}

at com.sunrise.amrdcs.gui.para.CommControler.getInstance(CommControler.java:40)

at com.sunrise.amrdcs.AmrProject.initialization(AmrProject.java:188)

at com.sunrise.amrdcs.AmrProject.main(AmrProject.java:160)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:324)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)

tbanhui
2004-11-03 15:57

当我把swing客户端移到JBoss服务器上、再修改swing部分的JBoss服务器的地址为localhost后,又什么问题都没有了,到底怎么解决这个问题,急请有经验的大侠们多发表意见!

banq
2004-11-09 10:44

需要将JNDI.properties放在客户端的classpath中,同时注意JBoss的安全访问限制