Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    Expert tip

    activity.OnCreate is executed every time the app launches or the screen is rotated, so, putting your DB initialization inside it will cause the DB to be called too many times causing the exception. Try to use the MyDatabase.onCreate method for this.

Solutions on the web

via GitHub by milon87
, 2 years ago
An error occured while executing doInBackground()
via GitHub by bfarrgaynor
, 1 year ago
An error occured while executing doInBackground()
via GitHub by blinskey
, 2 years ago
An error occured while executing doInBackground()
via GitHub by smail2133
, 2 years ago
An error occured while executing doInBackground()
via GitHub by jockovonred
, 11 months ago
An error occured while executing doInBackground()
via GitHub by lognaturel
, 11 months ago
An error occured while executing doInBackground()
android.database.sqlite.SQLiteConstraintException: column event is not unique (code 19)	at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)	at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:775)	at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)	at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)	at com.raizlabs.android.dbflow.sql.SqlUtils.insert(SqlUtils.java:314)	at com.raizlabs.android.dbflow.sql.SqlUtils.save(SqlUtils.java:268)	at com.raizlabs.android.dbflow.structure.ModelAdapter.save(ModelAdapter.java:54)	at com.raizlabs.android.dbflow.structure.BaseModel.save(BaseModel.java:50)	at org.hisp.dhis.android.sdk.persistence.models.Event.save(Event.java:184)	at org.hisp.dhis.android.sdk.controllers.tracker.TrackerDataSender.postEvent(TrackerDataSender.java:140)	at org.hisp.dhis.android.sdk.controllers.tracker.TrackerDataSender.sendEventChanges(TrackerDataSender.java:119)	at org.hisp.dhis.android.sdk.controllers.tracker.TrackerDataSender.sendEventChanges(TrackerDataSender.java:104)	at org.hisp.dhis.android.sdk.controllers.tracker.TrackerDataSender.sendEventChanges(TrackerDataSender.java:84)	at org.hisp.dhis.android.sdk.controllers.tracker.TrackerController.sendEventChanges(TrackerController.java:445)	at org.hisp.dhis.android.sdk.controllers.DhisController.sendEventChanges(DhisController.java:136)	at org.hisp.dhis.android.sdk.controllers.DhisService$13.execute(DhisService.java:238)	at org.hisp.dhis.android.sdk.controllers.DhisService$13.execute(DhisService.java:235)	at org.hisp.dhis.android.sdk.job.NetworkJob.inBackground(NetworkJob.java:51)	at org.hisp.dhis.android.sdk.job.NetworkJob.inBackground(NetworkJob.java:38)	at org.hisp.dhis.android.sdk.job.Job.doInBackground(Job.java:60)	at org.hisp.dhis.android.sdk.job.Job.doInBackground(Job.java:36)