For testing I'm using a derby memory database set up with 
"jdbc:derby:memory:ukelonn;create=true".
and that works fine.

The test database schema and data is set up using liquibase.

I am trying to write the derby database to a derby network server, and
that doesn't work well:
 java.lang.ClassCastException: org.apache.derby.jdbc.ClientDriver cannot be 
cast to org.apache.derby.jdbc.InternalDriver
        at org.apache.derby.jdbc.BasicEmbeddedDataSource40.findDriver(Unknown 
Source)
        at 
org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.createPooledConnection(Unknown
 Source)
        at 
org.apache.derby.jdbc.EmbeddedConnectionPoolDataSource.getPooledConnection(Unknown
 Source)
        at 
no.priv.bang.ukelonn.bundle.db.test.UkelonnDatabaseProviderTest.addUkelonnSchemaAndDataToDerbyServer(UkelonnDatabaseProviderTest.java:296)

Is the problem that I'm trying to use both a in-memory and a network
client from the same process?

Ie. that I have both of these dependencies in the POM?
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derby</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.derby</groupId>
            <artifactId>derbyclient</artifactId>
            <version>${derby.version}</version>
            <scope>test</scope>
        </dependency>

If that is the problem, is there a way for me to be able to write the
liquibase schema and data to the derby network server? Do I need to
create a separate maven project to do this?

The change adding the unit test, is:
 
https://github.com/steinarb/ukelonn/commit/f3c8bf2c3cadb931cce414f1619be39b4e44711e

Thanks!

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - ops4j@googlegroups.com

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ops4j+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to