Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

multiple connections to an embedded Derby database, possible?

mohsenmadiFeb 17 2009 — edited Jun 23 2009
Hello all -

I built a Java application with an embedded Derby database. Unfortunately, and unlike running an desktop application with a network database, only one instance of the application can run when the database is embedded. Running another instance will give the following exception:

Exception in thread "AWT-EventQueue-0" Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0.1 (Build 20080905)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Failed to start database 'qdb', see the next exception for details.
Error Code: 40000
at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:313)
at ...


Is there a simple way around this given the the database is read-only? I am currently contemplating writing a solution using the Reflection API (I am not sure this would do it though).

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2009
Added on Feb 17 2009
29 comments
3,859 views