powered by Jive Software

RMI client and server in plugin

I’‘m trying to write a plugin that communicates with our backend system via RMI. This plugin will act as both rmi client and server. When the plugin is initialized and the remote method is invoked, I’'m getting the following exception:

java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:

java.net.MalformedURLException: no protocol: Source/Jive

I’'m suspecting this is related to java.rmi.server.codebase property not being set. In simple java application, this property can be passed in using “-D”. How do I pass properties to a plugin?

Thanks

nui

Hi nui,

you may set it for the whole server by starting it with the parameter or your plugin could be able to set it with System.setProperty().

LG

Thanks LG for the quick response. Is there a properties file for the whole server?

thanks

nui

Hi,

are you using the Windows version? I wonder if one can put in the vmoptions file, using a start script like one for unix is a little complicated but not impossible.

LG

Hi LG,

Yes. I am using Windows. I did try using bin/wildfired.vmoptions and was able to pass these properties in (verified by System.getProperty() in my plugin). However, java.rmi.server.codebase property seems to be ignored. On the server side, i always see wildfire’'s classpath being passed as the codebase regardless what i use for the java.rmi.server.codebase.

I did find a workaround by using -Djava.rmi.server.useCodebaseOnly=true on my server. This basically instructs my server to ignore the codebase which I believe causes the exception.

Thanks for your help.

nui

Hi nui,

do you need a .bat start script? I did post one some month ago, it sets the CLASSPATH and launches java.exe with parameters to start Wildfire.

Wildfire.exe adds all files in the libs directory to the classpath, and changes the java library path, I’'m not sure if it changes also other settings.

LG

Hi LG,

Found your startup script from your earlier post.

thanks

nui