Have you ever completed a software project and had nothing go wrong? Neither have I. Projects using Oracle’s SOA Suite are no different than Java projects and you will need to debug issues at some point.
Here are five tools for debugging issues on Oracle SOA Suite:
1. Flow Trace and Audit Trail
If you have an issue with a specific instance, or instances that follow a specific path, both the flow trace of the composite instance and audit trail of the component instances are extremely helpful. Flow traces and audit trails help you pinpoint a location to look in your code. You can look at the location of the error and step back through the flow trace and audit trail from that point to trace back to the cause of the issue.
In most production systems, the domain audit level will be set to Production so the system doesn’t write too many audit records. When the audit level is set to production, you won’t be able to see the payload in mediators or assignment activities - two places likely to have mistakes. The audit level can be changed on each composite individually, so if your domain audit level is set to Production, you can always temporarily change the audit level of your problem composite to Development to help troubleshoot an issue. However, changing the audit level will only have an effect on activities completed after the changes is made.
To change the audit level on a composite:
Navigate to Enterprise Manager in a browser
In the left panel expand SOA, then soa-infra, then the partition to which your project is deployed, then click on your composite
In the main panel, click on Settings… -> Composite Audit Level: Inherit -> Development
You will see a pop-up asking for confirmation, click Yes
You will see a confirmation message just under the composite name
Reproduce your issue and view your flow trace and audit trail
Be sure to change the audit level back to its original setting when you’re done!
2. Log Files and grep
Oracle SOA Suite provides several logs that are useful when troubleshooting issues. Log files are extremely useful when trying to find the root cause of an issue, but the problem is that there are so many files to look though and they can get big!
Grep is a powerful command line tool in Linux/Unix/OS X that allows you to use regular expresions to search plain-text data. Using grep, you can search through all of the relevant log files at once. Combining grep searches with details from instance audit trails such as ECID or time can help to reduce the logs to dig through. See the manual for grep, or a grep tutorial to get started. If you are using Windows, take a look at Findstr.
3. Java Flight Recorder and Java Mission Control
If you have issues with OutOfMemoryExceptions or are experiencing poor performance, you should consider using Java Flight Recorder and Java Mission Control (previously known as JRockit Mission Control and only available for JRockit before JDK 1.7+). Java Flight Recorder, which is built into the Oracle JDK, profiles and collects low level events occurring in the JVM. Java Mission Control allows you to view and analyze the data collected by Java Flight Recorder to find JVM tuning and application issues.
See Oracle’s documentation for additional information.
4. Visual Debugger
A part of the Oracle SOA 12c release, Oracle released a visual debugger. The debugger allows you to set breakpoints in a BPEL or BPMN process, on a composite, or on a Service Bus pipeline. When you run your project in debug mode, JDeveloper uses its embedded SOA Suite instance to run the composite. The visual debugger will help developers find issues more rapidly, improving the reliability of composite applications.
See Oracle Fusion Middleware: Developing SOA Applications with Oracle SOA Suite for more details.
5. My Oracle Support
Many people forget to check My Oracle Support when they are having issues. My Oracle Support holds a great deal of information that cannot be found on the open internet. When searching for your issue, be sure to include the Knowledge Base and the Community in your search. If you suspect your issue is an Oracle bug, include Bug and Patch in your search as well. If you’ve done your due dilligence in attempting to uncover the issue and are still unable to resolve it, open a Service Request to get assistance from Oracle.
Bonus: Search Engines
When you’ve stumbled upon a problem, it's likely you’re not the first person to have the problem. Search engines are extremely useful when debugging issues. The key to getting good results is a well-formed search string. To get the best results, keep your search simple - if you are too specific in your search, you may miss important results that are similar to, but don't exactly match, your problem.
These are the tools I use to debug issues, what do you use?
Join the Conversation
Also i would like to mention that even we can use the "Selective Tracing" methodology for the debugging for particular instance.
If you could provide more information about the different log files and the property settings from EM console , it will be nice.
Anyway it is a great post!!