RMI 32bit 64bit

m6s

Joined
Mar 19, 2010
Messages
3
Reaction score
0
Hello! The issue that troubles me, is that I have RMI connection between windows PCs, and everything is working. But when I want to connect linux with windows I get the message of the topic.
***** pastebin.com/nYCuzf2n *****
you can see the RMI code
The line that seems to throw that exception is the 3nd one.

I turned the functions into something like that, without knowing if it really could work, as I have never ever played with streams allthough this is it :
******* pastebin.com/tfj1ayhB *******
Because I read that this can happen because we have bytes going over the network, so we should have then encoded in base64.

Following is the agent MACHINE that calls the previous RMI methods ( in both cases ):
****** pastebin.com/i5szUttm *******

And the PC, that starts the call to the agent machine is the "business-wise" server with this simple line :
AgentInterface agentInterface = agentClient.getAgent();
the interface has only one method execute, when this execute() is fired, everything is done on the remote machine......
That's it! Few!

Based on the fact, that I am not aware a lot about RMI connection on java, and the fact that this mechanism was built bypassing the usual rmiregistry I find in tutorials....can you suggest anything? First, is the change to 64 encoding , right one?

Also, I have to mention, placing a 32bit linux, didn't produce any errors on this!!!!!!!!
Thank you!
 

m6s

Joined
Mar 19, 2010
Messages
3
Reaction score
0
The Server-Machine to connect to the Agent Machine

uses this :
<code>
Socket socket = new Socket( host, port );
//System.out.println( "connected" );
InputStream in = socket.getInputStream();
//System.out.println( "reading object" );
RemoteStub x = RMI.readObject( in );
logger.info( "remote stub: " + x );
//System.out.println( "got rmi stub" );
agent = (AgentInterface)x;
agentOutputStream = socket.getOutputStream();
agent.getVersion(); // call an RMI method to make sure we're connected
</code>

Sorry slipped away this part! :-(
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top