

Private val DATABASE_NAME = "PersonalityQuiz. : Unable to start activity ComponentInfo: : getDatabase called recursivelyĪt (ActivityThread.java:3270)Īt (ActivityThread.java:3409)Īt .execute(LaunchActivityItem.java:83)Īt .executeCallbacks(TransactionExecutor.java:135)Īt .execute(TransactionExecutor.java:95)Īt $H.handleMessage(ActivityThread.java:2016)Īt android.os.Handler.dispatchMessage(Handler.java:107)Īt android.os.Looper.loop(Looper.java:214)Īt (ActivityThread.java:7356)Īt .invoke(Native Method)Īt .RuntimeInit$n(RuntimeInit.java:492)Īt .ZygoteInit.main(ZygoteInit.java:930)Ĭaused by: : getDatabase called recursivelyĪt .getDatabaseLocked(SQLiteOpenHelper.java:357)Īt .getWritableDatabase(SQLiteOpenHelper.java:317)Īt .addQuestion(DbHelper.kt:80)Īt .addQuestions(DbHelper.kt:45)Īt .onCreate(DbHelper.kt:35)Īt .getDatabaseLocked(SQLiteOpenHelper.java:412)Īt .getReadableDatabase(SQLiteOpenHelper.java:341)Īt .getAllQuestions(DbHelper.kt:93)Īt .onCreate(QuizActivity.kt:29)Īt (Activity.java:7802)Īt (Activity.java:7791)Īt (Instrumentation.java:1299)Īt (ActivityThread.java:3245)Ĭode snippet of onCreate method in DbHelper class: private val DATABASE_VERSION = 2 The dynamic type system of SQLite is backwards compatible with the more common static type systems of other database engines in the sense that SQL statements that work on statically typed databases work the same way in SQLite. it was working fine but when i added SQLite database when I run it keeps crashing when i reach to activity on which SQLite is integrated. In SQLite, the datatype of a value is associated with the value itself, not with its container. I am developing a "personality guessing" app. So, with the above configurations, the app will start and will launch an in-memory database called myDb, which the remaining Spring Data Rest configuration can take up.

Note that we need to keep the cache as shared in order to keep the database updates visible across multiple database connections.

Final DriverManagerDataSource dataSource = new DriverManagerDataSource() ĭtDriverClassName(env.getProperty("driverClassName")) ĭtUrl(env.getProperty("url")) ĭtUsername(env.getProperty("user")) ĭtPassword(env.getProperty("password")) Īnd finally, we'll configure the following properties in our persistence.properties file: driverClassName=
