Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Issue with a Java RMI application not working on other machines  RSS feed

 
Josh Davidson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I have an rmi application that uses the ClassFileServer provided by sun as the codebase argument to the server class I use to bind a remote data object to the rmiregistry. On my machine, all parts of the program work as expected. However, when I distribued my java source hierarchy and the text file containing the commands to run and execute it to three different machines, I received the infamous unmarshalling exception when the server tried to bind a remote data object. For the life of me, I can't figure out the root of this problem. I'm only distributing the source, no classes, and the commands entered to build and run the application are exactly the same. I've tried running this on different drives of my system and had no issues. I should also indicate that I tried setting the codebase=file:///classes/ instead of using the ClassFileSever and it still didn't work on these three other machines.

All of the machines are running java 1.4.2_0x.
 
Josh Davidson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should mention that the server is attempting to bind to localhost and not an incorrect ip.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you're taking the source code and building it on another machine and running both the client and the server on the new machine? It sounds like you have something set in the environment of the machine that is running correctly that is not set on the others. Check if any CLASSPATH, JAVA_HOME, etc. system varialbes exist, and if they do, that they are equivalent. Also, try "java -version" on the command line to make sure the same version of Java is being run on all machines.
 
Josh Davidson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
They are both 1.4.2 versions of Java (mix of _04 and _06). No CLASSPATH environment variable is set, but I would need to check JAVA_HOME. These are all win2k machines.
 
Josh Davidson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, here's an update. I just transferred the files and recompiled them on a mahine that is on the same subnet as my development machine and it worked. The three computers that it failed on were all on a seperate subnet. I would like to think that maybe something is configured differently on that subnet, but port 1099 was open and listening on the failed computers.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmmm... what unmarshalling exception are you getting?
 
Josh Davidson
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've decided to give up on this since those machines won't be used. I'm guessing it has to be the way they are setup somehow. However, please check out my newest post: "App won't run when client is on a different machine than server - $donation"
[ November 13, 2004: Message edited by: Josh Davidson ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!