12 Troubleshooting the Java Adapters

This chapter includes the following sections:

Topics:

12.1 Checking for Errors

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

  • The Replicat process running 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 native log file:

    • Look at the last messages reported in the log file for the native 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 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 native 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> REPLICAT 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.

To restart the Replicat from the beginning of a trail, see Restarting the Java Delivery.

12.2 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

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

    • Velocity templates for formatting purposes

    • 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 native module or VAM log file.