This discussion is archived
1 Reply Latest reply: Oct 20, 2011 2:19 AM by gimbal2 RSS

java hangs

822870 Newbie
Currently Being Moderated
Hi all,
I am facing an issue in java.
Problem,
The sever stop responding to anything, it just hangs, cannot be restarted unless killing java process through task manager. does not respond to hprof, jstacktrace, jvisio, console, anything.

the problem occurs very intermittently, some time it works, some time it doesn't, so, very difficult keep track of this.
when tried to debugging, it seems to be hanging on creating a instance using constructor.newInstance() method.

Especially in sun.rmi.server.Util.createStub() method.
which is trying to create a stub object, it prints (sys.out.println) the loaded stub class and constructor also, but newInstance method hangs and do not print then onwards.

// sun.rmi.server.remote.Util.java
private static RemoteStub createStub(Class remoteClass, RemoteRef ref)
throws StubNotFoundException
{
String stubname = remoteClass.getName() + "_Stub";
try {
Class stubcl =
Class.forName(stubname, false, remoteClass.getClassLoader());
Constructor cons = stubcl.getConstructor(stubConsParamTypes);
return (RemoteStub) cons.newInstance(new Object[] { ref });
} catch {
}

it hangs here,, (RemoteStub) cons.newInstance(new Object[] { ref });

it is very intermittent, once for so many attempts,

Please help about the ways this can be debugged further or any solution to this.

Thanks,
Kalpa
  • 1. Re: java hangs
    gimbal2 Guru
    Currently Being Moderated
    If only it was as simple as making a post in a forum and then sitting back and waiting for answers.

    But it is not. It will take plenty of smart people investigating every tiny little corner of the working environment to see where the problem may stem from. It starts by changing your attitude - it is too soon to claim that "java hangs". It might just as well be the OS that is blocking the process for some reason. You seem to have traced this to RMI, which opens network connections. Perhaps that is failing.

    Check every log file available in the system, that is all I can say. If you must blame Java, try running with an alternate version (older and newer) to see if that changes anything. Create proof before you make claims.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points