View Issue Details

IDProjectCategoryView StatusLast Update
0001979SymmetricDSBugpublic2014-09-30 10:18
ReporterrottenAssigned Tochenson 
Priorityhigh 
Status closedResolutionfixed 
Product Version3.6.8 
Target Version3.6.9Fixed in Version3.6.9 
Summary0001979: Broken replication on tables with uuid field
DescriptionI upgraded a single node from 3.6.6 to 3.6.8 this afternoon.

Within a short while I got an exception replicating a row. (from PostgreSQL 9.3 to PostgreSQL 9.3)

I stopped the node.
Then I manually removed the batch from sym_incoming_batch and sym_incoming_error.

And started the node back up with the 3.6.6 code.
It looks like the row went right through without issues.

I've pasted the exception in the "Additional Information" box for this ticket.
Additional Information2014-09-18 15:17:56,513 INFO [SymmetricDS] [IncomingBatchService] [qtp1238599924-18] Retrying batch gearboxdb1-50956
2014-09-18 15:17:56,542 INFO [SymmetricDS] [DefaultDatabaseWriter] [qtp1238599924-18] Failed to process a insert event in batch 50956.
Failed sql was: insert into "gear"."campaigns"("campaign_id", "client_id", "description", "dev_base_url", "prod_base_url", "job_number") (select cast(? as uuid),cast(? as uuid),?,?,?,? where (select distinct 1 from "gear"."campaigns" where "campaign_id" = cast(? as uuid) and ) is null)
Failed sql parameters: [cf05bfb3-0da9-4839-a67c-7e2594f4a378, 6ba6c32c-bbdb-409a-ab6b-62602a1432bf, Women's Product, , somecompany.com, CG141002, cf05bfb3-0da9-4839-a67c-7e2594f4a378]
Failed sql parameters types: [1111, 1111, -1, -1, -1, -1, 1111]
Failed row data was: "cf05bfb3-0da9-4839-a67c-7e2594f4a378","6ba6c32c-bbdb-409a-ab6b-62602a1432bf","Women's Product"," ","cenegenics.com","CG141002"

2014-09-18 15:17:56,545 ERROR [SymmetricDS] [DataLoaderService] [qtp1238599924-18] Failed to load batch gearboxdb1-50956 because: ERROR: syntax error at or near ")"
  Position: 269
org.jumpmind.db.sql.SqlException: ERROR: syntax error at or near ")"
  Position: 269
    at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:288)
    at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:279)
    at org.jumpmind.db.sql.JdbcSqlTransaction.addRow(JdbcSqlTransaction.java:410)
    at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.execute(DefaultDatabaseWriter.java:803)
    at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.insert(DefaultDatabaseWriter.java:174)
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:154)
    at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:131)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.model.ProcessInfoDataWriter.write(ProcessInfoDataWriter.java:65)
    at org.jumpmind.symmetric.io.data.writer.NestedDataWriter.write(NestedDataWriter.java:64)
    at org.jumpmind.symmetric.io.data.writer.TransformWriter.write(TransformWriter.java:236)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:199)
    at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:169)
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:115)
    at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener.end(DataLoaderService.java:802)
    at org.jumpmind.symmetric.io.data.writer.StagingDataWriter.notifyEndBatch(StagingDataWriter.java:75)
    at org.jumpmind.symmetric.io.data.writer.AbstractProtocolDataWriter.end(AbstractProtocolDataWriter.java:220)
    at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:129)
    at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromTransport(DataLoaderService.java:431)
    at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromPush(DataLoaderService.java:345)
    at org.jumpmind.symmetric.web.PushUriHandler.push(PushUriHandler.java:79)
    at org.jumpmind.symmetric.web.PushUriHandler.handle(PushUriHandler.java:66)
    at org.jumpmind.symmetric.web.SymmetricServlet.service(SymmetricServlet.java:103)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:565)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:479)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1031)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:186)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:965)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
    at org.eclipse.jetty.server.Server.handle(Server.java:348)
    at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:452)
    at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:894)
    at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:948)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
    at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
    at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
    at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
    at java.lang.Thread.run(Thread.java:744)
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near ")"
  Position: 269
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
    at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
    at org.jumpmind.db.sql.JdbcSqlTransaction.addRow(JdbcSqlTransaction.java:406)
    ... 44 more
TagsNo tags attached.

Activities

chenson

2014-09-18 16:25

administrator   ~0000585

This is because of the uuid type. We'll get a patch out fairly quickly. Thanks for the bug report.

Related Changesets

SymmetricDS: master 1093f7ca

2014-09-18 16:26:17

chenson

Details Diff
0001979: broken replication on tables with uuid field
0001979
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/mysql/MySqlDmlStatement.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/oracle/OracleDmlStatement.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDmlStatement.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/sql/DmlStatement.java Diff File

Issue History

Date Modified Username Field Change
2014-09-18 15:36 rotten New Issue
2014-09-18 16:25 chenson Note Added: 0000585
2014-09-18 16:25 chenson Summary broken replication => broken replication on tables with uuid field
2014-09-18 16:26 chenson Status new => resolved
2014-09-18 16:26 chenson Fixed in Version => 3.6.9
2014-09-18 16:26 chenson Resolution open => fixed
2014-09-18 16:26 chenson Assigned To => chenson
2014-09-18 16:27 chenson Target Version => 3.6.9
2014-09-18 16:43 chenson Summary broken replication on tables with uuid field => Broken replication on tables with uuid field
2014-09-18 17:00 chenson Changeset attached => SymmetricDS 3.6 r8724
2014-09-18 17:00 chenson Changeset attached => SymmetricDS trunk r8725
2014-09-30 10:18 chenson Status resolved => closed
2015-07-30 21:49 chenson Changeset attached => SymmetricDS master 1093f7ca