12 Troubleshooting the Java Adapters

This chapter includes the following sections:

12.1 Checking for Errors

There are two types of errors that can occur in the operation of Oracle GoldenGate for Java:

  • The Replicat or Extract process running the user exit or VAM does not start or abends

  • The process runs successfully, but the data is incorrect or nonexistent

If the Replicat or Extract process does not start or abends, check the error messages in order from the beginning of processing through to the end:

  1. Check the Oracle GoldenGate event log for errors, and view the Extract report file:
    GGSCI> VIEW GGSEVT
    GGSCI> VIEW REPORT {replicat/extract name}
    
  2. Check the applicable log file.

    For the user exit:

    • Look at the last messages reported in the log file for the user exit library. The file name is the log file prefix (log.logname) set in the property file and the current date.

      shell> more {log.logname}_{yyyymmdd}.log
      

      Note:

      This is the only log file for the shared library, not the Java application.

  3. If the Replicat or Data Pump, or VAM was able to launch the Java runtime, then a log4j log file will exist.

    The name of the log file is defined in your log4j.properties file. By default, the log file name is ggjava-version-log4j.log, where version is the version number of the JAR file being used. For example:

    shell> more ggjava-*log4j.log
    

    To set a more detailed level of logging for the Java application, either:

    • Edit the current log4j properties file to log at a more verbose level or

    • Re-use one of the existing log4j configurations by editing properties file:

      jvm.bootoptions=-Djava.class.path=ggjava/ggjava.jar
      -Dlog4j.configuration=debug-log4j.properties –Xmx512m
      

    These pre-configured log4j property files are found in the classpath, and are installed in:

    ./ggjava/resources/classes/*log4j.properties
    
  4. If one of these log files does not reveal the source of the problem, run the Extract process directly from the shell (outside of GGSCI) so that stderr and stdout can more easily be monitored and environmental variables can be verified. For example:
    shell> EXTRACT PARAMFILE dirprm/javaue.prm
    

If the process runs successfully, but the data is incorrect or nonexistent, check for errors in any custom filter, formatter or handler you have written for the user exit.

To restart the Replicat or Data Pump Extract from the beginning of a trail, see Restarting the Java Delivery.

12.2 Recovering after an Abend in Data Pump Extract

The Extract parameter RECOVERYOPTIONS defaults to APPENDMODE for release 10 and greater trails. In append mode, Extract writes a recovery marker to the trail when it abends. When the Extract restarts and encounters the recovery marker, it requests a rollback of the incomplete transaction if local transactions are enabled. If local transactions are not enabled, a warning message is issued. Local transactions are enabled unless the property gg.handler.{name}.localTX is explicitly set to false.

12.3 Reporting Issues

If you have a support account for Oracle GoldenGate, submit a support ticket and include the following:

  • Operating system and Java versions

    The version of the Java Runtime Environment can be displayed by:

    $ java -version
    
  • Configuration files:

    • Parameter file for the Replicat or Data Pump Extract running the user exit

    • All properties files used, including any JMS or JNDI properties files

    • Velocity templates for the user exit

    • If applicable, also include the target-specific configuration file

  • Log files:

    In the Oracle GoldenGate install directory, all .log files: the Java log4j log files and the user exit or VAM log file.