table already exists (code 1)
来源:互联网 发布:数据库模型 编辑:程序博客网 时间:2024/06/04 19:24
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.isport.isporttracker, PID: 26015
java.lang.RuntimeException: Unable to start service com.isport.isporttracker.MainService@119ea48 with Intent { cmp=com.isport.isporttracker/.MainService VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} }: android.database.sqlite.SQLiteException: table 'historySport' already exists (code 1): , while compiling: Create table 'historySport'('dateString' varchar(50) not null,'mac' varchar(30) not null,'stepNum' int,'sleepState' int,PRIMARY KEY ('dateString','mac'));
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(table 'historySport' already exists (code 1): , while compiling: Create table 'historySport'('dateString' varchar(50) not null,'mac' varchar(30) not null,'stepNum' int,'sleepState' int,PRIMARY KEY ('dateString','mac'));)
#################################################################
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4080)
at android.app.ActivityThread.access$2400(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1898)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: android.database.sqlite.SQLiteException: table 'historySport' already exists (code 1): , while compiling: Create table 'historySport'('dateString' varchar(50) not null,'mac' varchar(30) not null,'stepNum' int,'sleepState' int,PRIMARY KEY ('dateString','mac'));
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(table 'historySport' already exists (code 1): , while compiling: Create table 'historySport'('dateString' varchar(50) not null,'mac' varchar(30) not null,'stepNum' int,'sleepState' int,PRIMARY KEY ('dateString','mac'));)
#################################################################
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1058)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:623)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1812)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1743)
at com.isport.isportlibrary.database.DatabaseHelper.onCreate(DatabaseHelper.java:41)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
at com.isport.isportlibrary.database.DatabaseHelper.query(DatabaseHelper.java:67)
at com.isport.isportlibrary.database.DatabaseHelper.query(DatabaseHelper.java:74)
at com.isport.isportlibrary.database.DbBaseDevice.findAll(DbBaseDevice.java:107)
at com.isport.isportlibrary.services.BleService.getHistoryDevice(BleService.java:215)
at com.isport.isportlibrary.services.BleService.initDb(BleService.java:224)
at com.isport.isportlibrary.services.BleService.onStartCommand(BleService.java:181)
at com.isport.isporttracker.MainService.onStartCommand(MainService.java:43)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4063)
Process: com.isport.isporttracker, PID: 26015
java.lang.RuntimeException: Unable to start service com.isport.isporttracker.MainService@119ea48 with Intent { cmp=com.isport.isporttracker/.MainService VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} }: android.database.sqlite.SQLiteException: table 'historySport' already exists (code 1): , while compiling: Create table 'historySport'('dateString' varchar(50) not null,'mac' varchar(30) not null,'stepNum' int,'sleepState' int,PRIMARY KEY ('dateString','mac'));
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(table 'historySport' already exists (code 1): , while compiling: Create table 'historySport'('dateString' varchar(50) not null,'mac' varchar(30) not null,'stepNum' int,'sleepState' int,PRIMARY KEY ('dateString','mac'));)
#################################################################
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4080)
at android.app.ActivityThread.access$2400(ActivityThread.java:222)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1898)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7229)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
Caused by: android.database.sqlite.SQLiteException: table 'historySport' already exists (code 1): , while compiling: Create table 'historySport'('dateString' varchar(50) not null,'mac' varchar(30) not null,'stepNum' int,'sleepState' int,PRIMARY KEY ('dateString','mac'));
#################################################################
Error Code : 1 (SQLITE_ERROR)
Caused By : SQL(query) error or missing database.
(table 'historySport' already exists (code 1): , while compiling: Create table 'historySport'('dateString' varchar(50) not null,'mac' varchar(30) not null,'stepNum' int,'sleepState' int,PRIMARY KEY ('dateString','mac'));)
#################################################################
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1058)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:623)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:59)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1812)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1743)
at com.isport.isportlibrary.database.DatabaseHelper.onCreate(DatabaseHelper.java:41)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251)
at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:187)
at com.isport.isportlibrary.database.DatabaseHelper.query(DatabaseHelper.java:67)
at com.isport.isportlibrary.database.DatabaseHelper.query(DatabaseHelper.java:74)
at com.isport.isportlibrary.database.DbBaseDevice.findAll(DbBaseDevice.java:107)
at com.isport.isportlibrary.services.BleService.getHistoryDevice(BleService.java:215)
at com.isport.isportlibrary.services.BleService.initDb(BleService.java:224)
at com.isport.isportlibrary.services.BleService.onStartCommand(BleService.java:181)
at com.isport.isporttracker.MainService.onStartCommand(MainService.java:43)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4063)
... 8 more
出现上述错误,很有可能是表名重复了
0 0
- table already exists (code 1)
- Hbase Table already exists
- Hbase Table already exists:
- SLT logging table already exists
- Hbase Table already exists问题
- 1050, "Table 'django_content_type' already exists"
- 1 "table 'products' already exists" 单例创建数据库
- Create a table unless it already exists
- 错误代码: 1050 Table 'emp' already exists
- mySQL Table 'A.bill' already exists
- django migrate error: table 'xxx' already exists
- magento -- 解决magento错误:ERROR: Base table or view already exists: 1050 Table ... already exists
- Base table or view already exists: 1050 Table 'catalog_product_entity_group_price' already exists
- Laravel Base table or view already exists: 1050 Table 'users' already exists
- ERROR 1050 (42S01): Table 'crmdb/#sql-ib269' already exists
- 关于Hbase Table already exists的处理方法~!
- django.db.utils.OperationalError: (1050, "Table 'devtypeinfo' already exists
- mysql ERROR 1050 (42S01): Table already exists
- Linux系统下ZooKeeper注册中心安装详细步骤(基于单节点)
- Android Studio 导入eclipse工程步骤及一些问题
- 快速搭建微信小程序开发环境
- Blind Java Deserialization Vulnerability - Commons Gadgets Sep 2, 2016
- Centos清理内存,内存回收,释放及内存使用查看的相关命令
- table already exists (code 1)
- C语言指针定义变量方式
- Android使用ViewStub提高布局性能
- 使用spring读取properties文件
- iOS 日历提醒事件
- c#移位运算符("<<"及">>")详细说明
- Openfire与XMPP协议
- 设置监听器自动指定Assignee
- openvpn ios android 上网教程