Feature not supported: autoServerMode

1,880 views
Skip to first unread message

FAP

unread,
Dec 17, 2010, 8:48:24 AM12/17/10
to H2 Database
Hello there

I'm facing the following problem while trying to connect to the
application database (see the exception below). That's weird because
I'm using this connection string:

"jdbc:h2:<DATABASE_URL>;IGNORECASE=TRUE;MODE=MySQL;CIPHER=AES;AUTO_SERVER=TRUE;CACHE_SIZE=131072"

I mean, I'm using only autoServerMode and not the other features
pointed by the stack trace. Any idea?

Thanks

Exception [EclipseLink-4002] (Eclipse Persistence Services -
2.0.0.v20091127-r5931):
org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLException: Feature not
supported: "autoServerMode && (readOnly || fileLockMethod == NO ||
fileLockMethod == SERIALIZED)" [50100-140]
Error Code: 50100
at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:
324)
at
org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:
319)
at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:
138)
at
org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:
162)
at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:
584)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:
228)
at
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:
368)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:
151)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:
207)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:
195)
...
Caused by: org.h2.jdbc.JdbcSQLException: Feature not supported:
"autoServerMode && (readOnly || fileLockMethod == NO || fileLockMethod
== SERIALIZED)" [50100-140]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:
327)
at org.h2.message.DbException.get(DbException.java:167)
at org.h2.message.DbException.get(DbException.java:144)
at
org.h2.message.DbException.getUnsupportedException(DbException.java:
202)
at org.h2.engine.Database.open(Database.java:511)
at org.h2.engine.Database.openDatabase(Database.java:207)
at org.h2.engine.Database.<init>(Database.java:202)
at org.h2.engine.Engine.openSession(Engine.java:56)
at org.h2.engine.Engine.openSession(Engine.java:146)
at org.h2.engine.Engine.getSession(Engine.java:125)
at org.h2.engine.Session.createSession(Session.java:122)
at
org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:
241)
at org.h2.engine.SessionRemote.createSession(SessionRemote.java:219)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:111)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:95)
at org.h2.Driver.connect(Driver.java:73)
at java.sql.DriverManager.getConnection(DriverManager.java:620)
at java.sql.DriverManager.getConnection(DriverManager.java:169)
at
org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:
98)
... 15 more

Thomas Mueller

unread,
Dec 20, 2010, 3:27:15 PM12/20/10
to h2-da...@googlegroups.com
Hi,

Is the database file read-only?

Or is the database already open (possibly in another process) without
using AUTO_SERVER=TRUE? You can find out by opening the *.lock.db file
- please post the contents of this file if you are not sure.

Those cases are not supported.

Regards,
Thomas

marcolopes

unread,
Sep 24, 2025, 11:14:35 AM (12 days ago) Sep 24
to H2 Database
That was it! I got around this problem in 2025!!!

READONLY database file (copied from MAC to Windows!)

Reply all
Reply to author
Forward
0 new messages