Debug your Webcenter Content services

I have recently worked on a big Webcenter Content project and have discovered some new tools that could help you in your projects …
Webcenter Content services are executed by the Webcenter Content service engine and you can’t test them until they are deployed … You know that deploying a new release of your Java service can be costly … Deploying the JAR, restarting the server, etc. Stop losing 10 minutes each time you want to test something while trying to solve an issue, use the remote debugger !
This article will help you to configure your developmnent environment to use remote debugging.

Weblogic side

To be able to communicate, JDeveloper and Weblogic have to be configured. First step, configure the Weblogic server start to enable remote debugging on the port : PORT_NUMBER.
Go to the Weblogic console, find the « Server Start » properties and add the following line :

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=PORT_LIBRE,server=y,suspend=n -Djava.compiler=NONE

Restart Webcenter Content

JDeveloper side

You have to configure your java project to enable remote debugging …
Nothing could be easier … Just right-click on the project, select « Project Properties » and follow the below instructions :
Edit the default profile :

  1. Check « Remote Debugging » option
  2. In the « Remote » section, fill the address of the target server and the port you specified earlier in the JVM start properties

Tests side …

Once you’ve deployed the java service (or filter), just start the remote debugger with a right-click on the project :
JDeveloper is now listening to the Webcenter Content engine and as soon as your service is executed, the execution will be stopped on the first breakpoint.
Then you’ll be able to follow the execution step by step and check the memory state like the content of the binder, etc.
A few words about the above screenshot :

  • The blue line indicates the current breakpoint
  • The « Data » tab on the right helps you checking the memory : viewing variable values, etc.
  • The « Watch » tab is a shortcut. It identifies the main variables you want to check quickly (just drag and drop the variable in the area

Hope this article will help you !