[Dspace-tech] Problem with Oracle JDBC Driver

73 views
Skip to first unread message

Wellaway, Ian

unread,
Aug 25, 2015, 5:36:43 PM8/25/15
to DSpac...@lists.sourceforge.net

Hi,

 

I’m trying to set my DSpace repo up to use Oracle instead of Postgres.

 

I’ve followed the instructions in the docs (http://www.dspace.org/1_6_2Documentation/ch03.html#N108B4) by downloading the latest driver (ojdbc6.jar) and running the following command:

 

/opt/apache-maven-2.2.1/bin/mvn install:install-file -Dfile=ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc16 -Dversion=11.2.0.3 -Dpackaging=jar -DgeneratePom=true

 

It says ‘Build successful’ then I run the ‘mvn clean package’ command which works but then the ‘ant update -Doverwrite=true’ command gives the following error:

 

rt_metadata_registry:

     [java] 2012-02-24 11:08:53,705 INFO  org.dspace.core.ConfigurationManager @ Loading system provided config property (-Ddspace.configuration): config/dspace.cfg

     [java] 2012-02-24 11:08:53,734 INFO  org.dspace.core.ConfigurationManager @ Using default log4j provided log configuration,if uninitended, check your dspace.cfg for (log.init.config)

     [java] 2012-02-24 11:08:53,736 WARN  org.dspace.storage.rdbms.DatabaseManager @ Exception initializing DB pool

     [java] java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver

     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

     [java]     at java.security.AccessController.doPrivileged(Native Method)

     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

     [java]     at java.lang.Class.forName0(Native Method)

     [java]     at java.lang.Class.forName(Class.java:169)

     [java]     at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1587)

     [java]     at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:618)

     [java]     at org.dspace.core.Context.<init>(Context.java:126)

     [java]     at org.dspace.administer.MetadataImporter.loadRegistry(MetadataImporter.java:133)

     [java]     at org.dspace.administer.MetadataImporter.main(MetadataImporter.java:120)

     [java] Exception in thread "main" java.sql.SQLException: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver

     [java]     at org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseManager.java:1711)

     [java]     at org.dspace.storage.rdbms.DatabaseManager.getConnection(DatabaseManager.java:618)

     [java]     at org.dspace.core.Context.<init>(Context.java:126)

     [java]     at org.dspace.administer.MetadataImporter.loadRegistry(MetadataImporter.java:133)

     [java]     at org.dspace.administer.MetadataImporter.main(MetadataImporter.java:120)

 

BUILD FAILED

/opt/dspace-1.6.2-release/dspace/target/dspace-1.6.2-build.dir/build.xml:835: Java returned: 1

 

 

Any ideas what I’m doing wrong?

 

Thanks

 

Ian

 

------------

Ian Wellaway

Senior System Support & Development Officer - Academic Systems (Room 911) Mons, Tues and alternate Fridays

&

Technical Developer, Open Exeter - Infrastructure Systems (Room 54) Weds, Thurs and alternate Fridays

 

Exeter IT
Laver Building
University of Exeter
EX4 4QE
UK

 

tel +44 1392 722852

 

Pottinger, Hardy J.

unread,
Aug 25, 2015, 5:36:45 PM8/25/15
to Wellaway, Ian, DSpac...@lists.sourceforge.net
Hi, Ian, you likely have installed a newer version of the Oracle driver, and the DSpace pom.xml file may be specifying an earlier version as a dependency. Maven doesn't know that your newer version satisfies that dependency. Probably the best thing to do would be to change the dependency in any place you find it in any of the poms, but I have done such silly things as reinstall the newer driver jar in my own maven repository by telling Maven it is an older driver, that DSpace is looking for. Hope that helps.

--Hardy

Sent from my iPad
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
DSpace-tech mailing list
DSpac...@lists.sourceforge.net<mailto:DSpac...@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Wellaway, Ian

unread,
Aug 25, 2015, 5:36:59 PM8/25/15
to Pottinger, Hardy J., DSpac...@lists.sourceforge.net
Thanks Hardy, that's it! I not only re-installed the driver a couple of times but also had to change the reference to it in all the pom files. Luckily it's only on a test version while I figure out how to do it before going live.

Best regards

Ian

------------

Ian Wellaway

Senior System Support & Development Officer - Academic Systems (Room 911) Mons, Tues and alternate Fridays
&
Technical Developer, Open Exeter - Infrastructure Systems (Room 54) Weds, Thurs and alternate Fridays

Exeter IT
Laver Building
University of Exeter
EX4 4QE
UK

tel +44 1392 722852


Reply all
Reply to author
Forward
0 new messages