Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] - PostgreSQL ClassLoader issue
[CDO] - PostgreSQL ClassLoader issue [message #1753188] Thu, 02 February 2017 15:24 Go to next message
Philippe EUGENE is currently offline Philippe EUGENEFriend
Messages: 37
Registered: January 2011
Member
Hi,
I have a ClassLoader issue with CDO and PostgreSQL.
It sound like this issue :
[DB] Classloader issues with PostgreSQL driver and CDO

I'm using :
- PostgreSQL : 9.6.1
- CDO : 4.5
- org.eclipse.net4j.db.postgresql : 4.2.3
- org.postgresql.jdbc3_8.4 from : net4j.sourceforge.net/update/

and i have this error :
[ERROR] java.lang.ClassNotFoundException: org.postgresql.ds.PGSimpleDataSource cannot be found by org.eclipse.net4j.db_4.5.0.v20160301-1326

For test i replace PostgreSQL with Mysql by using :
- org.eclipse.net4j.db.mysql : 4.2.3
- com.mysql.jdbc_5.1.7 from : net4j.sourceforge.net/update/

The connection works fine with mysql.

I compare MANIFEST.MF and plugin.xml form PostgreSQL and MySql plugins, and i don't found differences (Export packages, Eclipse-RegisterBuddy and so on).

What is the good configuration to use CDO with PostgreSQL ?

Thanks for reply,
--
Philippe
Re: [CDO] - PostgreSQL ClassLoader issue [message #1753199 is a reply to message #1753188] Thu, 02 February 2017 16:08 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6338
Registered: July 2009
Senior Member
I'd need to see the complete stack trace please.
Re: [CDO] - PostgreSQL ClassLoader issue [message #1753209 is a reply to message #1753199] Thu, 02 February 2017 16:56 Go to previous messageGo to next message
Philippe EUGENE is currently offline Philippe EUGENEFriend
Messages: 37
Registered: January 2011
Member
Here's the complete stack trace.

Thanks.

Quote:

[INFO] CDO server starting
[ERROR] java.lang.ClassNotFoundException: org.postgresql.ds.PGSimpleDataSource cannot be found by org.eclipse.net4j.db_4.5.0.v20160301-1326
org.eclipse.net4j.db.DBException: java.lang.ClassNotFoundException: org.postgresql.ds.PGSimpleDataSource cannot be found by org.eclipse.net4j.db_4.5.0.v20160301-1326
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:351)
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:340)
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:335)
at org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.getDataSource(DBStoreFactory.java:128)
at org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.createStore(DBStoreFactory.java:53)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.createStore(RepositoryConfigurator.java:405)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.getRepository(RepositoryConfigurator.java:204)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:136)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:108)
at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:63)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.postgresql.ds.PGSimpleDataSource cannot be found by org.eclipse.net4j.db_4.5.0.v20160301-1326
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.net4j.util.ReflectUtil.instantiate(ReflectUtil.java:447)
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:347)
... 13 more
Re: [CDO] - PostgreSQL ClassLoader issue [message #1753231 is a reply to message #1753209] Thu, 02 February 2017 19:44 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6338
Registered: July 2009
Senior Member
I tried it, but I can not reproduce your problem. Could you try out if it works with the older driver from http://www.elver.org/eclipse/2.1.0/update/ ?
Re: [CDO] - PostgreSQL ClassLoader issue [message #1753272 is a reply to message #1753231] Fri, 03 February 2017 09:40 Go to previous message
Philippe EUGENE is currently offline Philippe EUGENEFriend
Messages: 37
Registered: January 2011
Member
The old driver from elver.org fix the ClassLoader issue.
But, when restarting the CDO server, the old driver could not read the DB Schema.

I must found a solution to run CDO wtih the new PostgreSQL driver.

At this time, for my test purpose, i used the hack from bug 414834.
Previous Topic:ECrossreferenceAdapter and removing elements from content tree
Next Topic:OCLinEcore and ATL
Goto Forum:
  


Current Time: Tue Jan 16 07:28:08 GMT 2018

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

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