I'm trying to deploy the springSyncServiceContacts
code, and the ant builddb
step claims to succeed, but the SQL statements actually fail to execute.
I've traced this to two problems listed below. I believe I downloaded the code from this site, but it seems this code could never have worked, so I'll try getting a version directly from the git repository. In the meantime, if anyone has actually run this REST service, I'd be interested in knowing what exact code you used.
The file src/com/enterpriseandroid/springServiceContacts/dataModel/Contact.java
has a @GeneratedValue
annotation on a String
private String id;
This problem causes Hibernate to generate invalid SQL DDL.
The file contact.jdbc.sql
creates a table called contact_sync
but then attempts to create two indexes on a non-existent contact
CREATE TABLE contact_sync
id varchar(50) NOT NULL,
firstName varchar(255) NOT NULL,
lastName varchar(255) NOT NULL,
updateTime bigint(20) NOT NULL,
version bigint(20) NOT NULL,
PRIMARY KEY (id)
create index updateTimeIndex on contact (updateTime);
create index firstNameIndex on contact (firstName);
The first problem seems nontrivial to fix, but the second one may be trivial. If I push through and get this REST service running, I'll post my patches.