BC4J (ADF Business Components) logging and debugging – great blog from Sandra!
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.
- Organization of BC4J – Domain (EO) and Business (VO) package
- Another JDeveloper extension: Force Delete utility for ViewObjects (ADF Business Components pka BC4J)
- Deploy an Oracle JHeadstart/BC4J application to IBM WebSphere
- new JHeadstart Team blog Announces production release
- Logging quickstart: Log4j and Jakarta Commons logging