We don't recommand using Debug Job option to debug remote Java
application. Actually, it is not officially supported by WDSC Integrated
Debugger.
For attaching to remote java application, you could use the Eclipse basic
support for debugging remote java.
Steps:
. Create a Java project in your workspace, with the java source your want
to debug
. add the following options when the JVM is started:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
. Create a new Remote Java Applicaiton launch configuration, specifying
the java project, Connection Properties (host name, and the port #, which
is 8000 in this case), and debug the application.
Thanks,
Xuan Chen, Problem Determination Tools for iSeries
(905) 413-3769 T/L 313-3769
xuanchen@xxxxxxxxxx
Thorbjørn Ravn Andersen <thunderaxiom@xxxxxxxxx>
Sent by: wdsci-l-bounces@xxxxxxxxxxxx
02/19/2008 04:14 AM
Please respond to
Websphere Development Studio Client for iSeries <wdsci-l@xxxxxxxxxxxx>
To
Websphere Development Studio Client for iSeries <wdsci-l@xxxxxxxxxxxx>
cc
Subject
Re: [WDSCI-L] Using RSE to debug running Java program - fails for me, what
to do?
CRPence skrev den 18-02-2008 16:43:
Since the CPF3CF2 is a generic "API failed" failure condition, I
think the best approach might be to locate the full details of the
joblog for the host error, to see if there are preceding error
conditions which give rise to the generic "API failed" message. Having
just reviewed the text for that message, it seems to suggest doing that
[and the parameters specified, which would not be too easy given it is a
system debugger feature calling the API], and reporting the problem to
your service provider.
Thanks for your answer. I asked our sysop to see if he could help me
locate said details, but he could not locate anything. He mentioned
that apparently nothing was being logged.
I did a quick test and could attach the RSE debugger to a non-java job,
so apparently something works.
If there is anybody out there willing to help me on this please just run
the attached Java jar - e.g. with "java -jar count.jar 10000" in qsh -
and locate it under "My Active Jobs" in Remote System Explorer, and
right click "Debug as" -> "iSeries job. I have also tried various
unpacked variations as this might be a "the debugger only supports a
class file" issue, but cannot identify any which works.
To avoid any suspicions of trojans, the meat of the class in the jar
file is:
public static void main(String[] args) throws InterruptedException {
int i = Integer.parseInt(args[0],10);
while (i > 0) {
System.out.println("i = " + i);
Thread.sleep(1000);
i = i - 1;
}
}
Thanks in advance for any help on this. If I get it to work I'll write
a summarizing article.
--
Thorbjørn
As an Amazon Associate we earn from qualifying purchases.