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 #434919] Fri, 04 July 2008 09:11 Go to next message
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
Re: Probem getting basic sample running [message #434920 is a reply to message #434919] Mon, 07 July 2008 15:39 Go to previous messageGo to next message
Peter Krogh is currently offline Peter KroghFriend
Messages: 8
Registered: July 2009
Junior Member
Joel,

Looking at your stack trace it appears that your issue is in TopLink
Essentials. I am guessing that you have fully migrated from Essentials to
EclipseLink within Eclipse.

My guess is that you haven't switched Dali properly but have switched the
persistence xml.

Check your classpath for TopLink Essentials, and you may want to cross
post this on the Dali newsgroup.

Peter
Re: Probem getting basic sample running [message #434922 is a reply to message #434920] Tue, 08 July 2008 07:15 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Hi Peter,

Thanks for the suggestion, I will do some digging. Actually, though,
this is a brand new Ganymede install and the code is new project I
created to get familiar with Dali JPA and EclipseLink. The entity
classes I did copy from another example, but not the persistence.xml.

Thanks,
Joel
Re: Probem getting basic sample running [message #434923 is a reply to message #434922] Tue, 08 July 2008 14:22 Go to previous messageGo to next message
Doug Clarke is currently offline Doug ClarkeFriend
Messages: 155
Registered: July 2009
Senior Member
Joel,

there is no JPA implementation included in Ganymede so you must have
TopLink Essentials defined in your project's libraries or through its
dependent projects. Please setup a new user library for EclipseLink and
ensure that it is the only one used in your test case.

If the error persists please post the new error message. You are looking
for org.eclipse.persistence in the stack trace to indicate that
EclipseLink is being used.

Doug
Re: Probem getting basic sample running [message #434926 is a reply to message #434923] Tue, 08 July 2008 15:22 Go to previous message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
On 2008-07-08 16:22:45 +0200, douglas.clarke@oracle.com (Doug Clarke) said:

> Joel,
>
> there is no JPA implementation included in Ganymede so you must have
> TopLink Essentials defined in your project's libraries or through its
> dependent projects. Please setup a new user library for EclipseLink and
> ensure that it is the only one used in your test case.
> If the error persists please post the new error message. You are
> looking for org.eclipse.persistence in the stack trace to indicate that
> EclipseLink is being used.
>
> Doug

Doug,

That is already the case. I have a user library using EclipseLink set
up as my default for JPA. The user library contains eclipselink.jar and
javax.persistence_1.0.0.jar from eclipselink-M10 .

Your reply pointed to me to the problem though. It was that I also had
my Spring user library included and it had TopLink Essentials defined.

Well, I knew I was doing something silly :-(

Thanks for the assistance,
Joel
Re: Probem getting basic sample running [message #610593 is a reply to message #434919] Mon, 07 July 2008 15:39 Go to previous message
Peter Krogh is currently offline Peter KroghFriend
Messages: 8
Registered: July 2009
Junior Member
Joel,

Looking at your stack trace it appears that your issue is in TopLink
Essentials. I am guessing that you have fully migrated from Essentials to
EclipseLink within Eclipse.

My guess is that you haven't switched Dali properly but have switched the
persistence xml.

Check your classpath for TopLink Essentials, and you may want to cross
post this on the Dali newsgroup.

Peter
Re: Probem getting basic sample running [message #610601 is a reply to message #434920] Tue, 08 July 2008 07:15 Go to previous message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Hi Peter,

Thanks for the suggestion, I will do some digging. Actually, though,
this is a brand new Ganymede install and the code is new project I
created to get familiar with Dali JPA and EclipseLink. The entity
classes I did copy from another example, but not the persistence.xml.

Thanks,
Joel
Re: Probem getting basic sample running [message #610603 is a reply to message #434922] Tue, 08 July 2008 14:22 Go to previous message
Doug Clarke is currently offline Doug ClarkeFriend
Messages: 155
Registered: July 2009
Senior Member
Joel,

there is no JPA implementation included in Ganymede so you must have
TopLink Essentials defined in your project's libraries or through its
dependent projects. Please setup a new user library for EclipseLink and
ensure that it is the only one used in your test case.

If the error persists please post the new error message. You are looking
for org.eclipse.persistence in the stack trace to indicate that
EclipseLink is being used.

Doug
Re: Probem getting basic sample running [message #610612 is a reply to message #434923] Tue, 08 July 2008 15:22 Go to previous message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
On 2008-07-08 16:22:45 +0200, douglas.clarke@oracle.com (Doug Clarke) said:

> Joel,
>
> there is no JPA implementation included in Ganymede so you must have
> TopLink Essentials defined in your project's libraries or through its
> dependent projects. Please setup a new user library for EclipseLink and
> ensure that it is the only one used in your test case.
> If the error persists please post the new error message. You are
> looking for org.eclipse.persistence in the stack trace to indicate that
> EclipseLink is being used.
>
> Doug

Doug,

That is already the case. I have a user library using EclipseLink set
up as my default for JPA. The user library contains eclipselink.jar and
javax.persistence_1.0.0.jar from eclipselink-M10 .

Your reply pointed to me to the problem though. It was that I also had
my Spring user library included and it had TopLink Essentials defined.

Well, I knew I was doing something silly :-(

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


Current Time: Mon Dec 22 16:34:47 GMT 2014

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

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