我有一个Android服务,它解析大型xml文件并将数据存储在sqlite数据库中。这种架构运行没有太多问题,但最近摩托罗拉手机的几种不同型号都出现了问题。
这是错误:
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)
最奇怪的部分是,xml解析和存储工作到一个点,然后失败,错误14。
此外,此消息还有许多日志:
2-05 08:39:15.700: D/ActivityThread(19152): Loading provider com.dsndata.sds2mobile.jobprovider: com.dsndata.sds2mobile.provider.JobProvider
其他品牌的设备没有显示。
我问谷歌,但没有找到任何有用的东西。有没有其他人有这个问题?或者至少有类似的东西可以指向我正确的方向?