Wednesday, February 08, 2006

RMI is pretty evil

new problems and their solutions:

any time you get an exception having to do with marshaling and you know that you have not changed any of your stubs, then its a codebase error! to fix:

into that directory you can put your stubs, tho there is a little catch there. you have to put them in like this
if the fully qualified name ofr Class_Impl_Stub is package1.subpackage.Class_Impl_Stub

people on the interweb say that using an http address is less troublesome then trying to use a file:// url

also, put your policy file into the same directory as your main jar file.

here is a good command line example of how i start my server:
>java -Djava.rmi.server.hostname= -Djava.rmi.server.codebase= -jar server.jar

note that server.jar contains a manifest file that points to all the libs it needs.

your client app should also have this codebase declaired obviously.

No comments:

Post a Comment