18 Troubleshooting the Java Adapters

This chapter outlines steps you can take to solve problems with Oracle GoldenGate Adaptors for Java. It lists the error checks you should perform. If you do not succeed in identifying the problem, submit a support ticket or contact Oracle Support.

This chapter includes the following sections:

18.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 Java Adapter user-exit abends
  • The Extract process running VAM abends.

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

If the 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 then view the Replicat or Extract report:
    GGSCI> VIEW GGSEVT
    GGSCI> VIEW REPORT {extract_or_replicat_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 only the log file for the shared library and not the Java application. It is only created for the Extract user-exit; it is not created for the Replicat user-exit.

  3. If the user exit 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 class path, 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 user exit Extract from the beginning of a trail, see Restarting the Application at the Beginning of a Trail.

18.2 Recovering after an Abend

The Extract parameter RECOVERYOPTIONS defaults to APPENDMODE for release 10 and later 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.

18.3 Reporting Issues

If you have a support account for Oracle GoldenGate, submit a support ticket. Please include:

  • Operating system and Java versions

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

    $ java -version
    
  • Configuration files:

    • Parameter file for the Extract running the user exit

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

    • Velocity templates for the user exit

  • Log files:

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