A Guest Post by Michael Kutswa.

After we upgraded our Automic AE from V10 to V12, we encountered an error: The Java-based Work Process (JWP) could not create the search index because there was an object with incorrect XML documentation.

Unfortunately, the error message in the JWP log did not help us any further. It did not tell us which object was responsible for the Index Builder crashing.

So we decided to do remote debugging. We used the Eclipse framework for this.

Maybe that’s interesting for you, too, so I’ve created this little description of how we solved the problem.

Step 1: Preparing JWP for Remote Debugging

For this, we only had to use some parameters for the Start Command in the ServiceManager. Our command was:

C:AutomicExternal.ResourcesJDKjdk1.8.0_144binjava -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 -Xrs -Xmx512M -jar ucsrvjp.jar -IC:AutomicAutomation.PlatformAutomationEnginebinucsrv.ini -svc%port%

As you can see, we used the following additional parameters for the command:

  • -Xdebug
  • -Xnoagent
  • -Djava.comiler=NONE
  • -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

The final parameter needs a free port as address.

Step 3: Starting the Debugging

Now we stopped the running JWP and started a new one to begin with the remote debugging.

In Eclipse, we created a debug configuration for the JWP and started debugging.

We opened the debugging perspective and created a breakpoint at the moment of the crash. We knew the name of the exception from the error message, so it was easy to create a Java exception breakpoint.

Now we just had to wait for the exception to find the objectID.

Step 3: Eliminating the Culprit

With the objectID we could easily find the object in the database. We used the following SQL Script:

select * from OH where OH_IDNR = 8076260;

Instead of fixing it, we just deleted it and rebuilt it. Then, everything worked again and the search index could be created.

Reassured we were able to disconnect the debugger from the system, stop JWP and start again normally.

Michael Kutswa


Get concentrated knowledge from 5 years of AutomicBlog

Download an archive with all old articles:

  • Features, SQL-Tricks, and handy Scripts.
  • 63 extensive articles (+ comments).
  • Used by Automic experts around the world.

Subscribe to the newsletter and immediately get all articles!

[caldera_form id="CF572741b60f87f"]