2015-04-18 16:33:24,074 INFO [post] [IncomingBatchService] [post-job-1] Retrying batch 000-715670
2015-04-18 16:33:24,136 INFO [post] [DefaultDatabaseWriter] [post-job-1] About to create table using the following definition:
2015-04-18 16:33:24,136 INFO [post] [SqliteDatabasePlatform] [post-job-1] Running alter sql:
CREATE TABLE "cards"(
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"code" INTEGER NOT NULL,
"type" INTEGER NOT NULL,
"expiry_date" TIMESTAMP,
"restricted_by" VARCHAR,
"people_id" INTEGER,
"card_number" INTEGER,
"issued" INTEGER DEFAULT 0 NOT NULL,
FOREIGN KEY ("type") REFERENCES "cardtypes" ("card_type_id"),
FOREIGN KEY ("location") REFERENCES "locations" ("loc_id"),
FOREIGN KEY ("people_id") REFERENCES "people" ("id")
);
CREATE UNIQUE INDEX "IX_cards_code" ON "cards" ("code");
CREATE INDEX "IX_cards_people_id" ON "cards" ("people_id");
2015-04-18 16:33:24,136 WARN [post] [JdbcSqlTemplate] [post-job-1] [SQLITE_ERROR] SQL error or missing database (unknown column "location" in foreign key definition). Failed to execute: CREATE TABLE "cards"(
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"code" INTEGER NOT NULL,
"type" INTEGER NOT NULL,
"expiry_date" TIMESTAMP,
"restricted_by" VARCHAR,
"people_id" INTEGER,
"card_number" INTEGER,
"issued" INTEGER DEFAULT 0 NOT NULL,
FOREIGN KEY ("type") REFERENCES "cardtypes" ("card_type_id"),
FOREIGN KEY ("location") REFERENCES "locations" ("loc_id"),
FOREIGN KEY ("people_id") REFERENCES "people" ("id")
)
2015-04-18 16:33:24,136 ERROR [post] [DefaultDatabaseWriter] [post-job-1] Failed to alter table using the following xml:
2015-04-18 16:33:24,136 ERROR [post] [DataLoaderService] [post-job-1] Failed to load batch 000-715670 because: [SQLITE_ERROR] SQL error or missing database (unknown column "location" in foreign key definition)
org.jumpmind.db.sql.SqlException: [SQLITE_ERROR] SQL error or missing database (unknown column "location" in foreign key definition)
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.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:434)
at org.jumpmind.db.sql.JdbcSqlTemplate.update(JdbcSqlTemplate.java:344)
at org.jumpmind.db.sql.SqlScript.execute(SqlScript.java:107)
at org.jumpmind.db.platform.AbstractDatabasePlatform.alterTables(AbstractDatabasePlatform.java:204)
at org.jumpmind.db.platform.AbstractDatabasePlatform.alterDatabase(AbstractDatabasePlatform.java:177)
at org.jumpmind.symmetric.io.data.writer.DefaultDatabaseWriter.create(DefaultDatabaseWriter.java:508)
at org.jumpmind.symmetric.io.data.writer.AbstractDatabaseWriter.write(AbstractDatabaseWriter.java:167)
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:204)
at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:200)
at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:170)
at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:116)
at org.jumpmind.symmetric.service.impl.DataLoaderService$LoadIntoDatabaseOnArrivalListener.end(DataLoaderService.java:820)
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:130)
at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromTransport(DataLoaderService.java:430)
at org.jumpmind.symmetric.service.impl.DataLoaderService.loadDataFromPull(DataLoaderService.java:267)
at org.jumpmind.symmetric.service.impl.PullService.execute(PullService.java:135)
at org.jumpmind.symmetric.service.impl.NodeCommunicationService$2.run(NodeCommunicationService.java:317)
at org.jumpmind.symmetric.service.impl.NodeCommunicationService.execute(NodeCommunicationService.java:331)
at org.jumpmind.symmetric.service.impl.PullService.pullData(PullService.java:105)
at org.jumpmind.symmetric.job.PullJob.doJob(PullJob.java:39)
at org.jumpmind.symmetric.job.AbstractJob.invoke(AbstractJob.java:177)
at org.jumpmind.symmetric.job.AbstractJob.run(AbstractJob.java:224)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (unknown column "location" in foreign key definition)
at org.sqlite.core.DB.newSQLException(DB.java:890)
at org.sqlite.core.DB.newSQLException(DB.java:901)
at org.sqlite.core.DB.throwex(DB.java:868)
at org.sqlite.core.NativeDB.prepare(Native Method)
at org.sqlite.core.DB.prepare(DB.java:211)
at org.sqlite.jdbc3.JDBC3Statement.execute(JDBC3Statement.java:60)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
at org.jumpmind.db.sql.JdbcSqlTemplate$6.execute(JdbcSqlTemplate.java:358)
at org.jumpmind.db.sql.JdbcSqlTemplate$6.execute(JdbcSqlTemplate.java:344)
at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:432)
... 34 more
2015-04-18 16:33:24,277 INFO [post] [PullService] [post-job-1] There was a failure while pulling data from main:000:000. 1 rows and 1 batches were processed