Symptom
Crystal Reports connects to a Java Bean class, and instantiates its own Java Virtual Machine (JVM) to execute the class and retrieve a resultset. However, the Java Bean fails to execute and the following error message appears:
"Unknown Query Engine Error".
How do you debug your connection to the Java Bean?
Resolution
To debug your connection to the Java Bean, complete the following steps:
1. Turn on the debugging for the Crystal JVM by setting the 'JVMOptions' registry subkey to the following string value:
-Xdebug;-Xnoagent;-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=6770
For version 9, the subkey is located in HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\9.0\Crystal Reports\.
For version 10, the subkey is located in HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.0\Crystal Reports\.
====================
NOTES:
" Create the 'JVMOptions' registry subkey if it does not exist, and then set the string value as per step 1.
" Set the address in the 'JVMOptions' registry subkey string value to any open port number on the computer.
====================
2. Start the Crystal JVM as follows:
i. In the Crystal Reports Designer, click 'File' and then click 'New'.
ii. Click the desired report type, and then click 'OK'.
iii. Expand the 'Create New Connection' folder, and then expand the 'Java Beans Connectivity' folder. A list of available Java Beans appears, and Crystal Reports has now started its JVM.
3. Connect to the address port of the JVM and retrieve the error messages.
====================
NOTE:
If you have the source files for your Java Bean and you are using an IDE which allows break points and debugging, you will be able to set break points in your Java Bean class and step through the execution when you run the Java Bean through the Crystal Reports Designer.
====================
Additional Information
---------------------
For more information on retrieving the error messages, search for the section "How do I use eclipse to debug a Java program running on another machine?" on the Eclipse frequently asked questions (FAQ):
Keywords
JAVA BEAN JAVABEAN JAVA DATABASE DEBUGGING JVM JVMOPTIONS JDBC Crystal Reports Java Bean Connectivity Troubleshooting , c2015714 , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To