My Oracle Support Banner

OAG Analytics: Metrics storing could not be initialized. Metrics will not be stored. java.sql.SQLException: ORA-00001 (Doc ID 1997023.1)

Last updated on AUGUST 19, 2022

Applies to:

Oracle API Gateway - Version 11.1.2.1.0 and later
Information in this document applies to any platform.

Symptoms

PROBLEM DESCRIPTION
-----------------------------------------

After stopping OAG 11.1.2.1 (and OAG Analytics) to make an offline backup of the database, and then starting OAG and OAG Analytics, the following issue is observed:

No data regarding service invocations is being recorded in OAG Analytics (in spite of having invocations being registered on OAG). 
Policy studio was verified to have DB configuration activated. 
The configuration is correct and when trying to deploy the configuration (no changes, just deploy and see that there is no error),  there are no errors on the deploy screen; however, checking the trace file reveals the following error.

ERROR
--------
DEBUG  [<THREAD ID>] Processing column of type: VARCHAR
DEBUG  [<THREAD ID>] Processing column of type: VARCHAR
FATAL   [<THREAD ID>] Fatal error: Metrics storing could not be initialized. Metrics will not be stored.:
java.sql.SQLException: ORA-00001: unique constraint (<CONSTRAINT>) violated

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3390)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at com.vordel.reporting.dao.ProcessIDDAO.insert(ProcessIDDAO.java:54)
at com.vordel.common.db.GenericSQLTableDAO.insert(GenericSQLTableDAO.java:94)
at com.vordel.reporting.dao.ProcessDAOUtility.getProcessId(ProcessDAOUtility.java:33)
at com.vordel.reporting.metricsmanagement.MetricsManager.configure(MetricsManager.java:164)
at com.vordel.reporting.rtm.RealtimeMonitoring.configure(RealtimeMonitoring.java:128)
at com.vordel.precipitate.SolutionPack.loadModules(SolutionPack.java:501)
at com.vordel.dwe.Service.refresh(Service.java:415)
at com.vordel.api.configuration.ConfigurationService.updateConfiguration(ConfigurationService.java:77)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

DEBUG  [<THREAD ID>] Adding MessageCreationListener: com.vordel.reporting.rtm.RealtimeMonitoring$1@67ea6afc

WHAT IS WORKING
-------------------------------
This configuration was working fine for a long period of time. The issue only started after stopping OAG and Analytics to do the offline backup.  


STEPS TO REPRODUCE
--------------------------

1. Stop OAG and Analytics.
2. Perform an offline backup of the database.
3. Start OAG and Analytics.
4. OAG analytics displays no activity.
5. In Policy studio, click on Deploy even though there was no changes done to the configuration. Deployment went successful.
6. Check the trace file to find the error:

FATAL  [<THREAD ID>] Fatal error: Metrics storing could not be initialized. Metrics will not be stored.:
java.sql.SQLException: ORA-00001: unique constraint (<CONSTRAINT>) violated

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.