Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » DriverManager connect failed
DriverManager connect failed [message #653443] Wed, 09 February 2011 19:06 Go to next message
Luiz E. is currently offline Luiz E.
Messages: 97
Registered: September 2010
Member
on my RCP app, the following errors appears

[EL Info]: 2011-02-09 16:54:49.125--EclipseLink, version: Eclipse Persistence Services - 2.1.2.v20101206-r8635
[EL Config]: 2011-02-09 16:54:49.125--Connection(25109548)--connecting(DatabaseLogin(
	platform=>PostgreSQLPlatform
	user name=> "postgres"
	datasource URL=> "jdbc:postgresql://192.168.0.10:5432/ti_fiscal"
))
[EL Finer]: 2011-02-09 16:54:49.125--DriverManager connect failed, trying direct connect.
[EL Finer]: 2011-02-09 16:54:49.125--java.sql.SQLException: No suitable driver found for jdbc:postgresql://192.168.0.10:5432/ti_fiscal
	at java.sql.DriverManager.getConnection(DriverManager.java:602)
	at java.sql.DriverManager.getConnection(DriverManager.java:154)
	at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
	at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
	at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:327)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:291)
	at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:415)
	at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:155)
	at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:436)
	at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:495)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:627)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:230)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:389)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:164)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:221)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:209)
	at br.com.germantech.emf.FiscalEntityManagerFactory.createEntityManager(FiscalEntityManagerFactory.java:71)
	at br.com.germantech.Activator.start(Activator.java:36)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)

[EL Config]: 2011-02-09 16:54:49.156--Connection(5670411)--Connected: jdbc:postgresql://192.168.0.10:5432/ti_fiscal
	User: postgres
	Database: PostgreSQL  Version: 8.4.3
	Driver: PostgreSQL Native Driver  Version: PostgreSQL 8.4 JDBC4 (build 701)
[EL Config]: 2011-02-09 16:54:49.156--Connection(8018457)--connecting(DatabaseLogin(
	platform=>PostgreSQLPlatform
	user name=> "postgres"
	datasource URL=> "jdbc:postgresql://192.168.0.10:5432/ti_fiscal"
))
[EL Finer]: 2011-02-09 16:54:49.156--DriverManager connect failed, trying direct connect.
[EL Finer]: 2011-02-09 16:54:49.156--java.sql.SQLException: No suitable driver found for jdbc:postgresql://192.168.0.10:5432/ti_fiscal
	at java.sql.DriverManager.getConnection(DriverManager.java:602)
	at java.sql.DriverManager.getConnection(DriverManager.java:154)
	at org.eclipse.persistence.sessions.DefaultConnector.connect(DefaultConnector.java:98)
	at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
	at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connectInternal(DatasourceAccessor.java:327)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.connectInternal(DatabaseAccessor.java:291)
	at org.eclipse.persistence.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:415)
	at org.eclipse.persistence.sessions.server.ConnectionPool.buildConnection(ConnectionPool.java:155)
	at org.eclipse.persistence.sessions.server.ConnectionPool.startUp(ConnectionPool.java:436)
	at org.eclipse.persistence.sessions.server.ServerSession.connect(ServerSession.java:500)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:627)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:230)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:389)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:164)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:221)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:209)
	at br.com.germantech.emf.FiscalEntityManagerFactory.createEntityManager(FiscalEntityManagerFactory.java:71)
	at br.com.germantech.Activator.start(Activator.java:36)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
	at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:370)
	at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:374)
	at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1067)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:561)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:546)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:459)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:243)
	at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:440)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:227)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:337)

[EL Config]: 2011-02-09 16:54:49.171--Connection(11608737)--Connected: jdbc:postgresql://192.168.0.10:5432/ti_fiscal
	User: postgres
	Database: PostgreSQL  Version: 8.4.3
	Driver: PostgreSQL Native Driver  Version: PostgreSQL 8.4 JDBC4 (build 701)


the eclipselink tries to connect, and fails, and then connect and fail, and just get connected in third time.
what can be wrong?
the postgresql driver is a plugin that i've made and registered as eclipse buddy
any ideas?
Re: DriverManager connect failed [message #653649 is a reply to message #653443] Thu, 10 February 2011 14:30 Go to previous message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

>> [EL Finer]: 2011-02-09 16:54:49.156--DriverManager connect failed, trying direct connect.

EclipseLink first tries to connect using standard JDBC DriverManager, if this fails, then it tries to directly connect to the driver, this works in your osgi environment.

The first connection fails because in OSGi Drivermanager cannot see the driver class. You should be able to just ignore the error.

You may wish to look into EclipseLink OSGi support.


James : Wiki : Book : Blog : Twitter
Previous Topic:EclipseLink translating # to ? in native query
Next Topic:CriteriaQuery<Boolean> fails with NoResultException but works when running generated SQL manua
Goto Forum:
  


Current Time: Fri Oct 31 05:47:43 GMT 2014

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

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