1 Reply Latest reply on Mar 5, 2014 2:56 AM by hasnain raza

    Cannot insert duplicate key in object 'dbo.JBM_ID_CACHE'.

    Patricia Mitchell Newbie

      We are using JBoss 5.1.0.GA and are receiving the following error frequently in production.  We have 2 JBoss instances connecting to the same SQL Server

       

      database.  The only way we have been able to resolve this issue is to delete the records in the JBM_ID_CACHE table. 

       

      2013-02-12 16:04:31,500 WARN  [org.jboss.messaging.core.impl.JDBCSupport] Trying again after a pause

      2013-02-12 16:04:31,729 WARN  [org.jboss.messaging.core.impl.JDBCSupport] SQLException caught, SQLState 23000 code:2627- assuming deadlock detected, try:21

      java.sql.SQLException: [DataDirect][SQLServer JDBC Driver][SQLServer]Violation of PRIMARY KEY constraint 'PK__JBM_ID_C__009CB91350C6C558'. Cannot insert duplicate key in object 'dbo.JBM_ID_CACHE'.

      at com.ddtek.jdbc.base.BaseExceptions.createException(Unknown Source)

      at com.ddtek.jdbc.base.BaseExceptions.getException(Unknown Source)

      at com.ddtek.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)

      at com.ddtek.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)

      at com.ddtek.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)

      at com.ddtek.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)

      at com.ddtek.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)

      at com.ddtek.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)

      at com.ddtek.jdbc.base.BaseStatement.postImplExecute(Unknown Source)

      at com.ddtek.jdbc.base.BasePreparedStatement.postImplExecute(Unknown Source)

      at com.ddtek.jdbc.base.BaseStatement.commonExecute(Unknown Source)

      at com.ddtek.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)

      at com.ddtek.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)

      at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:365)

      at org.jboss.messaging.core.impl.JDBCPersistenceManager.cacheID(JDBCPersistenceManager.java:1637)

      at org.jboss.messaging.core.impl.JDBCPersistenceManager$1AddReferenceRunner.doTransaction(JDBCPersistenceManager.java:1370)

      at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.execute(JDBCSupport.java:474)

      at org.jboss.messaging.core.impl.JDBCSupport$JDBCTxRunner2.executeWithRetry(JDBCSupport.java:512)

      at org.jboss.messaging.core.impl.JDBCPersistenceManager.addReference(JDBCPersistenceManager.java:1408)

      at org.jboss.messaging.core.impl.ChannelSupport.handle(ChannelSupport.java:227)

      at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.routeInternal(MessagingPostOffice.java:2222)

      at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.route(MessagingPostOffice.java:509)

      at org.jboss.jms.server.endpoint.ServerConnectionEndpoint.sendMessage(ServerConnectionEndpoint.java:755)

      at org.jboss.jms.server.endpoint.ServerSessionEndpoint.send(ServerSessionEndpoint.java:399)

      at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advised$SessionAdvised$send$aop(SessionAdvised.java:87)

      at org.jboss.jms.server.endpoint.advised.SessionAdvised$send_7280680627620114891.invokeTarget(SessionAdvised$send_7280680627620114891.java)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

      at org.jboss.jms.server.container.SecurityAspect.handleSend(SecurityAspect.java:157)

      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 org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.jms.server.endpoint.advised.SessionAdvised.send(SessionAdvised.java)

      at org.jboss.jms.wireformat.SessionSendRequest.serverInvoke(SessionSendRequest.java:95)

      at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:143)

      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)

      at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)

      at org.jboss.remoting.Client.invoke(Client.java:1724)

      at org.jboss.remoting.Client.invoke(Client.java:629)

      at org.jboss.remoting.Client.invoke(Client.java:617)

      at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)

      at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)

      at org.jboss.jms.client.delegate.ClientSessionDelegate.org$jboss$jms$client$delegate$ClientSessionDelegate$send$aop(ClientSessionDelegate.java:499)

      at org.jboss.jms.client.delegate.ClientSessionDelegate$send_6145266547759487588.invokeTarget(ClientSessionDelegate$send_6145266547759487588.java)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

      at org.jboss.jms.client.container.SessionAspect.handleSend(SessionAspect.java:661)

      at org.jboss.aop.advice.org.jboss.jms.client.container.SessionAspect_z_handleSend_3721413.invoke(SessionAspect_z_handleSend_3721413.java)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:92)

      at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)

      at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)

      at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:269)

      at org.jboss.aop.advice.org.jboss.jms.client.container.ProducerAspect_z_handleSend_3721413.invoke(ProducerAspect_z_handleSend_3721413.java)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)

      at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)

      at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)

      at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:207)

      at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)

      at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)

      at com.dwsolutions.pta.ejb.services.mailmanager.MailManagerBean.sendMail(MailManagerBean.java:159)

      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 org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

      at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)

      at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)

      at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)

      at sun.reflect.GeneratedMethodAccessor2507.invoke(Unknown Source)

      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      at java.lang.reflect.Method.invoke(Method.java:597)

      at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)

      at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_3721413.invoke(InvocationContextInterceptor_z_fillMethod_3721413.java)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)

      at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_3721413.invoke(InvocationContextInterceptor_z_setup_3721413.java)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)

      at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

      at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

      at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:176)

      at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:216)

      at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)

      at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)

      at $Proxy519.sendMail(Unknown Source)

      at com.dwsolutions.pta.web.action.AccessPersonAction.sendPasswordResetEmail(AccessPersonAction.java:2050)

      at com.dwsolutions.pta.web.action.AccessPersonAction.resetPassword(AccessPersonAction.java:1370)

      at com.dwsolutions.pta.web.action.AccessPersonAction.execute(AccessPersonAction.java:178)

      at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)

      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)

      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)

      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.owasp.csrfguard.CsrfGuardFilter.doFilter(CsrfGuardFilter.java:58)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at com.dwsolutions.pta.filter.ESAPIFilter.doFilter(ESAPIFilter.java:228)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at com.dwsolutions.pta.filter.CheckLogonFilter.doFilter(CheckLogonFilter.java:108)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at com.dwsolutions.pta.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:37)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)

      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)

      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)

      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)

      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)

      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)

      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)

      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)

      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)

      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)

      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)

      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)

      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)

      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)

      at java.lang.Thread.run(Thread.java:662)