SQLException when calling setReadOnly in 3.7.15-M1

Issue #136 new
Kazuhiro Sera
created an issue

Since version 3.7.15-M1, we suffers the following exception:

Exception in thread "main" java.sql.SQLException: Cannot change read-only flag after establishing a connection. Use SQLiteConfig#setReadOnly and QLiteConfig.createConnection().
at org.sqlite.SQLiteConnection.setReadOnly(SQLiteConnection.java:447)
at org.apache.commons.dbcp.DelegatingConnection.setReadOnly(DelegatingConnection.java:377)
at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.setReadOnly(PoolingDataSource.java:338)
at scalikejdbc.DBConnection$class.readOnlySession(DB.scala:138)
at scalikejdbc.DB.readOnlySession(DB.scala:498)
...

Such a behavior is so different from other JDBC drivers.

see also:

http://stackoverflow.com/questions/23390278/scalikejdbc-sqlite-cannot-change-read-only-flag-after-establishing-a-connecti

Comments (5)

  1. Log in to comment