Getting duplicate entry exception
ashishjha Jul 23, 2007 5:52 AMI am getting duplicate entry exception here.
Please help in solving this.
ERROR [org.jboss.cache.loader.JDBCCacheLoader] Failed to insert node: Duplicate entry '/fare/BOM/BHO' for key 1 com.mysql.jdbc.exceptions.MySQLIntegrityConstraintViolationException: Duplicate entry '/fare/BOM/BHO' for key 1 at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:931) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573) at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1160) at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:685) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1400) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1314) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1299) at org.jboss.cache.loader.JDBCCacheLoader.insertNode(JDBCCacheLoader.java:969) at org.jboss.cache.loader.JDBCCacheLoader.put(JDBCCacheLoader.java:321) at org.jboss.cache.loader.JDBCCacheLoader.put(JDBCCacheLoader.java:358) at org.jboss.cache.loader.JDBCCacheLoader.prepare(JDBCCacheLoader.java:522) at org.jboss.cache.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:296) at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:130) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68) at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:197) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68) at org.jboss.cache.interceptors.TxInterceptor.runPreparePhase(TxInterceptor.java:804) at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1069) at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:75) at org.jboss.cache.transaction.DummyTransaction.notifyBeforeCompletion(DummyTransaction.java:247) at org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:54) at org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:61) at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:349) at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:156) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68) at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:157) at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5520) at org.jboss.cache.TreeCache.put(TreeCache.java:3678) at com.tg.cache.manager.FareCacheProviderImpl.addToCache(FareCacheProviderImpl.java:104) at com.tg.ws.abacus.AbacusFareService.putResponseInCache(AbacusFareService.java:615) at com.tg.ws.abacus.AbacusFareService_1_5.getFaresFromCacheOrWSForRequest(AbacusFareService_1_5.java:187) at com.tg.ws.abacus.FarePoolHandler.execute(FarePoolHandler.java:29) at com.tg.ws.abacus.FarePoolHandler.execute(FarePoolHandler.java:15) at com.tg.parallel.concurrent.JavaConcurrentPoolExecutor$CallableAdapter.call(JavaConcurrentPoolExecutor.java:93) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) 2007-07-20 04:26:24,810 ERROR [org.jboss.cache.transaction.DummyTransaction] beforeCompletion() failed for tx=org.jboss.cache.transaction.DummyTransaction@594481, handlers=[TxInterceptor.LocalSynchronizationHandler(gtx=GlobalTransaction:<null>:1315, tx=org.jboss.cache.transaction.DummyTransaction@594481)] java.lang.RuntimeException: at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1091) at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:75) at org.jboss.cache.transaction.DummyTransaction.notifyBeforeCompletion(DummyTransaction.java:247) at org.jboss.cache.transaction.DummyTransaction.commit(DummyTransaction.java:54) at org.jboss.cache.transaction.DummyBaseTransactionManager.commit(DummyBaseTransactionManager.java:61) at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:349) at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:156) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68) at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:157) at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5520) at org.jboss.cache.TreeCache.put(TreeCache.java:3678) at com.tg.cache.manager.FareCacheProviderImpl.addToCache(FareCacheProviderImpl.java:104) at com.tg.ws.abacus.AbacusFareService.putResponseInCache(AbacusFareService.java:615) at com.tg.ws.abacus.AbacusFareService_1_5.getFaresFromCacheOrWSForRequest(AbacusFareService_1_5.java:187) at com.tg.ws.abacus.FarePoolHandler.execute(FarePoolHandler.java:29) at com.tg.ws.abacus.FarePoolHandler.execute(FarePoolHandler.java:15) at com.tg.parallel.concurrent.JavaConcurrentPoolExecutor$CallableAdapter.call(JavaConcurrentPoolExecutor.java:93) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.IllegalStateException: Failed to insert node: Duplicate entry '/fare/BOM/BHO' for key 1 at org.jboss.cache.loader.JDBCCacheLoader.insertNode(JDBCCacheLoader.java:982) at org.jboss.cache.loader.JDBCCacheLoader.put(JDBCCacheLoader.java:321) at org.jboss.cache.loader.JDBCCacheLoader.put(JDBCCacheLoader.java:358) at org.jboss.cache.loader.JDBCCacheLoader.prepare(JDBCCacheLoader.java:522) at org.jboss.cache.interceptors.CacheStoreInterceptor.prepareCacheLoader(CacheStoreInterceptor.java:296) at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:130) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68) at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:197) at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68) at org.jboss.cache.interceptors.TxInterceptor.runPreparePhase(TxInterceptor.java:804) at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1069) ... 21 more