This topic describes how to troubleshoot and recover from a NullPointerException (NPE) error reported by Oracle Store at the isUpdatePK stack.
Symptom
When Oracle Store reports an NPE error at the isUpdatePK stack and then exits, the Oracle Store timestamp gets stuck.
Possible causes
An NPE error at the isUpdatePK stack is caused by lack of PK/UK logs pulled from the Oracle database. PK/UK logs are essential.
The possible causes are as follows:
The PK/UK supplemental log feature is not enabled in the Oracle database.
Run the following commands to check whether the supplemental log feature is enabled. If
NOis found in the query result, the supplemental log feature is not enabled.select supplemental_log_data_pk, supplemental_log_data_ui from v$database;When logs are pulled from the physical standby database, the supplemental log feature is enabled only on the physical standby database but is not enabled on the primary database.
Run the following commands on the primary database to check whether the supplemental log feature is enabled. If
NOis found in the query result, the supplemental log feature is not enabled.select supplemental_log_data_pk, supplemental_log_data_ui from v$database;After the PK/UK supplemental log feature is enabled in the Oracle database, switchover to the ARCHIVELOG mode is performed before the link is created. When the Oracle Store locates the start time for pulling log files, the database is rolled back by 0 to 2 archive logs based on the specified timestamp. After the PK/UK supplemental log feature is enabled, switchover to the ARCHIVELOG mode is performed before the project is created. The pulled logs may contain logs before the PK/UK supplemental log feature is enabled.
Troubleshooting procedure
Solution for cases 1 and 2
Execute the following statement to enable the supplemental log feature.
alter database add supplemental log data(primary key, unique) columns;Perform switchover to the ARCHIVELOG mode three times. If you use a Real Application Clusters (RAC) system, alternately perform switchover to the ARCHIVELOG mode among multiple instances.
alter system switch logfile;
You need to perform switchover to the ARCHIVELOG mode three times for the following reason: When the Oracle Store locates the start time for pulling log files, the database is rolled back by 0 to 2 archive logs based on the specified timestamp. Therefore, after you enable the supplemental log feature, you need to perform switchover to the ARCHIVELOG mode three times to prevent Store from pulling the logs that are generated before the specified timestamp. Otherwise, Store exits unexpectedly.
You need to alternately perform switchover to the ARCHIVELOG mode among multiple instances in an RAC system for the following reason: In an RAC system, if you perform switchover to the ARCHIVELOG mode multiple times on one instance, when you perform switchover to the ARCHIVELOG mode on the next instance, the latter instance may pull the logs that are generated before the supplemental log feature is enabled.
Solution for case 3
Perform switchover to the ARCHIVELOG mode three times on the primary Oracle database. If you use the RAC system, alternately perform switchover to the ARCHIVELOG mode among multiple instances. Then, create a link.
alter system switch logfile;