Subscribe

Duplicate entry '2147483647' for key 'PRIMARY'

Since two days we are getting this error for our Oncommand data source. How can I find out which entry in the oncommand database is causing this issue? Reset scheme and redefinition of the data source didn't solve the problem. Thanks in advance.

Re: Duplicate entry '2147483647' for key 'PRIMARY'

Hi,

 

Could you please look at the wfa_acquisition log and wfa.log to see if there are additional log messages around this issue.

That could help in knowing the dictionary entry for which it is happening.

 

Thanks,
Shailaja

Re: Duplicate entry '2147483647' for key 'PRIMARY'

I found a post in a mysql forum.

2147483647 is the largest int value for mysql. Just change the type from int to bigint.

 

Now I have the issue in our wfa database again during aquisition from a OnCommand Unified Manager 5.2. How can I find out which table is causing the issue to change the type of the primary key? Is there any other workaround for this? Currently no aquisition of the data source is possible. Reset scheme I already did but it doesn't change anything

Re: Duplicate entry '2147483647' for key 'PRIMARY'

I tried several actions but none of them worked. Installation to WFA 4.0, reset scheme. If I do a clean install and add the data source it works. However, I can't import my workflows. It throws an error every time. From a 3.1P2 installation I can't even export my workflows. And everytime I restore my last successful db backup the error returns. So I'm stuck at the moment. Unfortunately the logs are not showing which table is having the duplicate key. We need this running again asap as we are doing all of our daily work with workflows. So I anybody has an idea how to get rid of this error in the database I appreciate it. Thanks in advance.

 

wfa_acquisition.log:

Caused by: com.netapp.wfa.util.SqlShellException: <localhost> Failed to load from 'C:\Program Files\NetApp\WFA\jboss\standalone\tmp\wfa\localhost-storage.snapshot-386163981397160180.dump' into wfa_staging.storage_snapshot
    at com.netapp.wfa.util.SqlShell.loadFromFile(SqlShell.java:216) [common-0.5.jar:]
    at com.netapp.wfa.cache.execution.TableProcessorImpl.extractFromFiles(TableProcessorImpl.java:124) [cache-0.5.jar:]
    at com.netapp.wfa.cache.execution.ETLRunner.loadFromExtractedFiles(ETLRunner.java:121) [cache-0.5.jar:]
    at com.netapp.wfa.cache.execution.ETLRunner.loadFromExtractedFilesGlobalizeAndLoad(ETLRunner.java:80) [cache-0.5.jar:]
    at com.netapp.wfa.cache.job.CacheJobWorkerImpl.loadFromExtractedFilesGlobalizeAndLoad(CacheJobWorkerImpl.java:38) [cache-0.5.jar:]
    at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source) [:1.8.0_72]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_72]
    at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_72]
    at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
    at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82) [wildfly-weld-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93) [wildfly-weld-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
    at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47) [wildfly-jpa-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
    at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:46) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
    at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83) [wildfly-weld-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) [wildfly-ee-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
    at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
    at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273) [wildfly-ejb3-8.2.0.Final.jar:8.2.0.Final]
    ... 194 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '2147483647' for key 'PRIMARY'
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.8.0_72]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) [rt.jar:1.8.0_72]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) [rt.jar:1.8.0_72]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) [rt.jar:1.8.0_72]
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:389) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at com.mysql.jdbc.Util.getInstance(Util.java:372) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:973) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3835) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3771) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2531) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1618) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1549) [mysql-connector-java-5.1.35.Commercial.jar:5.1.35]
    at org.jboss.jca.adapters.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:375)
    at com.netapp.wfa.util.SqlShell.loadFromFile(SqlShell.java:203) [common-0.5.jar:]
    ... 232 more

Re: Duplicate entry '2147483647' for key 'PRIMARY'

I found a workaround. in the log output I found the storage.snapshot table mentioned. Disabling acquisition for this table got the data source replication running again.

Re: Duplicate entry '2147483647' for key 'PRIMARY'

@skellner

 

Disabling acquisition for storage.snapshot has allowed acquistion to scueed, but it can't be the solution.

 

To debug this, you would need to run the SQL query present in the cache query for storage.snapshot on the DFM 5.2 server. See what data it returns. The problem is due to some data present in DFM. 

 

sinhaa

 

 

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.