How to Get More Details Error Information

Send me a mail
 Dive into Oracle ADF   Click to see the XML version of this web page.   (Updated: 2/3/2008; 9:24:08 PM.)
Tips and tricks from Steve Muench on Oracle ADF Framework and JDeveloper IDE

How to Get More Details Error Information

Another common question I get alot is, "I'm trying to do .... and I get oracle.jbo.DMLException. Why is this happening?"

When something doesn't appear to be working in your BC4J-based J2EE application, there are a couple of simple ways to get more information:

  • Running with diagnostics information turned on
  • Debug your application using the BC4J Tester tool

To turn on diagnostics, set the Java system parameter jbo.debugoutput to the value console or file depending on whether you want to see the diagnostics on standard out or whether you want them redirected to a file in your OS temp directory. Inside the JDeveloper IDE, you can do this by visiting your project properties and going to the "Runner" panel. Enter a string like this into the "Java Options" field there:  -Djbo.debugoutput=console  When you run again, you'll see an abundant amount of diagnostic tracing printed out that will help narrow down the problem.

When only a breakpoint will do, most times you can use the built-in BC4J Tester tool to exercise your application module component and cause the breakpoint to be hit by querying or entering data through this tester tool. The BC4J tester lets you try out your application service component without having to build a custom UI front end to try it out. To run the BC4J Tester in normal mode (without debugging), just select "Test..." from the right-mouse menu on your application module component. To run the BC4J Tester in debug mode, expand the application module node in the navigator to reveal its XML descriptor and Java AMNameImpl.java implementation file. Select the "Debug AMNameImpl.java..." item on the right-mouse menu. This will run the BC4J Tester using the configuration named in the 2nd argument to the launchTester method call in the main() method of the AMNameImpl.java file (which the BC4J design-time editors generate for you automatically).

/** (From: PetStoreServiceImpl.java AM implementation file)
*
* Sample main for debugging Business Components code using the tester.
*/
public static void main(String[] args) {
  launchTester("pet.model.services",    /* Package Name       */
               "PetStoreServiceLocal"); /* Configuration Name */
}



© Copyright 2008 Steve Muench. Click here to send an email to the editor of this weblog.
Last update: 2/3/2008; 9:24:08 PM.