cancel
Showing results for 
Search instead for 
Did you mean: 

How to debug the Java code in Syclo Smart Service Manager.

Former Member
0 Kudos


Hi,

We are using Agentry as frontend which is connecting to SAP CRM through Java.

The data in one screen is not populating and on further analysis we found that there might be issue with Java code.

We have inserted breakpoint but it is not calling the code.

Hence , Can anyone tell me how

1) How can we debug java code?

2) If we made any changes to Java code how is it going to reflect while publishing in server.

Tags edited by: Michael Appleby

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

I have tried below steps but getting message "Failed to connect to remote VM. Connection refused."

nonStandardJavaOptions=-Xdebug -Xrunjdwp:transport=dt_socket,address=7003(other than angel front end port),server=y,suspend=n

In Eclipse,Select Run->Debug configuration.

Select the Remote Java Application in the list of configuration types.

Create a new remote connection for the particular java project.

In connect tab give following details.

Host = localhost

port = 7003.

Former Member
0 Kudos

Hi Rachel,

Hope you have added the following entry in agentry.ini file.

nonStandardJavaOptions=-Xdebug -Xrunjdwp:transport=dt_socket,address=9003,server=y,suspend=n


I'm giving 9003 port here because angel front end port is 7003 so it is already being used by angel communication, you can use any address(port) other than angel front end port.



Now, Select the Remote Java Application in the list of configuration types.

Create a new remote connection for the particular java project.

In connect tab give following details.

Host = localhost

port = 9003.

Regards,

Abhishek Wajge


jason_latko
Advisor
Advisor
0 Kudos

If you are using SMP 3.0, you will need to follow these instructions to dubug Agentry java:

http://wiki.scn.sap.com/wiki/display/SAPMOB/Debug+SMP+3.0+Agentry+Java+in+Eclipse

Jason Latko - Senior Product Developer at SAP

Former Member
0 Kudos

Hi Rachel,

If you are modifying any java codes make sure that you are generating

jar file and placing it under java folder in Server directory,other wise

your changes will not reflect

Regards,

Lekhak Patil

Former Member
0 Kudos

and restarting the Agentry Server, else the server will just hold onto the last version of the jar file.

Stephen

Former Member
0 Kudos

Hi,

actually, changes you make (and save) while debugging the Agentry server code are applied immediately (the instruction pointer may jump to a previous position), which is nice if you cannot test the code easily outside of Agentry.

However, those changes are lost when restarting the Agentry server (at that point you need to follow the above instructions to provide Agentry with a new jar file)!

Regards, Daniel

Former Member
0 Kudos

Hi Rachel,

1) How can we debug java code?

To debug the java classes for syclo application you have to modify the agentry.ini file for the following entry.

nonStandardJavaOptions=-Xdebug -Xrunjdwp:transport=dt_socket,address=7003(other than angel front end port),server=y,suspend=n

In Eclipse,Select Run->Debug configuration.

Select the Remote Java Application in the list of configuration types.

Create a new remote connection for the particular java project.

In connect tab give following details.

Host = localhost

port = 7003.

Put a breakpoint in your java classes and save the configuration.

2) If we made any changes to Java code how is it going to reflect while publishing in server.

When you make any changes in JAVA code, You have to export the .JAR file from eclipse and import it in agentry server. That means you have to store the JAR file in JAVA folder of agentry server and modify the Agentry.ini file for claspath entry to add your JAR file.

Regards,

Abhishek Wajge