title: Failing Android Service on Motorola Droid line
body: <p>I have an Android Service that parses large xml files and stores the data in a sqlite database. This architecture has run without too many problems, but recently there has been trouble on several different models of Motorola phones.</p>
  
  <p>Here is the error:</p>
  
  <pre><code>    12-05 08:41:23.708: I/SqliteDatabaseCpp(19152): sqlite returned: error code = 14, msg = cannot open file at line 27360 of [8609a15dfa], db=/data/data/com.dsndata.sds2mobile.status.activities/databases/jobs.db
  12-05 08:41:23.708: I/SqliteDatabaseCpp(19152): sqlite returned: error code = 14, msg = os_unix.c: open() at line 27360 - "" errno=24 path=/data/data/com.dsndata.sds2mobile.status.activities/databases, db=/data/data/com.dsndata.sds2mobile.status.activities/databases/jobs.db
  12-05 08:41:23.708: I/SqliteDatabaseCpp(19152): sqlite returned: error code = 14, msg = statement aborts at 28: [INSERT INTO JOBNAMETechnip_All_x_x_x_x_units_submaterial(Main,Description,Grade,Weight,Piecemark,Length,Finish,MaterialType,MemberGuid,ManufacturingGUID) VALUES (?,?,?,?,?,?,?,?,?,?)] , db=/data/data/com.dsndata.sds2mobile.status.activities/databases/jobs.db
  12-05 08:41:23.802: E/SQLiteDatabase(19152): Error inserting Main=0 Description=FB11GAx1 Grade=310SS Weight=0.481653435459 Piecemark=FB63 Length=14.3125 Finish=None MaterialType=Flat bar MemberGuid=1f3e95c0-7289-4132-9218-296fcfcbcaad ManufacturingGUID=55d0399a-782d-476d-8619-5612c466905c
  12-05 08:41:23.802: E/SQLiteDatabase(19152): android.database.sqlite.SQLiteCantOpenDatabaseException: error code 14: unable to open database file
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at android.database.sqlite.SQLiteStatement.native_executeInsert(Native Method)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:113)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1827)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1700)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at com.dsndata.sds2mobile.provider.JobProvider.insert(JobProvider.java:164)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at android.content.ContentProvider$Transport.insert(ContentProvider.java:189)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at android.content.ContentResolver.insert(ContentResolver.java:730)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at com.dsndata.sds2mobile.xml.MobileParser.endElement(MobileParser.java:494)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:353)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at org.apache.harmony.xml.ExpatParser.endElement(ExpatParser.java:156)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at org.apache.harmony.xml.ExpatParser.appendChars(Native Method)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:497)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:484)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:309)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:267)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at javax.xml.parsers.SAXParser.parse(SAXParser.java:359)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at com.dsndata.sds2mobile.xml.MobileParser.parse(MobileParser.java:172)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at com.dsndata.sds2mobile.xml.MobileParser.parse(MobileParser.java:144)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at com.dsndata.sds2mobile.services.ImportService$ServiceWorker.run(ImportService.java:58)
  12-05 08:41:23.802: E/SQLiteDatabase(19152):    at java.lang.Thread.run(Thread.java:856)
  12-05 08:41:23.802: W/System.err(19152): android.database.SQLException: Failed to insert row into content://com.dsndata.sds2mobile.jobprovider/JOBNAMETechnip_All_x_x_x_x_units/submaterial/55d0399a-782d-476d-8619-5612c466905c
  12-05 08:41:23.802: W/System.err(19152):    at com.dsndata.sds2mobile.provider.JobProvider.insert(JobProvider.java:187)
  12-05 08:41:23.802: W/System.err(19152):    at android.content.ContentProvider$Transport.insert(ContentProvider.java:189)
  12-05 08:41:23.809: W/System.err(19152):    at android.content.ContentResolver.insert(ContentResolver.java:730)
  12-05 08:41:23.809: W/System.err(19152):    at com.dsndata.sds2mobile.xml.MobileParser.endElement(MobileParser.java:494)
  12-05 08:41:23.809: W/System.err(19152):    at org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:353)
  12-05 08:41:23.809: W/System.err(19152):    at org.apache.harmony.xml.ExpatParser.endElement(ExpatParser.java:156)
  12-05 08:41:23.809: W/System.err(19152):    at org.apache.harmony.xml.ExpatParser.appendChars(Native Method)
  12-05 08:41:23.809: W/System.err(19152):    at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:497)
  12-05 08:41:23.809: W/System.err(19152):    at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:484)
  12-05 08:41:23.809: W/System.err(19152):    at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:309)
  12-05 08:41:23.809: W/System.err(19152):    at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:267)
  12-05 08:41:23.809: W/System.err(19152):    at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
  12-05 08:41:23.809: W/System.err(19152):    at javax.xml.parsers.SAXParser.parse(SAXParser.java:359)
  12-05 08:41:23.809: W/System.err(19152):    at com.dsndata.sds2mobile.xml.MobileParser.parse(MobileParser.java:172)
  12-05 08:41:23.809: W/System.err(19152):    at com.dsndata.sds2mobile.xml.MobileParser.parse(MobileParser.java:144)
  12-05 08:41:23.809: W/System.err(19152):    at com.dsndata.sds2mobile.services.ImportService$ServiceWorker.run(ImportService.java:58)
  12-05 08:41:23.817: W/System.err(19152):    at java.lang.Thread.run(Thread.java:856)
  </code></pre>
  
  <p>The strangest part, is that the xml parsing and storing works up to a point, then fails with error 14.</p>
  
  <p>Also, there are many logs of this message:</p>
  
  <pre><code>2-05 08:39:15.700: D/ActivityThread(19152): Loading provider com.dsndata.sds2mobile.jobprovider: com.dsndata.sds2mobile.provider.JobProvider
  </code></pre>
  
  <p>Which doesn't show up on other brands of devices.</p>
  
  <p>I have asked Google and not found anything useful. Has anyone else had this problem? Or at least something similar which might be able to point me in the right direction?</p>