You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Chris Oman <CO...@ext-inc.com> on 2011/06/10 01:52:16 UTC

Loading database driver problem

I have been struggling with getting JPA/EclipseLink working properly. After following the instructions on the wiki for GlassFish development (http://wikis.sun.com/download/attachments/209655166/GF-OSGi-Features-1.0.pdf), I was finally able to get past the problems I was having with persistence units not being found.


My issue now is that when I try to create an EntityManager from the EMF, the database drivers for H2 can't be found. I have copied the H2 jar into domain/lib and verified that it has the same permissions as the other libs that are there that are working.

The stacktrace is below. Any thoughts? I'm out of ideas.

Thanks,
Chris


Caused by: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
Exception Description: Configuration error.  Class [org.h2.Driver] not found.
	at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82)
	at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267)
	at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85)
	at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
	at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:291)
	at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:418)
	at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:167)
	at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:453)
	at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:484)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:640)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:235)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:394)
	... 14 more

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Loading database driver problem

Posted by Sahoo <sa...@oracle.com>.
Wrong alias? You should perhaps send this email to users@glassfish.java.net.

On Friday 10 June 2011 05:22 AM, Chris Oman wrote:
> I have been struggling with getting JPA/EclipseLink working properly. After following the instructions on the wiki for GlassFish development (http://wikis.sun.com/download/attachments/209655166/GF-OSGi-Features-1.0.pdf), I was finally able to get past the problems I was having with persistence units not being found.
>
>
> My issue now is that when I try to create an EntityManager from the EMF, the database drivers for H2 can't be found. I have copied the H2 jar into domain/lib and verified that it has the same permissions as the other libs that are there that are working.
>
> The stacktrace is below. Any thoughts? I'm out of ideas.
>
> Thanks,
> Chris
>
>
> Caused by: Exception [EclipseLink-4003] (Eclipse Persistence Services - 2.2.0.v20110202-r8913): org.eclipse.persistence.exceptions.DatabaseException
> Exception Description: Configuration error.  Class [org.h2.Driver] not found.
> 	at org.eclipse.persistence.exceptions.DatabaseException.configurationErrorClassNotFound(DatabaseException.java:82)
> 	at org.eclipse.persistence.sessions.DefaultConnector.loadDriverClass(DefaultConnector.java:267)
> 	at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:85)
> 	at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
> 	at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:330)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:291)
> 	at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:418)
> 	at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:167)
> 	at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:453)
> 	at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:484)
> 	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:640)
> 	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:235)
> 	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:394)
> 	... 14 more
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org