cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

java extension with null

YC_9410522
5-Regular Member

java extension with null

I made an extension to read excel data in java. It works well.

However, running this extension the next day results in a null.
I don't know if this is a bug or what causes it.
Please let me know if there is any opinion or solution to this phenomenon. For reference, I used thingworx 8.5.4

ACCEPTED SOLUTION

Accepted Solutions

Hi @YC_9410522 ,

Since this is your custom code, you need to debug your code to see exactly why that happens.

Append to your Apache Tomcat Java options this line and restart the server after that:

-agentlib:jdwp=transport=dt_socket,address=1043,server=y,suspend=n

Then, debug your ThingWorx extension from Eclipse in this manner:

  1. Goto Run>Debug Configurations
  2. Select Remote Java Applications and create a new configuration (right click>New)
  3. In the Project field,browse for and select your project
  4. In the Host field,enter the host of your Tomcat instance
  5. In the Port field,enter the debug port t=> 1043
  6. Run debug after Tomcat has started,and you will be connected

Note that this way to debug works only if you have access to the ThingWorx's instance port you set above (1043 in this case). There might be cases where access to this port is blocked by the infrastructure team where the platform is hosted.

An alternative to this is to add multiple logger statements in your extension that write lines in the Script/Application Log..

View solution in original post

2 REPLIES 2

Hi @YC_9410522 ,

Since this is your custom code, you need to debug your code to see exactly why that happens.

Append to your Apache Tomcat Java options this line and restart the server after that:

-agentlib:jdwp=transport=dt_socket,address=1043,server=y,suspend=n

Then, debug your ThingWorx extension from Eclipse in this manner:

  1. Goto Run>Debug Configurations
  2. Select Remote Java Applications and create a new configuration (right click>New)
  3. In the Project field,browse for and select your project
  4. In the Host field,enter the host of your Tomcat instance
  5. In the Port field,enter the debug port t=> 1043
  6. Run debug after Tomcat has started,and you will be connected

Note that this way to debug works only if you have access to the ThingWorx's instance port you set above (1043 in this case). There might be cases where access to this port is blocked by the infrastructure team where the platform is hosted.

An alternative to this is to add multiple logger statements in your extension that write lines in the Script/Application Log..

slangley
23-Emerald II
(To:YC_9410522)

Hi @YC_9410522.

 

If you found the previous response helpful, please mark it as the Accepted Solution for the benefit of others with the same issue.

 

Regards.

 

--Sharon

Announcements


Top Tags