Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Probem getting basic sample running
Probem getting basic sample running [message #610591] Fri, 04 July 2008 09:11
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Hi,

Apologies, I know I am probably going to feel silly in the end, but I
am having a problem getting a sample EclipseLink project running. I
have a Derby driver defined and the embedded driver is on the
classpath. When I execute the "JPA Tools --> Genertate DDL" I get the
exception below. Note that the complaint is "Class
[sun.jdbc.odbc.JdbcOdbcDriver] not found" not my defined driver.

Here is my 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="spring.prova.jpa.model"
transaction-type="RESOURCE_LOCAL">
<class>
spring.prova.jpa.model.BaseEntity</class>
<class>
spring.prova.jpa.model.NamedEntity</class>
<class>
spring.prova.jpa.model.Owner</class>
<class>
spring.prova.jpa.model.Person</class>
<class>
spring.prova.jpa.model.Pet</class>
<class>
spring.prova.jpa.model.PetType</class>
<class>
spring.prova.jpa.model.Specialty</class>
<class>
spring.prova.jpa.model.Vet</class>
<class>
spring.prova.jpa.model.Visit</class>
<properties>
<property name="eclipselink.jdbc.url"
value="jdbc:derby:/Users/joel/scratch/derby/myDB;create=true " />
<property name="eclipselink.jdbc.user" value="joel" />
<property name="eclipselink.jdbc.password" value="joel" />
<property name="eclipselink.jdbc.driver"
value="org.apache.derby.jdbc.EmbeddedDriver" />
<property name="eclipselink.logging.level" value="FINE" />
<property name="eclipselink.target-database" value="Derby" />
<property name="eclipselink.ddl-generation"
value="drop-and-create-tables" />
<property name="eclipselink.ddl-generation.output-mode"
value="both" />
<property name="eclipselink.application-location"
value=" /Users/joel/projects/Etish-340/spring.prova.jpa.model/genera ted/db "
/>
</properties>
</persistence-unit>
</persistence>

and the exception.

[TopLink Info]: 2008.07.04
08:37:26.214--ServerSession(10018556)--TopLink, version: Oracle TopLink
Essentials - 2.0 (Build b41-beta2 (03/30/2007))
Exception in thread "main" Local Exception Stack:
Exception [TOPLINK-4003] (Oracle TopLink Essentials - 2.0 (Build
b41-beta2 (03/30/2007))):
oracle.toplink.essentials.exceptions.DatabaseException
Exception Description: Configuration error. Class
[sun.jdbc.odbc.JdbcOdbcDriver] not found.
at
oracle.toplink.essentials.exceptions.DatabaseException.confi gurationErrorClassNotFound(DatabaseException.java:86)
at

oracle.toplink.essentials.sessions.DefaultConnector.loadDriv er(DefaultConnector.java:168)
at

oracle.toplink.essentials.sessions.DefaultConnector.connect( DefaultConnector.java:83)
at

oracle.toplink.essentials.sessions.DatasourceLogin.connectTo Datasource(DatasourceLogin.java:170)
at

oracle.toplink.essentials.internal.sessions.DatabaseSessionI mpl.loginAndDetectDatasource(DatabaseSessionImpl.java:537)
at

oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvi der.login(EntityManagerFactoryProvider.java:206)
at

oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSet upImpl.deploy(EntityManagerSetupImpl.java:212)
at

oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManag erFactoryImpl.getServerSession(EntityManagerFactoryImpl.java :78)
at

oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManag erFactoryImpl.createEntityManagerImpl(EntityManagerFactoryIm pl.java:111)
at

oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManag erFactoryImpl.createEntityManagerImpl(EntityManagerFactoryIm pl.java:105)
at

oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFac toryImpl.createEntityManager(EntityManagerFactoryImpl.java:7 6)
at

org.eclipse.jpt.eclipselink.core.ddlgen.Main.perform(Main.ja va:87)
at org.eclipse.jpt.eclipselink.core.ddlgen.Main.execute(Main.ja va:78)
at org.eclipse.jpt.eclipselink.core.ddlgen.Main.main(Main.java: 65)

Any idea of what I have configured incorrectly?

Thanks,
Joel
Previous Topic:Re: embedding JPQL in a typesafe manner
Next Topic:Dali 2.0 is now available!
Goto Forum:
  


Current Time: Fri Nov 16 01:41:32 GMT 2018

Powered by FUDForum. Page generated in 0.01797 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top