-
1. Re: Why is RMI so difficult to set up?
joelvogt Sep 30, 2002 8:09 PM (in response to javajohnson)umm, not too sure on this one. But are you trying to do a rmi lookup in your hello world application? If your not doing anything tricky, then jboss should already be set up and ready to go as it is. Maybe can you post more details about your hello world app and where it is failing?
-
2. Re: Why is RMI so difficult to set up?
javajohnson Oct 1, 2002 9:01 AM (in response to javajohnson)Sure, I'll post some more details.
My HelloWorld app is actually the RMI tutorial on Sun's website:
http://java.sun.com/docs/books/tutorial/rmi/overview.html
It is a 'computing engine'. The UnicastRemoteObject derived class has a single method with a signature of
public Object executeTask(Task t)
A Task is an interface with an execute method.
This is what I did up to this point. All standard RMI.
1. Created a UnicastRemoteObject derived class called ComputeEngine that also has a main method to actually do the binding.
2. Created a client class that implemented the Task interface. The class Computes Pi.
3. Created a client app with a main method to do the naming lookup and send the Pi class to the server for processing.
When I use the rmiregistry command from the JDK (1.3.1) to handle the binding everything works fine. If I stop the rmiregistry command and start up JBoss, I get the following:
java.rmi.MarshalException: Transport protocol not supported by server
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:203)
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:169)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:313)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at com.dsicdiiti.rmidemo.engine.ComputeEngine.main(ComputeEngine.java:46)
The parameters to the Naming.rebind(addr,obj) call are
addr= "//192.168.0.116/Compute"
obj=a ComputeEngine Instance
The IP addr is my local machine.
This exception is what led me down the path that RMI only supports SSL, which got me to configure SSL and get the null pointer in line 111 of DomainServerSocketFactory.java
I really just hope I am over-complicating things. Can I specify bindings at JBoss startup?
Thanks,
Mark -
3. Re: Why is RMI so difficult to set up?
cumulus Oct 1, 2002 12:37 PM (in response to javajohnson)Hi,
>> java.rmi.MarshalException: Transport protocol not supported by server
If you are getting this exception then I am wondering, are you using port 1099 for RMI? If so, JBoss uses this port for JNDI, which it uses for binding objects. If you have a separate RMI Registry try using a different port number so there is no transport protocol conflict. -
4. Re: Why is RMI so difficult to set up?
javajohnson Oct 1, 2002 12:53 PM (in response to javajohnson)Hmm, that would make sense then.
I thought port 1099 was the standard RMI Registry port. Deos this mena that JBoss does not act as a RMI Registry? I assumed it did.