Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

rmi.NoSuchObjectException

 
Andres Gorzelany
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys !

This is the situation: i always ran my application on the same computer as my beans were deployed (JBoss) in this way:



and then



and finally:



Well, the problem is that now i have to run my app not in the same computer as JBoss, so i change "localhost" to "192.168.1.52" but this is i get when i try to start the application:

javax.naming.CommunicationException [Root exception is java.rmi.NoSuchObjectException: no such object in table]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:647)


The exception references to the second Code i write on this post, what i am doing wrong ? do i have to do more to connect to another JBoss Server?

Please Help me,

Thanks in advance
 
Andres Gorzelany
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone, please ?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to supply the environment variables to the InitialContext constructor. Check JBoss's documentation for this.
 
Andres Gorzelany
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Already do that, i think.. this is the whole code i wrote:



and the same when i try to connect to 192.168.1.52 but changing "localhost" to the IP address...
It's the only thing i change, but that do not works... but works ok with localhost.
 
Andres Gorzelany
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried this


and i get this that is Really strange!

javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connection refused to host: 127.0.0.1 ; nested exception is:
java.net.ConnectException: Connection refused: connect]


127.0.0.1 ? i am not connecting to my computer anymore, why i am getting this ? so i tried telnet to 192.168.1.52 on port 1099 and i got:


�?sr?java.rmi.MarshalledObject|??�?c?>??I?hashlocBytest?[BobjBytesq~?xp6<ur?[B�?
�T??xp?�?thttp://web:83/q~q~uq~??�?sr org.jnp.server.NamingServer_Stub??xrjava.r
mi.server.RemoteStub???��e?xr?java.rmi.server.RemoteObject?a?�
a3??xpw4
UnicastRe
f2 127.0.0.1 ?J??~?^��r�?x

Connection to host lost.


What do you think ?
[ September 12, 2005: Message edited by: Andres Gorzelany ]
 
Andres Gorzelany
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok the problem was in my freebsd's hosts file, once i got it right it works fine now
 
James Dean Moore
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you provide a detailed explaination of how to fix this problem?
 
Andres Gorzelany
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, as i said, the problem was on my FreeBSD HOSTS file: This is an example of good configuration:



Be sure of set this right.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic