Hi
Running OFBiz under Eclipse and starting the JCR component leads to an ClassNotFoundException as follow: Why JCR is using the Apache Derby Driver while the ofbiz database is Postgres??? How can I fix this problem?? (I added the Derby jdbc jar to the ofbiz-component.xml but this leads too to the same exception. Rgds Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class org.apache.derby.jdbc.EmbeddedDriver at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:263) at org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:231) at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:167) at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.getDataSource(BundleDbPersistenceManager.java:575) at org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.init(BundleDbPersistenceManager.java:543) at org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager.init(DerbyPersistenceManager.java:250) at org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1342) ... 14 more Caused by: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:258) |
Administrator
|
http://markmail.org/message/rb4qujsrxlhycpyb
Jacques From: "Francis ANDRE" <[hidden email]> > Hi > > Running OFBiz under Eclipse and starting the JCR component leads to an > ClassNotFoundException as follow: Why JCR is using the Apache Derby Driver while > the ofbiz database is Postgres??? How can I fix this problem?? (I added the > Derby jdbc jar to the ofbiz-component.xml but this leads too to the same exception. > > Rgds > > > Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class > org.apache.derby.jdbc.EmbeddedDriver > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:263) > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:231) > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:167) > at > org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.getDataSource(BundleDbPersistenceManager.java:575) > at > org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.init(BundleDbPersistenceManager.java:543) > at > org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager.init(DerbyPersistenceManager.java:250) > at > org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1342) > ... 14 more > Caused by: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:258) |
In reply to this post by Francis ANDRE
Hi francis
Please add the Derby jdbc jar file in ofbiz/framework/entity/lib/jdbc folder. don't need entry the Derby jdbc jar to the ofbiz-component.xml. But some change in ofbiz/framework/entity/config/entityengine.xml file change like jdbc-username and jdbc-password in <datasource name="localderby"> And again restart the project. Thanks & Regards Mohit Gupta On Thu, Apr 5, 2012 at 10:33 PM, Francis ANDRE < [hidden email]> wrote: > Hi > > Running OFBiz under Eclipse and starting the JCR component leads to an > ClassNotFoundException as follow: Why JCR is using the Apache Derby Driver > while the ofbiz database is Postgres??? How can I fix this problem?? (I > added the Derby jdbc jar to the ofbiz-component.xml but this leads too to > the same exception. > > Rgds > > > Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class > org.apache.derby.jdbc.**EmbeddedDriver > at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** > getDriverClass(**ConnectionFactory.java:263) > at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** > createDataSource(**ConnectionFactory.java:231) > at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** > getDataSource(**ConnectionFactory.java:167) > at org.apache.jackrabbit.core.**persistence.pool.** > BundleDbPersistenceManager.**getDataSource(**BundleDbPersistenceManager.** > java:575) > at org.apache.jackrabbit.core.**persistence.pool.** > BundleDbPersistenceManager.**init(**BundleDbPersistenceManager.**java:543) > at org.apache.jackrabbit.core.**persistence.pool.** > DerbyPersistenceManager.init(**DerbyPersistenceManager.java:**250) > at org.apache.jackrabbit.core.**RepositoryImpl.** > createPersistenceManager(**RepositoryImpl.java:1342) > ... 14 more > Caused by: java.lang.**ClassNotFoundException: org.apache.derby.jdbc.** > EmbeddedDriver > at java.net.URLClassLoader$1.run(**Unknown Source) > at java.security.**AccessController.doPrivileged(**Native Method) > at java.net.URLClassLoader.**findClass(Unknown Source) > at java.lang.ClassLoader.**loadClass(Unknown Source) > at sun.misc.Launcher$**AppClassLoader.loadClass(**Unknown Source) > at java.lang.ClassLoader.**loadClass(Unknown Source) > at java.lang.Class.forName0(**Native Method) > at java.lang.Class.forName(**Unknown Source) > at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** > getDriverClass(**ConnectionFactory.java:258) > -- To: Dear Sir/Madam, Greetings for the day!, Subject:- Application for Job, I am Mohit Kumar Gupta, Fresher 2011 Batch MCA with an aggregate of 73.89% From IPS Academy Indore affiliated Rajiv Gandhi Technical University Bhopal,and PROJECT done from scientech technologies pvt. ltd Indore. and looking forward to join your company in above mentioned areas as a Software Developer& testing. when required., For your consideration, I am sending you my resume as an attachment., Name : Mohit Kumar Gupta Date of birth : 17-july-1987, Qualifications : MCA with an aggregate of 73.89 % Career skills : JAVA ,J2EE, C & C++ Concept : DS,OOPs Kindly accept my resume as a first step to be a part of your organization. So if you find my application suitable as per your organizational needs, kindly let me know for further processes of selection., Looking forward to a positive response from your side as soon as possible., Thanks a lot for paying attention., Thanks and Regards Mohit Kumar Gupta MCA-2011 +91-88804-53898 Address…………… 37/1 venkatadri complex 1st cross Roopena Agrahara,Bangalore |
In reply to this post by Francis ANDRE
Hi francis
Please add the Derby jdbc jar file in ofbiz/framework/entity/lib/jdbc folder. don't need entry the Derby jdbc jar to the ofbiz-component.xml. But some change in ofbiz/framework/entity/config/entityengine.xml file change like jdbc-username and jdbc-password in <datasource name="localderby"> And again restart the project. Thanks & Regards Mohit Gupta On Thu, Apr 5, 2012 at 10:33 PM, Francis ANDRE < [hidden email]> wrote: > Hi > > Running OFBiz under Eclipse and starting the JCR component leads to an > ClassNotFoundException as follow: Why JCR is using the Apache Derby Driver > while the ofbiz database is Postgres??? How can I fix this problem?? (I > added the Derby jdbc jar to the ofbiz-component.xml but this leads too to > the same exception. > > Rgds > > > Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class > org.apache.derby.jdbc.**EmbeddedDriver > at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** > getDriverClass(**ConnectionFactory.java:263) > at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** > createDataSource(**ConnectionFactory.java:231) > at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** > getDataSource(**ConnectionFactory.java:167) > at org.apache.jackrabbit.core.**persistence.pool.** > BundleDbPersistenceManager.**getDataSource(**BundleDbPersistenceManager.** > java:575) > at org.apache.jackrabbit.core.**persistence.pool.** > BundleDbPersistenceManager.**init(**BundleDbPersistenceManager.**java:543) > at org.apache.jackrabbit.core.**persistence.pool.** > DerbyPersistenceManager.init(**DerbyPersistenceManager.java:**250) > at org.apache.jackrabbit.core.**RepositoryImpl.** > createPersistenceManager(**RepositoryImpl.java:1342) > ... 14 more > Caused by: java.lang.**ClassNotFoundException: org.apache.derby.jdbc.** > EmbeddedDriver > at java.net.URLClassLoader$1.run(**Unknown Source) > at java.security.**AccessController.doPrivileged(**Native Method) > at java.net.URLClassLoader.**findClass(Unknown Source) > at java.lang.ClassLoader.**loadClass(Unknown Source) > at sun.misc.Launcher$**AppClassLoader.loadClass(**Unknown Source) > at java.lang.ClassLoader.**loadClass(Unknown Source) > at java.lang.Class.forName0(**Native Method) > at java.lang.Class.forName(**Unknown Source) > at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** > getDriverClass(**ConnectionFactory.java:258) > |
In reply to this post by mohit gupta
Hi Mohit
I tryied what you suggest and this gave the same result... ClassNotFoundException on the Derby jdbc driver. But, by changing the position of the jackrabbit container at the end of the framework/base/config/ofbiz-containers.xml and removing any reference to localderby in the entityengine.xml, I do not get anymore the exception but I am not sure that the jackrabbit container is running since I did not see any log/trace/debug info in the ofbiz log. Is there anyway to know if the jackrabbit container is started and running?? Francis Le 06/04/2012 07:04, mohit gupta a écrit : > Hi francis > > Please add the Derby jdbc jar file in ofbiz/framework/entity/lib/jdbc folder. > don't need entry the Derby jdbc jar to the ofbiz-component.xml. > But some change in ofbiz/framework/entity/config/entityengine.xml file > change like jdbc-username and jdbc-password in<datasource > name="localderby"> > And again restart the project. > > Thanks& Regards > Mohit Gupta > > On Thu, Apr 5, 2012 at 10:33 PM, Francis ANDRE< > [hidden email]> wrote: > >> Hi >> >> Running OFBiz under Eclipse and starting the JCR component leads to an >> ClassNotFoundException as follow: Why JCR is using the Apache Derby Driver >> while the ofbiz database is Postgres??? How can I fix this problem?? (I >> added the Derby jdbc jar to the ofbiz-component.xml but this leads too to >> the same exception. >> >> Rgds >> >> >> Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class >> org.apache.derby.jdbc.**EmbeddedDriver >> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >> getDriverClass(**ConnectionFactory.java:263) >> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >> createDataSource(**ConnectionFactory.java:231) >> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >> getDataSource(**ConnectionFactory.java:167) >> at org.apache.jackrabbit.core.**persistence.pool.** >> BundleDbPersistenceManager.**getDataSource(**BundleDbPersistenceManager.** >> java:575) >> at org.apache.jackrabbit.core.**persistence.pool.** >> BundleDbPersistenceManager.**init(**BundleDbPersistenceManager.**java:543) >> at org.apache.jackrabbit.core.**persistence.pool.** >> DerbyPersistenceManager.init(**DerbyPersistenceManager.java:**250) >> at org.apache.jackrabbit.core.**RepositoryImpl.** >> createPersistenceManager(**RepositoryImpl.java:1342) >> ... 14 more >> Caused by: java.lang.**ClassNotFoundException: org.apache.derby.jdbc.** >> EmbeddedDriver >> at java.net.URLClassLoader$1.run(**Unknown Source) >> at java.security.**AccessController.doPrivileged(**Native Method) >> at java.net.URLClassLoader.**findClass(Unknown Source) >> at java.lang.ClassLoader.**loadClass(Unknown Source) >> at sun.misc.Launcher$**AppClassLoader.loadClass(**Unknown Source) >> at java.lang.ClassLoader.**loadClass(Unknown Source) >> at java.lang.Class.forName0(**Native Method) >> at java.lang.Class.forName(**Unknown Source) >> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >> getDriverClass(**ConnectionFactory.java:258) >> > > |
In reply to this post by mohit gupta
Hi
I finally found the problem which is in the jackrabbit core library. The jcr core method ConnectionFactory.getDriverClass is using Class.forName instead of Thread.currentThread().getContextClassLoader. Made an issue as https://issues.apache.org/jira/browse/JCR-3288 Francis Le 06/04/2012 07:06, mohit gupta a écrit : > Hi francis > > Please add the Derby jdbc jar file in ofbiz/framework/entity/lib/jdbc folder. > don't need entry the Derby jdbc jar to the ofbiz-component.xml. > But some change in ofbiz/framework/entity/config/entityengine.xml file change > like jdbc-username and jdbc-password in <datasource name="localderby"> > And again restart the project. > > Thanks & Regards > Mohit Gupta > > On Thu, Apr 5, 2012 at 10:33 PM, Francis ANDRE > <[hidden email] <mailto:[hidden email]>> > wrote: > > Hi > > Running OFBiz under Eclipse and starting the JCR component leads to an > ClassNotFoundException as follow: Why JCR is using the Apache Derby Driver > while the ofbiz database is Postgres??? How can I fix this problem?? (I > added the Derby jdbc jar to the ofbiz-component.xml but this leads too to > the same exception. > > Rgds > > > Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class > org.apache.derby.jdbc.EmbeddedDriver > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:263) > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:231) > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:167) > at > org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.getDataSource(BundleDbPersistenceManager.java:575) > at > org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.init(BundleDbPersistenceManager.java:543) > at > org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager.init(DerbyPersistenceManager.java:250) > at > org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1342) > ... 14 more > Caused by: java.lang.ClassNotFoundException: > org.apache.derby.jdbc.EmbeddedDriver > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:258) > > > > > |
Administrator
|
In reply to this post by Francis ANDRE
From: "Francis ANDRE" <[hidden email]>
> Hi Mohit > > I tryied what you suggest and this gave the same result... ClassNotFoundException on the Derby jdbc driver. Yes anyway the last Derby jdbc driver is provided in https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Related+Books >But, by changing the position of the jackrabbit container at the end of the framework/base/config/ofbiz-containers.xml and removing >any reference to localderby in the entityengine.xml, I do not get anymore the exception but I am not sure that the jackrabbit >container is running since I did not see any log/trace/debug info in the ofbiz log. Is there anyway to know if the jackrabbit >container is started and running?? You would read "Jcr session setup successfull" in log or console... Jacques > > Francis > > > Le 06/04/2012 07:04, mohit gupta a écrit : >> Hi francis >> >> Please add the Derby jdbc jar file in ofbiz/framework/entity/lib/jdbc folder. >> don't need entry the Derby jdbc jar to the ofbiz-component.xml. >> But some change in ofbiz/framework/entity/config/entityengine.xml file >> change like jdbc-username and jdbc-password in<datasource >> name="localderby"> >> And again restart the project. >> >> Thanks& Regards >> Mohit Gupta >> >> On Thu, Apr 5, 2012 at 10:33 PM, Francis ANDRE< >> [hidden email]> wrote: >> >>> Hi >>> >>> Running OFBiz under Eclipse and starting the JCR component leads to an >>> ClassNotFoundException as follow: Why JCR is using the Apache Derby Driver >>> while the ofbiz database is Postgres??? How can I fix this problem?? (I >>> added the Derby jdbc jar to the ofbiz-component.xml but this leads too to >>> the same exception. >>> >>> Rgds >>> >>> >>> Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class >>> org.apache.derby.jdbc.**EmbeddedDriver >>> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >>> getDriverClass(**ConnectionFactory.java:263) >>> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >>> createDataSource(**ConnectionFactory.java:231) >>> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >>> getDataSource(**ConnectionFactory.java:167) >>> at org.apache.jackrabbit.core.**persistence.pool.** >>> BundleDbPersistenceManager.**getDataSource(**BundleDbPersistenceManager.** >>> java:575) >>> at org.apache.jackrabbit.core.**persistence.pool.** >>> BundleDbPersistenceManager.**init(**BundleDbPersistenceManager.**java:543) >>> at org.apache.jackrabbit.core.**persistence.pool.** >>> DerbyPersistenceManager.init(**DerbyPersistenceManager.java:**250) >>> at org.apache.jackrabbit.core.**RepositoryImpl.** >>> createPersistenceManager(**RepositoryImpl.java:1342) >>> ... 14 more >>> Caused by: java.lang.**ClassNotFoundException: org.apache.derby.jdbc.** >>> EmbeddedDriver >>> at java.net.URLClassLoader$1.run(**Unknown Source) >>> at java.security.**AccessController.doPrivileged(**Native Method) >>> at java.net.URLClassLoader.**findClass(Unknown Source) >>> at java.lang.ClassLoader.**loadClass(Unknown Source) >>> at sun.misc.Launcher$**AppClassLoader.loadClass(**Unknown Source) >>> at java.lang.ClassLoader.**loadClass(Unknown Source) >>> at java.lang.Class.forName0(**Native Method) >>> at java.lang.Class.forName(**Unknown Source) >>> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >>> getDriverClass(**ConnectionFactory.java:258) >>> >> >> |
Administrator
|
From: "Jacques Le Roux" <[hidden email]>
> From: "Francis ANDRE" <[hidden email]> >> Hi Mohit >> >> I tryied what you suggest and this gave the same result... ClassNotFoundException on the Derby jdbc driver. > > Yes anyway the last Derby jdbc driver is provided in https://cwiki.apache.org/confluence/display/OFBADMIN/OFBiz+Related+Books Oops, wrong C/P, read in ofbiz/framework/entity/lib/jdbc folder of course :o) Jacques >>But, by changing the position of the jackrabbit container at the end of the framework/base/config/ofbiz-containers.xml and >>removing any reference to localderby in the entityengine.xml, I do not get anymore the exception but I am not sure that the >>jackrabbit container is running since I did not see any log/trace/debug info in the ofbiz log. Is there anyway to know if the >>jackrabbit container is started and running?? > > You would read "Jcr session setup successfull" in log or console... > > Jacques > >> >> Francis >> >> >> Le 06/04/2012 07:04, mohit gupta a écrit : >>> Hi francis >>> >>> Please add the Derby jdbc jar file in ofbiz/framework/entity/lib/jdbc folder. >>> don't need entry the Derby jdbc jar to the ofbiz-component.xml. >>> But some change in ofbiz/framework/entity/config/entityengine.xml file >>> change like jdbc-username and jdbc-password in<datasource >>> name="localderby"> >>> And again restart the project. >>> >>> Thanks& Regards >>> Mohit Gupta >>> >>> On Thu, Apr 5, 2012 at 10:33 PM, Francis ANDRE< >>> [hidden email]> wrote: >>> >>>> Hi >>>> >>>> Running OFBiz under Eclipse and starting the JCR component leads to an >>>> ClassNotFoundException as follow: Why JCR is using the Apache Derby Driver >>>> while the ofbiz database is Postgres??? How can I fix this problem?? (I >>>> added the Derby jdbc jar to the ofbiz-component.xml but this leads too to >>>> the same exception. >>>> >>>> Rgds >>>> >>>> >>>> Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class >>>> org.apache.derby.jdbc.**EmbeddedDriver >>>> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >>>> getDriverClass(**ConnectionFactory.java:263) >>>> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >>>> createDataSource(**ConnectionFactory.java:231) >>>> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >>>> getDataSource(**ConnectionFactory.java:167) >>>> at org.apache.jackrabbit.core.**persistence.pool.** >>>> BundleDbPersistenceManager.**getDataSource(**BundleDbPersistenceManager.** >>>> java:575) >>>> at org.apache.jackrabbit.core.**persistence.pool.** >>>> BundleDbPersistenceManager.**init(**BundleDbPersistenceManager.**java:543) >>>> at org.apache.jackrabbit.core.**persistence.pool.** >>>> DerbyPersistenceManager.init(**DerbyPersistenceManager.java:**250) >>>> at org.apache.jackrabbit.core.**RepositoryImpl.** >>>> createPersistenceManager(**RepositoryImpl.java:1342) >>>> ... 14 more >>>> Caused by: java.lang.**ClassNotFoundException: org.apache.derby.jdbc.** >>>> EmbeddedDriver >>>> at java.net.URLClassLoader$1.run(**Unknown Source) >>>> at java.security.**AccessController.doPrivileged(**Native Method) >>>> at java.net.URLClassLoader.**findClass(Unknown Source) >>>> at java.lang.ClassLoader.**loadClass(Unknown Source) >>>> at sun.misc.Launcher$**AppClassLoader.loadClass(**Unknown Source) >>>> at java.lang.ClassLoader.**loadClass(Unknown Source) >>>> at java.lang.Class.forName0(**Native Method) >>>> at java.lang.Class.forName(**Unknown Source) >>>> at org.apache.jackrabbit.core.**util.db.ConnectionFactory.** >>>> getDriverClass(**ConnectionFactory.java:258) >>>> >>> >>> |
In reply to this post by Francis ANDRE
Hi
I finally found the problem which is in the jackrabbit core library. The jcr core method ConnectionFactory.getDriverClass is using Class.forName instead of Thread.currentThread().getContextClassLoader. Made an issue as https://issues.apache.org/jira/browse/JCR-3288 Francis Le 06/04/2012 07:06, mohit gupta a écrit : > Hi francis > > Please add the Derby jdbc jar file in ofbiz/framework/entity/lib/jdbc folder. > don't need entry the Derby jdbc jar to the ofbiz-component.xml. > But some change in ofbiz/framework/entity/config/entityengine.xml file change > like jdbc-username and jdbc-password in <datasource name="localderby"> > And again restart the project. > > Thanks & Regards > Mohit Gupta > > On Thu, Apr 5, 2012 at 10:33 PM, Francis ANDRE > <[hidden email] <mailto:[hidden email]>> > wrote: > > Hi > > Running OFBiz under Eclipse and starting the JCR component leads to an > ClassNotFoundException as follow: Why JCR is using the Apache Derby Driver > while the ofbiz database is Postgres??? How can I fix this problem?? (I > added the Derby jdbc jar to the ofbiz-component.xml but this leads too to > the same exception. > > Rgds > > > Caused by: javax.jcr.RepositoryException: Could not load JDBC driver class > org.apache.derby.jdbc.EmbeddedDriver > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:263) > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.createDataSource(ConnectionFactory.java:231) > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.getDataSource(ConnectionFactory.java:167) > at > org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.getDataSource(BundleDbPersistenceManager.java:575) > at > org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.init(BundleDbPersistenceManager.java:543) > at > org.apache.jackrabbit.core.persistence.pool.DerbyPersistenceManager.init(DerbyPersistenceManager.java:250) > at > org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1342) > ... 14 more > Caused by: java.lang.ClassNotFoundException: > org.apache.derby.jdbc.EmbeddedDriver > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at java.lang.Class.forName0(Native Method) > at java.lang.Class.forName(Unknown Source) > at > org.apache.jackrabbit.core.util.db.ConnectionFactory.getDriverClass(ConnectionFactory.java:258) > > > > > |
Free forum by Nabble | Edit this page |