1. mbnoimi@test-pc /home/mbnoimi/symmetric/tutorial/sym-corp/symmetric-3.5.18/samples $ ../bin/dbimport --engine corp-000 --format XML create_sample.xmlLog output will be written to ../logs/symmetric.log
  2. [] - AbstractCommandLauncher - Option: name=engine, value={corp-000}
  3. [] - AbstractCommandLauncher - Option: name=format, value={XML}
  4. -------------------------------------------------------------------------------
  5. An exception occurred.  Please see the following for details:
  6. -------------------------------------------------------------------------------
  7. java.lang.RuntimeException: Cannot find file create_sample.xml
  8.     at org.jumpmind.symmetric.DbImportCommand.executeWithOptions(DbImportCommand.java:183)
  9.     at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:130)
  10.     at org.jumpmind.symmetric.DbImportCommand.main(DbImportCommand.java:72)
  11. -------------------------------------------------------------------------------
  12. mbnoimi@test-pc /home/mbnoimi/symmetric/tutorial/sym-corp/symmetric-3.5.18/samples $ ../bin/dbimport --engine corp-000 --format XML '/home/mbnoimi/symmetric/tutorial/sym-corp/symmetric-3.5.18/samples/create_sample.xml'
  13. Log output will be written to ../logs/symmetric.log
  14. [] - AbstractCommandLauncher - Option: name=engine, value={corp-000}
  15. [] - AbstractCommandLauncher - Option: name=format, value={XML}
  16. [] - DatabaseWriter - Did not find the item table in the target database
  17. [] - DatabaseWriter - About to create table using the following definition: <table name="item">
  18.         <column name="item_id" primaryKey="true" required="true" type="INTEGER"/>
  19.         <column name="name" type="VARCHAR" size="100"/>
  20.     </table>
  21. [] - DatabaseWriter - Did not find the item_selling_price table in the target database
  22. [] - DatabaseWriter - About to create table using the following definition: <table name="item_selling_price">
  23.         <column name="item_id" primaryKey="true" required="true" type="INTEGER"/>
  24.         <column name="store_id" primaryKey="true" required="true" type="VARCHAR" size="5"/>
  25.         <column name="price" required="true" type="DECIMAL" size="10,2"/>
  26.         <column name="cost" type="DECIMAL" size="10,2"/>
  27.         <foreign-key name="fk_price_item_id" foreignTable="item">
  28.             <reference local="item_id" foreign="item_id"/>
  29.         </foreign-key>
  30.     </table>
  31. [] - JdbcSqlTemplate - [SQLITE_ERROR] SQL error or missing database (near "CONSTRAINT": syntax error).  Failed to execute: ALTER TABLE "item_selling_price"
  32. ADD CONSTRAINT "fk_price_item_id" FOREIGN KEY ("item_id") REFERENCES "item" ("item_id")
  33. [] - DatabaseWriter - Failed to alter table using the following xml: <table name="item_selling_price">
  34.         <column name="item_id" primaryKey="true" required="true" type="INTEGER"/>
  35.         <column name="store_id" primaryKey="true" required="true" type="VARCHAR" size="5"/>
  36.         <column name="price" required="true" type="DECIMAL" size="10,2"/>
  37.         <column name="cost" type="DECIMAL" size="10,2"/>
  38.         <foreign-key name="fk_price_item_id" foreignTable="item">
  39.             <reference local="item_id" foreign="item_id"/>
  40.         </foreign-key>
  41.     </table>
  42. -------------------------------------------------------------------------------
  43. An exception occurred.  Please see the following for details:
  44. -------------------------------------------------------------------------------
  45. java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (near "CONSTRAINT": syntax error)
  46.     at org.sqlite.DB.newSQLException(DB.java:886)
  47.     at org.sqlite.DB.newSQLException(DB.java:897)
  48.     at org.sqlite.DB.throwex(DB.java:864)
  49.     at org.sqlite.NativeDB.prepare(Native Method)
  50.     at org.sqlite.DB.prepare(DB.java:207)
  51.     at org.sqlite.Stmt.execute(Stmt.java:152)
  52.     at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
  53.     at org.apache.commons.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
  54.     at org.jumpmind.db.sql.JdbcSqlTemplate$6.execute(JdbcSqlTemplate.java:343)
  55.     at org.jumpmind.db.sql.JdbcSqlTemplate$6.execute(JdbcSqlTemplate.java:330)
  56.     at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:415)
  57.  [wrapped] org.jumpmind.db.sql.SqlException: [SQLITE_ERROR] SQL error or missing database (near "CONSTRAINT": syntax error)
  58.     at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:288)
  59.     at org.jumpmind.db.sql.AbstractSqlTemplate.translate(AbstractSqlTemplate.java:279)
  60.     at org.jumpmind.db.sql.JdbcSqlTemplate.execute(JdbcSqlTemplate.java:417)
  61.     at org.jumpmind.db.sql.JdbcSqlTemplate.update(JdbcSqlTemplate.java:330)
  62.     at org.jumpmind.db.sql.SqlScript.execute(SqlScript.java:107)
  63.     at org.jumpmind.db.sql.SqlScript.execute(SqlScript.java:102)
  64.     at org.jumpmind.db.platform.AbstractDatabasePlatform.createDatabase(AbstractDatabasePlatform.java:169)
  65.     at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.create(DatabaseWriter.java:941)
  66.     at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.write(DatabaseWriter.java:202)
  67.     at org.jumpmind.symmetric.io.data.writer.DatabaseWriter.write(DatabaseWriter.java:167)
  68.     at org.jumpmind.symmetric.io.data.DataProcessor.forEachDataInTable(DataProcessor.java:194)
  69.     at org.jumpmind.symmetric.io.data.DataProcessor.forEachTableInBatch(DataProcessor.java:164)
  70.     at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:114)
  71.     at org.jumpmind.symmetric.io.data.DataProcessor.process(DataProcessor.java:78)
  72.     at org.jumpmind.symmetric.io.data.DbImport.importTablesFromXml(DbImport.java:208)
  73.     at org.jumpmind.symmetric.io.data.DbImport.importTables(DbImport.java:154)
  74.     at org.jumpmind.symmetric.DbImportCommand.executeWithOptions(DbImportCommand.java:188)
  75.     at org.jumpmind.symmetric.AbstractCommandLauncher.execute(AbstractCommandLauncher.java:130)
  76.     at org.jumpmind.symmetric.DbImportCommand.main(DbImportCommand.java:72)
  77. -------------------------------------------------------------------------------
  78. mbnoimi@test-pc /home/mbnoimi/symmetric/tutorial/sym-corp/symmetric-3.5.18/samples $