[Dspace-tech] Oracle install problem with 1.3.1

8 views
Skip to first unread message

Donal Lyons

unread,
Aug 24, 2015, 2:59:46 PM8/24/15
to dspac...@lists.sourceforge.net
Hi,

I've copied the oracle ojdbc14.zip driver into
D:\dspace-source\lib and added that to my PATH
environment variable on a Windows machine.
Looking into the file it does contain OracleDriver.class.

I've changed dspace.cfg to refer to Oracle (a local 10g test DB
which I've stopped - although results are the same if it's started)
and changed its references to /dspace into D:/dspace

Now ant fresh_install starts but fails on initializing DB pool step.
This usually seems to mean the driver can't be found but I think
it is being found in this case as, if I remove it, the error message
becomes 'a suitable driver cannot be found'.

Any thoughts on what the problem might be?

Donal.
=========================================================

D:\dspace-source>ant fresh_install
Buildfile: build.xml

compile:

install_code:

build_wars:

init_configs:

setup_database:
[java] 2005-08-10 10:33:25,318 INFO
org.dspace.storage.rdbms.InitializeDat
abase @ Initializing Database
[java] 2005-08-10 10:33:25,365 WARN
org.dspace.storage.rdbms.DatabaseManag
er @ Exception initializing DB pool
[java] java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
[java] at java.security.AccessController.doPrivileged(Native
Method)
[java] at
java.net.URLClassLoader.findClass(URLClassLoader.java:187)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
[java] at
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)

[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
[java] at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)

[java] at java.lang.Class.forName0(Native Method)
[java] at java.lang.Class.forName(Class.java:141)
[java] at
org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseM
anager.java:1288)
[java] at
org.dspace.storage.rdbms.DatabaseManager.getConnection(Databa
seManager.java:444)
[java] at
org.dspace.storage.rdbms.DatabaseManager.loadSql(DatabaseMana
ger.java:777)
[java] at
org.dspace.storage.rdbms.InitializeDatabase.main(InitializeDa
tabase.java:71)
[java] 2005-08-10 10:33:25,365 FATAL
org.dspace.storage.rdbms.InitializeDat
abase @ Caught exception:
[java] java.sql.SQLException: java.lang.ClassNotFoundException:
oracle.jdbc
.OracleDriver
[java] at
org.dspace.storage.rdbms.DatabaseManager.initialize(DatabaseM
anager.java:1383)
[java] at
org.dspace.storage.rdbms.DatabaseManager.getConnection(Databa
seManager.java:444)
[java] at
org.dspace.storage.rdbms.DatabaseManager.loadSql(DatabaseMana
ger.java:777)
[java] at
org.dspace.storage.rdbms.InitializeDatabase.main(InitializeDa
tabase.java:71)

BUILD FAILED
D:\dspace-source\build.xml:266: Java returned: 1



Donal Lyons,
Information System Services,
Trinity College,
Dublin 2,
Ireland.
Tel: +353 1 608 1754
********************************************
Privileged, confidential and/or copyright
information may be contained in this e-mail.

This e-mail is for the use only of the
intended addressee. If you are not the intended addressee, or the person
responsible for delivering it to the intended addressee, you may not copy,
forward, disclose or otherwise use it or any part of it in any way
whatsoever.
To do so is prohibited and may be unlawful.

If you receive this e-mail by mistake please advise the sender immediately
by using the reply facility in your e-mail software.
********************************************

Please note that electronic mail to, from or within the College, may be the
subject of a request under the Freedom of Information Act, 1997.
********************************************

DISCLAIMER: The contents of this mail are
solely the opinions of the author. They do not represent or are intended
to represent in any way, shape or form those of Trinity College, Dublin.
********************************************


Tansley, Robert

unread,
Aug 24, 2015, 3:03:12 PM8/24/15
to Donal Lyons, DSpace Technology List
(Replying to the list in case this helps anyone else)

I doubt if the code you mention would work if the default does not.

You shouldn't need to alter your CLASSPATH at all -- the DSpace
build.xml file should take care of it all. So in fact, it might be best
to completely get rid of any CLASSPATH you have. As long as ojdbc14.jar
is in dspace-source\lib, it should be picked up by the DSpace build
process and installed along with the rest of DSpace.

Another thing it's worth trying is doing 'ant clean' before 'ant
fresh_install'. It's mysteriously fixed problems I've had in the past.

Rob

> -----Original Message-----
> From: Donal Lyons [mailto:Donal...@tcd.ie]
> Sent: 15 August 2005 07:22
> To: Tansley, Robert
> Subject: RE: [Dspace-tech] Oracle install problem with 1.3.1
>
> Hi Robert,
>
> Thanks for the reply. I'd tried renaming 'ojdbc14.zip' to
> 'ojdbc14.jar'
> and adding the resulting 'ojdbc14.jar' to the classpath but
> that didn't
> change anything. Am I right in assuming the file formats are
> the same so
> that's allowable?.
>
>
> I'm also wondering about a line in loadSql(Reader r)
> connection = getConnection();
>
> Writing my own code, I'd have done something like
> // connect to database using connection context db_conn
> DriverManager.registerDriver (new
> oracle.jdbc.driver.OracleDriver());
> String url = "jdbc:oracle:thin:@myIP:1521:myDB" ;
> Connection connection =
> DriverManager.getConnection(url, "dspace",
> "dspacePASSWORD" );
>
> Grasping at straws here, as you may have noticed.
>
> Donal.
>
>
> -----Original Message-----
> From: Tansley, Robert [mailto:robert....@hp.com]
> Sent: Friday, August 12, 2005 8:28 PM
> To: Donal Lyons; dspac...@lists.sourceforge.net
> Subject: RE: [Dspace-tech] Oracle install problem with 1.3.1
>
> Shouldn't it be called 'ojdbc14.jar'? I'm pretty sure the
> DSpace build
> process only picks up files ending .jar, so ojdbc14.zip won't be added
> to the CLASSPATH.
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA * Development
> > Lifecycle Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams *
> > Testing & QA
> > Security * Process Improvement & Measurement *
> > http://www.sqe.com/bsce5sf
> > _______________________________________________
> > DSpace-tech mailing list
> > DSpac...@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/dspace-tech
> >
>
>

Donal Lyons

unread,
Aug 24, 2015, 3:03:12 PM8/24/15
to dspac...@lists.sourceforge.net
Hi,

I wonder if some of this problem may be due to the SQL files?
For example, database_schema.sql has a table definition WorkflowItem
with embedded blank lines which causes the CREATE TABLE to fail.

There are also issues with creation of duplicate indexes and
identifiers that are too long (e.g. the 32-char
handle_resource_id_and_type_idx)

Donal.


Tansley, Robert

unread,
Aug 24, 2015, 3:03:12 PM8/24/15
to Donal Lyons, dspac...@lists.sourceforge.net
Reply all
Reply to author
Forward
0 new messages