Adding or loading tables seems to fail after instance upgrade (NoSuchMethodError)
Having upgraded a Data Gate instance, you receive an error message in the Data Gate main window, which indicates an add-table or load-table failure. The error message is in fact a false error message; all selected tables have been added or loaded properly. To keep the false error message from reappearing, follow the steps in this section.
Symptoms
An error window in the Cloud Pak for Data
main window shows a message similar to the
following:
Error Handler dispatch failed: java.lang.NoSuchMethodError:
com/fasterxml/jackson/core/util/BufferRecycler.releaseToPool()V
(loaded from file:
/head/clone-api/work/jetty-0_0_0_0-8188-clone-api_war-_clone_system-any-/webapp/WEB-INF/lib/jackson-
core-2.15.4.jar by WebAppClassLoader{clone-api}@6adc203b)
called from class com.fasterxml.jackson.databind.ObjectMapper
(loaded from file:/head/clone-api/work/jetty-0_0_0_0-8188-clone-api_war-_clone_system-any-/webapp/WEB-INF/lib/jackson-
databind-2.18.2.jar by WebAppClassLoader{clone-api}@6adc203b).
Causes
The message is caused by the jackson-databind dependency, which has not been properly updated during the upgrade. It does not indicate a real add or load failure.
Resolving the problem
To keep this message from reappearing in the future, complete these steps:
- Open a shell in the data-gate-api container of the Data Gate pod:
where the value ofoc exec -it -c data-gate-api ${DG_POD_ID} -- bashDG_POD_IDcan be determined as follows:- Determine the ID of the Data Gate instance you want to upgrade by running the
oc get dginstance command, as in this
example:
oc get dginstance -n ${PROJECT_CPD_INST_OPERANDS} NAME VERSION BUILD STATUS RECONCILED AGE dg1699914520773847 5.0.0 5.0.0.82 Completed 5.0.0 6h58mThe instance ID in this example is dg1699914520773847.
- Determine the ID of the Data Gate instance's server pod by running the
following command:
whereDG_POD_ID=$(oc get pod -l icpdsupport/app=dg-instance-server,\ icpdsupport/serviceInstanceId=`echo ${DG_INSTANCE_ID} | sed 's/^dg//'` -o jsonpath='{.items[0].metadata.name}')DG_INSTANCE_IDis the instance ID you identified in step 1.a.
- Determine the ID of the Data Gate instance you want to upgrade by running the
oc get dginstance command, as in this
example:
- Remove the .JETTY.INITIALIZED file inside the data-gate-api container:
rm /head/clone-api/.JETTY.INITIALIZED - Delete the pod:
oc delete pod ${DG_POD_ID}where
DG_POD_IDis the pod ID you identified in step 1.b. - The pod is re-created and restarts automatically. Wait until the pod is running again.
Verifying the fix:
- Open a shell in the data-gate-api container of the restarted Data Gate pod:
oc exec -it -c data-gate-api ${DG_POD_ID} -- bashFor the value of
DG_POD_ID, see step 1.b. - List the affected
libraries:
ls -la /head/clone-api/work/jetty-0_0_0_0-8188-clone-api_war-_clone_system-any-/webapp/WEB-INF/lib/jackson* - Verify that the correct versions are shown.
- Retry the operation that was seemingly failing before.