When you encounter problems running a BC4J application, one of the first things you can try is to turn on diagnostic to see if the diagnostic output offer further information on the problem.
This is especially true with exceptions. When you receive a BC4J exception, the BC4J exception may carry a detail exception. The detail exception will give you further info on what went wrong. For example, your application may receiven an oracle.jbo.DMLException when you try to post an entity row. This DMLException may have been caused by a SQLException at the JDBC layer.
In this case, the DMLException carries the SQLException as its detail exception. If you have the diagnostic turned on, it will show the BC4J exception stack as well as the detail exception stack.
To turn on diagnostic, you need to specify
-Djbo.debugoutput=console
as one of the JVM switches.
If you're invoking your app (middle-tier app) from command line, include -Djbo.debugoutput=console as in
java.exe -Djbo.debugoutput=console ...
If you're running your app from within JDev:
- Select the project.
- Do right mouse click and select "Project Settings..."
- On the Settings dialog, select Configurations/Runner.
- In the righthand side pane, you should see a textbox for "Java Options". Add the following JVM switch: -Djbo.debugoutput=console
Then, rerun. The run command should include -Djbo.debugoutput=console as in
"D:\JDev9i\jdk\bin\javaw.exe" -Djbo.debugoutput=console -classpath ...
You should now see a lot more output on the IDE's message window.
1:11:56 PM
|