I know that a custom JVM can behave a little differently, and I'm trying to see if my observed behavior is the same as the real JVM. Also, I'm looking for some way to consistently make this stuff work.
The worst part I've been seeing is that exceptions are being completely eaten by the JVM. For instance:
public myMethod(String test) extends Remote {
if(test.equals("Hey"))
doSomething()
}
I've seen two responses in my code to passing in null for "test". One is that it logs "NullPointerException". Nothing else, just that string.
The other is it logs NOTHING AT ALL. Code execution just stops, and nothing after this code is run (even if there is a try/catch around the calling method)
Also, after the exception, the calling thread never seems to continue (making bugs like this amazingly hard to track down).
If I throw a try/catch around this method and log the error, it works fine.
Admittedly I'm working on an older JVM with custom code, so I don't expect much help, but has anyone seen behavior like this? Maybe in an old JVM? Is it supposed to throw the exception over the wire, or is it supposed to print a stack trace on the remote system?
Is wrapping the exception in a RemoteException and rethrowing it a reasonable solution?
Any suggestions? (Aside from spec a new JVM--this is so far out of the realm of possibility that it isn't even funny)