View Issue Details

IDProjectCategoryView StatusLast Update
0000360SymmetricDSBugpublic2014-08-27 21:02
ReporterAssigned Toelong 
PriorityurgentSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version 
Target VersionFixed in Version3.0.0 
Summary0000360: Fallback for insert statements doesn't work
Description"We've found an error using fallback for insert statements, but for update statements the fallback does work correctly. *Important:* We are using Symmetric 1.7.11 using a fully-connected topology not client/server, where all the computers of the network are client and server at the same time, so if an insert/update/delete statement is done at one computer then this statement is automatically replicated to all of the other computers of the network using a push service approach. We've reproduced this error following the next steps: # Configure 3 computers with the same environment # Disconnect from the network the 3 computers # Save a comment @computer01 (this makes an insert on table MESSAGES) # Connect computer02 that receives this insert statement correctly, and update this comment @computer02 (this makes and update on table MESSAGES) # Connect computer03 that first receives the update statement from computer02 that causes that fallback for update statements works as an insert statement, but when receives the insert statement from computer01, the insert statement is not processed correctly. Here it is the stacktrace of the error @computer03 for more details. Thanks a lot for your help. ||Stacktrace|| |2010-10-20 18:41:38,000 ERROR (DataLoaderService.java:249) Failed to load batch N-0000-0001-1624 java.lang.RuntimeException: Unable to update MESSAGES: {insert,QxZaNpXBHA8RFSGq+k4lQWDcC07Qjz78q6a+5aWz8SXAFF774mEXqQKHA67whqeZWHp9H893XaauSyd6oeoIozsLXx2NsvpRpbN+jtSaOv4=,<null>,<null>} at org.jumpmind.symmetric.load.csv.CsvLoader.insert(CsvLoader.java:297) at org.jumpmind.symmetric.load.csv.CsvLoader.load(CsvLoader.java:137) at sun.reflect.GeneratedMethodAccessor125.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy12.load(Unknown Source) at org.jumpmind.symmetric.service.impl.DataLoaderService$TransactionalLoadDelegate.doInTransaction(DataLoaderService.java:514) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at org.jumpmind.symmetric.service.impl.DataLoaderService.loadBatch(DataLoaderService.java:483) at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataAndReturnBatches(DataLoaderService.java:211) at org.jumpmind.symmetric.service.impl.DataLoaderService.loadData(DataLoaderService.java:395) at org.jumpmind.symmetric.transport.handler.PushResourceHandler.push(PushResourceHandler.java:37) at org.jumpmind.symmetric.web.PushServlet.handlePut(PushServlet.java:64) at org.jumpmind.symmetric.web.SymmetricServlet.handlePut(SymmetricServlet.java:173) at org.jumpmind.symmetric.web.AbstractServlet.doPut(AbstractServlet.java:155) at javax.servlet.http.HttpServlet.service(HttpServlet.java:730) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148) at org.jumpmind.symmetric.web.SymmetricFilter$SymmetricFilterChain.doFilter(SymmetricFilter.java:151) at org.jumpmind.symmetric.web.SymmetricFilter$SymmetricFilterChain.doFilter(SymmetricFilter.java:145) at org.jumpmind.symmetric.web.compression.CompressionFilter.doFilter(CompressionFilter.java:157) at org.jumpmind.symmetric.web.CompressionFilter.doFilter(CompressionFilter.java:73) at org.jumpmind.symmetric.web.SymmetricFilter$SymmetricFilterChain.doFilter(SymmetricFilter.java:143) at org.jumpmind.symmetric.web.NodeConcurrencyFilter.doFilter(NodeConcurrencyFilter.java:74) at org.jumpmind.symmetric.web.SymmetricFilter$SymmetricFilterChain.doFilter(SymmetricFilter.java:143) at org.jumpmind.symmetric.web.InetAddressFilter.doFilter(InetAddressFilter.java:89) at org.jumpmind.symmetric.web.SymmetricFilter$SymmetricFilterChain.doFilter(SymmetricFilter.java:143) at org.jumpmind.symmetric.web.AuthenticationFilter.doFilter(AuthenticationFilter.java:68) at org.jumpmind.symmetric.web.SymmetricFilter$SymmetricFilterChain.doFilter(SymmetricFilter.java:143) at org.jumpmind.symmetric.web.SymmetricFilter.doFilter(SymmetricFilter.java:76) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1139) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:378) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [insert into MESSAGES(""DB_ID"",""TYPE"",""USER_ID"") values (?,?,?)]; Violación de indice de Unicidad ó Clave primaria: ""PRIMARY_KEY_3 ON PUBLIC.MESSAGES(DB_ID)"" Unique index or primary key violation: ""PRIMARY_KEY_3 ON PUBLIC.MESSAGES(DB_ID)""; SQL statement: insert into MESSAGES(""DB_ID"",""TYPE"",""USER_ID"") values (?,?,?) [23001-135]; nested exception is org.h2.jdbc.JdbcSQLException: Violación de indice de Unicidad ó Clave primaria: ""PRIMARY_KEY_3 ON PUBLIC.MESSAGES(DB_ID)"" Unique index or primary key violation: ""PRIMARY_KEY_3 ON PUBLIC.MESSAGES(DB_ID)""; SQL statement: insert into MESSAGES(""DB_ID"",""TYPE"",""USER_ID"") values (?,?,?) [23001-135] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:167) at org.h2.message.DbException.get(DbException.java:144) at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:157) at org.h2.index.PageBtree.find(PageBtree.java:115) at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:137) at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:92) at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:87) at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:78) at org.h2.index.MultiVersionIndex.add(MultiVersionIndex.java:49) at org.h2.table.RegularTable.addRow(RegularTable.java:116) at org.h2.command.dml.Insert.insertRows(Insert.java:120) at org.h2.command.dml.Insert.update(Insert.java:82) at org.h2.command.CommandContainer.update(CommandContainer.java:70) at org.h2.command.Command.executeUpdate(Command.java:199) at org.h2.server.TcpServerThread.process(TcpServerThread.java:297) at org.h2.server.TcpServerThread.run(TcpServerThread.java:134) at java.lang.Thread.run(Unknown Source) at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:228) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:607) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:792) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:850) at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:854) at org.jumpmind.symmetric.load.TableTemplate.execute(TableTemplate.java:384) at org.jumpmind.symmetric.load.TableTemplate.insert(TableTemplate.java:157) at org.jumpmind.symmetric.load.csv.CsvLoader.insert(CsvLoader.java:282) ... 49 more Caused by: org.h2.jdbc.JdbcSQLException: Violación de indice de Unicidad ó Clave primaria: ""PRIMARY_KEY_3 ON PUBLIC.MESSAGES(DB_ID)"" Unique index or primary key violation: ""PRIMARY_KEY_3 ON PUBLIC.MESSAGES(DB_ID)""; SQL statement: insert into MESSAGES(""DB_ID"",""TYPE"",""USER_ID"") values (?,?,?) [23001-135] at org.h2.message.DbException.getJdbcSQLException(DbException.java:327) at org.h2.message.DbException.get(DbException.java:167) at org.h2.message.DbException.get(DbException.java:144) at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:157) at org.h2.index.PageBtree.find(PageBtree.java:115) at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:137) at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:92) at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:87) at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:78) at org.h2.index.MultiVersionIndex.add(MultiVersionIndex.java:49) at org.h2.table.RegularTable.addRow(RegularTable.java:116) at org.h2.command.dml.Insert.insertRows(Insert.java:120) at org.h2.command.dml.Insert.update(Insert.java:82) at org.h2.command.CommandContainer.update(CommandContainer.java:70) at org.h2.command.Command.executeUpdate(Command.java:199) at org.h2.server.TcpServerThread.process(TcpServerThread.java:297) at org.h2.server.TcpServerThread.run(TcpServerThread.java:134) at java.lang.Thread.run(Unknown Source) at org.h2.engine.SessionRemote.done(SessionRemote.java:528) at org.h2.command.CommandRemote.executeUpdate(CommandRemote.java:190) at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:141) at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:127) at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101) at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:798) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591) ... 55 more|"
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2014-02-04 10:58 elong Status new => resolved
2014-02-04 10:58 elong Fixed in Version => 3.0.0
2014-02-04 10:58 elong Resolution open => fixed
2014-02-04 10:58 elong Assigned To => elong
2014-08-27 21:02 chenson Status resolved => closed