users@glassfish.java.net

Re: GF 3.1.1 JPA ... Persistence.createEntityManagerFactory vs. persistence.xml --- migration issue

From: Andreas Loew <Andreas.Loew_at_oracle.com>
Date: Wed, 01 Feb 2012 16:08:15 +0100

Hi Bernhard,

Am 01.02.2012 15:14, schrieb Bernhard Thalmayr:
> [#|2012-02-01T14:35:58.815+0100|INFO|glassfish3.1.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=102;_ThreadName=Thread-2;|[EL
> Severe]: 2012-02-01 14:35:58.814--ServerSession(32630911)--Local
> Exception Stack:
> Exception [EclipseLink-4002] (Eclipse Persistence Services -
> 2.3.0.v20110604-r9504):
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: java.sql.SQLException: No suitable driver found
> for jdbc:oracle:thin:......
>
> However persitence.xml has set
>
> <persistence-unit name="NAME" transaction-type="RESOURCE_LOCAL">
>
> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
> <exclude-unlisted-classes>false</exclude-unlisted-classes>
>
> <properties>
> <property name="eclipselink.jdbc.driver"
> value="oracle.jdbc.driver.OracleDriver" />
> ...
from the exception text that you receive, I'd assume that something
different is going on and GF is not properly finding your
persistence.xml and taking it into account: The exception complains
about the drivers class name, not the URL.

I'd start by (just temporarily) providing all information including DB
url, user and password in your persistence.xml and see whether it works
then - and I suspect it won't work with your current setup, but for
another underlying reason which you need to identify...

HTH & best regards,

Andreas

-- 
Andreas Loew | Senior Java Architect
Oracle Advanced Customer Services
ORACLE Germany