[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.rt.eclipselink] Connecting to Derby using EmbeddedDriver

I am trying to set up EclipseLink to access a Derby embedded database using the EmbeddedDriver. I keep on getting this exception:

No suitable driver found for jdbc:derby:H:/jotter/database/prova4derek;create=true

I am using the Orbit Derby bundle, but when things when I could not connect I copied in the derby.jar instead to make sure that it was not a problem with the way I was using the Orbit bundle. Both give me identical errors.

As a sanity check I have ran the same URL from within the Derby ij console and it works as expected.

So what am I missing? Your advice would be greatly appreciated.

Many thanks,
Joel

Here is the persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0"
xmlns="http://java.sun.com/xml/ns/persistence"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd";>
<persistence-unit name="maia">
<class>a2d.poa.derby.model.ToxData</class>
<class>a2d.poa.derby.model.Species</class>
<properties>
<property name="eclipselink.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="eclipselink.jdbc.url"
value="jdbc:derby:H:/jotter/database/prova4derek;create=true" />
<property name="eclipselink.jdbc.user" value="admin" />
<property name="eclipselink.jdbc.password" value="secret" />
<property name="eclipselink.jdbc.read-connections.min"
value="1" />
<property name="eclipselink.jdbc.write-connections.min"
value="1" />
<property name="eclipselink.jdbc.batch-writing" value="JDBC" />


<!-- DB schema creation -->
<property name="eclipselink.ddl-generation" value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode"
value="database" />

<!-- Logging -->
<property name="eclipselink.logging.level" value="FINE" />
<property name="eclipselink.logging.timestamp" value="false" />
<property name="eclipselink.logging.session" value="false" />
<property name="eclipselink.logging.thread" value=a"false" />
</properties>
</persistence-unit>
</persistence>