Hi,

Derby supports in-memory databases since 10.5.1.1 and in the latest release 
10.5.3.0 this mode should be pretty stable, so I tried to use it with Castor.
In order to let Derby know that it doesn't have to create files the 
sub-protocol string 'memory:' has to be inserted into the connection string, 
e.g. "jdbc:derby:memory:test;create=true".

But in this case I get the following exception:
org.exolab.castor.jdo.PersistenceException: Nested error: 
java.sql.SQLSyntaxErrorException: Schema 'TEST' does not exist

When omitting the connection parameter i.e. only providing 
"jdbc:derby:memory:test;" the following error will be raised:
org.exolab.castor.jdo.ConnectionFailedException: Nested error: 
java.sql.SQLException: Database 'memory:test' not found.

Code:
JDOManager.loadConfiguration(JDOConfFactory.createJdoConf(
                    JDOConfFactory.createDatabase("test", "derby",
                            JDOConfFactory.createDriver(
                                    "org.apache.derby.jdbc.EmbeddedDriver",
                                    "jdbc:derby:memory:test;", "test", "test"),
                            "mapping.xml"), JDOConfFactory
                            .createLocalTransactionDemarcation()), 
                    this.getClass().getResource(".").toString());
db = JDOManager.createInstance("test").getDatabase();

Does anyone have an explanation and ideally also a workaround for this issue?

Thanks,
Andras
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to