BC4J (ADF Business Components) logging and debugging – great blog from Sandra!

0

The JHeadstart Blog just published a very good blog by my former colleague Sandra Muller: ADF Business Components Diagnostics. Previously, I knew to find a few remarks on this topic in the Trouble Shooting chapter in the JHeadstart Developer’s Guide, and it has saved my life more than once. I remember the time where an application that tested perfectly crashed i the production environment. The BC4J logging – which I learned how to turn on from the JHeadstart Developer’s guide – told us that BC4J was running in statefulll mode and attempted to ‘dehydrate’ (that’s a term I learned from Oracle BPEL Process Manager) the Application Module’s state to the database. In order to do so, it needed to create a couple of tables in the database and the Application’s Database User did not have the CREATE TABLE privilege in the Production Database!

In short, you can switch on BC4J tracing/logging/debugging and get a lot of information about e.g. the SQL being performed and the values of Bind Parameters used by BC4J. MOost useful for developers is probably the following:

During development, the easiest way is visiting your JDeveloper project properties and going to the “Runner” panel. Enter a string like this into the “Java Options” field there: -Djbo.debugoutput=console -Djbo.logging.show.function=true . When you run again, you’ll see the diagnostics printed out in the Embedded OC4J Log.

In the production environment:

In the production environment, an easy way is to include the file Diagnostic.properties in the classpath. It must be in package oracle.jbo.common and you can extract an example from [JDevHome]BC4Jlibbc4jct.jar.

For more details, see Sandra’s blog.

Share.

About Author

Lucas Jellema, active in IT (and with Oracle) since 1994. Oracle ACE Director for Fusion Middleware. Consultant, trainer and instructor on diverse areas including Oracle Database (SQL & PLSQL), Service Oriented Architecture, BPM, ADF, Java in various shapes and forms and many other things. Author of the Oracle Press book: Oracle SOA Suite 11g Handbook. Frequent presenter on conferences such as JavaOne, Oracle OpenWorld, ODTUG Kaleidoscope, Devoxx and OBUG. Presenter for Oracle University Celebrity specials.

Comments are closed.