@ozclkonur , I am not sure the steps you followed. If you have a JAR which you created and loaded into ThingWorx, it was loaded into the Java Virtual Machine (JVM). When you make a change to the JAR file. It may be necessary to stop and restart ThingWorx because the JVM may be holding on to the original version of JAR.
As a test I would stop and restart the ThingWorx Server and see if you get better results.
HTH
Pehowe
I've successfully implemented file deletion, but when I check MethodServer, it keeps logging the same message, repeatedly attempting to send the part with the EPMDocument ID 114592789. This was the ID I tried to process when I first ran the application. Since then, I've attempted to attach parts to different EPMDocument IDs like 129025898, but MethodServer keeps making requests for the initial ID. It continuously shows the same log. Is there a way to clear the MethodServer or bypass this issue?
Hi @ozclkonur
You wrote the ID in the code, that is static. So if you rewrite it, you have to implement new version of the class file on the server.
Usually a restart the method server will reload and use the new class file.
This apply also to thingworx if you rebuild class with new version you have to copy it to the final destination and restart the java procsess
If you want to work with more IDs and you want to define it outside of the code, then you have to use some load from file function where you define your IDs and load it in to a memory your code
PetrH
As others have said, it sounds like you just need to restart the method server to force it to pick up the updated class, but it's worth noting that if you connect to the correct method server in debug mode, you can hot swap code so you don't need to restart for the changes to take effect. There are some limitations, like you cannot hot swap if you add / remove methods or arguments, and typically you need to configure Windchill to start just a single method server, but it's significantly easier to develop code this way.
I solved it by thinking that if it always caches the code from the first execution, then I could create a fixed connection and manage the variables through that connection. This approach worked and it functioned as expected. However, I couldn’t use it because I didn’t know how to transfer the Windchill Java code.