Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 2nd, 2012  |  syntax: None  |  size: 6.34 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. stupid error android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed
  2. 09-27 12:47:39.155: WARN/System.err(10899): android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed
  3. 09-27 12:47:39.155: WARN/System.err(10899):     at android.database.sqlite.SQLiteStatement.native_execute(Native Method)
  4. 09-27 12:47:39.155: WARN/System.err(10899):     at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:61)
  5. 09-27 12:47:39.155: WARN/System.err(10899):     at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1809)
  6. 09-27 12:47:39.165: WARN/System.err(10899):     at de.enough.appmate.dbase.CMSResource.updateItem(CMSResource.java:1279)
  7. 09-27 12:47:39.165: WARN/System.err(10899):     at de.enough.appmate.dbase.CMSResourceUpdater.updateItems(CMSResourceUpdater.java:178)
  8. 09-27 12:47:39.165: WARN/System.err(10899):     at de.enough.appmate.dbase.CMSResourceUpdater.loadUpdates(CMSResourceUpdater.java:102)
  9. 09-27 12:47:39.165: WARN/System.err(10899):     at de.enough.appmate.dbase.CMSResourceUpdaterRunnable.run(CMSResourceUpdaterRunnable.java:32)
  10. 09-27 12:47:39.165: WARN/System.err(10899):     at java.lang.Thread.run(Thread.java:1019)
  11.        
  12. this.db.execSQL("UPDATE " + CMSConstants.ITEMS + " SET " +
  13.                 CMSConstants.ID + "= ?, " +
  14.                 CMSConstants.TITLE + " = ?, " +
  15.                 CMSConstants.IS_PAGE + " = ?, " +
  16.                 CMSConstants.IS_HIDDEN + " = ?, " +
  17.                 CMSConstants.ITEM_TYPE + " = ?, " +
  18.                 CMSConstants.ORDER_INDEX + " = ?, " +
  19.                 CMSConstants.SECTION_ID + " = ?, " +
  20.                 CMSConstants.TABLE_SECTION_NAME + " = ?, " +
  21.                 CMSConstants.TABLE_SECTION_ID + " = ?, " +
  22.                 CMSConstants.IMAGE1_FILE + " = ?, " +
  23.                 CMSConstants.IMAGE1_CAPTION + " = ?, " +
  24.                 CMSConstants.IMAGE1_DISPLAY_IN_GALLERY + " = ?, " +
  25.                 CMSConstants.CATEGORY1 + " = ?, " +
  26.                 CMSConstants.CATEGORY2 + " = ?, " +
  27.                 CMSConstants.GEO_LONGITUDE + " = ?, " +
  28.                 CMSConstants.GEO_LATITUDE + " = ?, " +
  29.                 CMSConstants.DESCRIPTION + " = ?, " +
  30.                 CMSConstants.KEYWORDS + " = ?, " +
  31.                 CMSConstants.BLOCKWORDS + " = ?, " +
  32.                 CMSConstants.CLEAN_NAME + " = ?, " +
  33.                 CMSConstants.ADDITIONAL_FIELD1_NAME + " = ?, " +
  34.                 CMSConstants.ADDITIONAL_FIELD1_VALUE + " = ?, " +
  35.                 CMSConstants.ADDITIONAL_FIELD2_NAME + " = ?, " +
  36.                 CMSConstants.ADDITIONAL_FIELD2_VALUE + " = ?, " +
  37.                 CMSConstants.ADDITIONAL_FIELD3_NAME + " = ?, " +
  38.                 CMSConstants.ADDITIONAL_FIELD3_VALUE + " = ?, " +
  39.                 CMSConstants.ADDITIONAL_FIELD4_NAME + " = ?, " +
  40.                 CMSConstants.ADDITIONAL_FIELD4_VALUE + " = ?, " +
  41.                 CMSConstants.ADDRESS_LINE1 + " = ?, " +
  42.                 CMSConstants.ADDRESS_LINE2 + " = ?, " +
  43.                 CMSConstants.ADDRESS_LINE3 + " = ?, " +
  44.                 CMSConstants.ADDRESS_LINE4 + " = ?, " +
  45.                 CMSConstants.ADDRESS_LINE5 + " = ?, " +
  46.                 CMSConstants.ADDRESS_POSTCODE + " = ?, " +
  47.                 CMSConstants.CONTACT_EMAIL + " = ?, " +
  48.                 CMSConstants.CONTACT_EMAIL_DISPLAY + " = ?, " +
  49.                 CMSConstants.CONTACT_EMAIL_SUBJECT + " = ?, " +
  50.                 CMSConstants.CONTACT_TEL + " = ?, " +
  51.                 CMSConstants.CONTACT_TEL_DISPLAY + " = ?, " +
  52.                 CMSConstants.CONTACT_WEB + " = ?, " +
  53.                 CMSConstants.CONTACT_WEB_DISPLAY + " = ?, " +
  54.                 CMSConstants.MODIFICATION_DATE + " = ?, " +
  55.                 CMSConstants.PAGE_HEADER + " = ?"
  56.                 , bindArgs);
  57.        
  58. String[] bindArgs = {
  59.                 (String) item.get(CMSConstants.ID),
  60.                 (String) item.get(CMSConstants.TITLE),
  61.                 (String) item.get(CMSConstants.IS_PAGE),
  62.                 (String) item.get(CMSConstants.IS_HIDDEN),
  63.                 (String) item.get(CMSConstants.ITEM_TYPE),
  64.                 (String) item.get(CMSConstants.ORDER_INDEX),
  65.                 (String) item.get(CMSConstants.SECTION_ID),
  66.                 "",
  67.                 "",
  68.                 (String) item.get(CMSConstants.IMAGE1_FILE),
  69.                 (String) item.get(CMSConstants.IMAGE1_CAPTION),
  70.                 (String) item.get(CMSConstants.IMAGE1_DISPLAY_IN_GALLERY),
  71.                 (String) item.get(CMSConstants.CATEGORY1),
  72.                 (String) item.get(CMSConstants.CATEGORY2),
  73.                 (String) item.get(CMSConstants.GEO_LONGITUDE),
  74.                 (String) item.get(CMSConstants.GEO_LATITUDE),
  75.                 (String) item.get(CMSConstants.DESCRIPTION),
  76.                 (String) item.get(CMSConstants.KEYWORDS),
  77.                 (String) item.get(CMSConstants.BLOCKWORDS),
  78.                 (String) item.get(CMSConstants.CLEAN_NAME),
  79.                 (String) item.get(CMSConstants.ADDITIONAL_FIELD1_NAME),
  80.                 (String) item.get(CMSConstants.ADDITIONAL_FIELD1_VALUE),
  81.                 (String) item.get(CMSConstants.ADDITIONAL_FIELD2_NAME),
  82.                 (String) item.get(CMSConstants.ADDITIONAL_FIELD2_VALUE),
  83.                 (String) item.get(CMSConstants.ADDITIONAL_FIELD3_NAME),
  84.                 (String) item.get(CMSConstants.ADDITIONAL_FIELD3_VALUE),
  85.                 (String) item.get(CMSConstants.ADDITIONAL_FIELD4_NAME),
  86.                 (String) item.get(CMSConstants.ADDITIONAL_FIELD4_VALUE),
  87.                 (String) item.get(CMSConstants.ADDRESS_LINE1),
  88.                 (String) item.get(CMSConstants.ADDRESS_LINE2),
  89.                 (String) item.get(CMSConstants.ADDRESS_LINE3),
  90.                 (String) item.get(CMSConstants.ADDRESS_LINE4),
  91.                 (String) item.get(CMSConstants.ADDRESS_LINE5),
  92.                 (String) item.get(CMSConstants.ADDRESS_POSTCODE),
  93.                 (String) item.get(CMSConstants.CONTACT_EMAIL),
  94.                 (String) item.get(CMSConstants.CONTACT_EMAIL_DISPLAY),
  95.                 (String) item.get(CMSConstants.CONTACT_EMAIL_SUBJECT),
  96.                 (String) item.get(CMSConstants.CONTACT_TEL),
  97.                 (String) item.get(CMSConstants.CONTACT_TEL_DISPLAY),
  98.                 (String) item.get(CMSConstants.CONTACT_WEB),
  99.                 (String) item.get(CMSConstants.CONTACT_WEB_DISPLAY),
  100.                 (String) item.get(CMSConstants.MODIFICATION_DATE),
  101.                 (String) item.get(CMSConstants.PAGE_HEADER)
  102.         };