Command Line Adapter: NPE in Attach handler thread
Hi all,
one of my users today reported that during execution of a test script the command line adapter logged a null pointer exception in the "attach handler" thread. Here is the stack trace:
Exception in thread "Attach handler" java.lang.NullPointerException
at java.io.File.<init>(File.java:262)
at com.ibm.tools.attach.javaSE.IPC.getTargetDirectoryPath(IPC.java:627)
at com.ibm.tools.attach.javaSE.IPC.getNotificationSyncFile(IPC.java:511)
at com.ibm.tools.attach.javaSE.AttachHandler.waitForNotification(AttachHandler.java:232)
at com.ibm.tools.attach.javaSE.AttachHandler.run(AttachHandler.java:163)
I am not sure if this exception is thrown by code that was tested, or by the command line adapter itself. It would be great if you could help me to understand where this problem comes from.
Kind regards,
Markus
one of my users today reported that during execution of a test script the command line adapter logged a null pointer exception in the "attach handler" thread. Here is the stack trace:
Exception in thread "Attach handler" java.lang.NullPointerException
at java.io.File.<init>(File.java:262)
at com.ibm.tools.attach.javaSE.IPC.getTargetDirectoryPath(IPC.java:627)
at com.ibm.tools.attach.javaSE.IPC.getNotificationSyncFile(IPC.java:511)
at com.ibm.tools.attach.javaSE.AttachHandler.waitForNotification(AttachHandler.java:232)
at com.ibm.tools.attach.javaSE.AttachHandler.run(AttachHandler.java:163)
I am not sure if this exception is thrown by code that was tested, or by the command line adapter itself. It would be great if you could help me to understand where this problem comes from.
Kind regards,
Markus
2 answers
Markus,
The exception you have posted is coming from the JVM and not the CommandLineAdapter code, specifically from a feature know as 'late attach' or 'the attach API'.
If this happens more regularly you can disable this feature, but it should not affect the execution of the CommandLineAdapter if memory serves correctly.
Some more information would be useful to decide what the best action to take might be:
Does this happen regularly?
Does the JVM keep running after this?
What version of java are you using specifically? (type 'java -version' and paste the output here)
-AndyT
The exception you have posted is coming from the JVM and not the CommandLineAdapter code, specifically from a feature know as 'late attach' or 'the attach API'.
If this happens more regularly you can disable this feature, but it should not affect the execution of the CommandLineAdapter if memory serves correctly.
Some more information would be useful to decide what the best action to take might be:
Does this happen regularly?
Does the JVM keep running after this?
What version of java are you using specifically? (type 'java -version' and paste the output here)
-AndyT