Skip to main content


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: 41
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: 6445
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: 41
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: 6445
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 messageGo to next message
Philippe EUGENE is currently offline Philippe EUGENEFriend
Messages: 41
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.
Re: [CDO] - PostgreSQL ClassLoader issue [message #1802913 is a reply to message #1753272] Mon, 18 February 2019 21:10 Go to previous message
mostafa fard is currently offline mostafa fardFriend
Messages: 5
Registered: December 2013
Junior Member
I have the same issue. Can anyone tell me what the problem is?
PostgreSQL: 42.2.5
CDO Model Repository SDK: 5.0.0.v20180530



ERROR:
[INFO] CDO server starting
[ERROR] java.lang.ClassNotFoundException: org.postgresql.ds.PGSimpleDataSource cannot be found by org.eclipse.net4j.db_4.7.0.v20180529-1130
org.eclipse.net4j.db.DBException: java.lang.ClassNotFoundException: org.postgresql.ds.PGSimpleDataSource cannot be found by org.eclipse.net4j.db_4.7.0.v20180529-1130
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:347)
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:336)
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:331)
at org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.getDataSource(DBStoreFactory.java:127)
at org.eclipse.emf.cdo.server.internal.db.DBStoreFactory.createStore(DBStoreFactory.java:53)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.createStore(RepositoryConfigurator.java:430)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.getRepository(RepositoryConfigurator.java:209)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:136)
at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:110)
at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:78)
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(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.postgresql.ds.PGSimpleDataSource cannot be found by org.eclipse.net4j.db_4.7.0.v20180529-1130
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:508)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:419)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:411)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.eclipse.net4j.util.ReflectUtil.instantiate(ReflectUtil.java:478)
at org.eclipse.net4j.db.DBUtil.createDataSource(DBUtil.java:343)
... 13 more

[Updated on: Mon, 18 February 2019 21:28]

Report message to a moderator

Previous Topic:[EMF Compare] Conflict of Indexes/order
Next Topic:Merging resources that share the same root node.
Goto Forum:
  


Current Time: Fri Sep 20 18:15:20 GMT 2019

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

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

Back to the top