Unable to locate tools.jar, Buildfile: build.xml does not exist!

1,000 views
Skip to first unread message

Βασιλική Γώγου

unread,
Aug 16, 2017, 6:04:47 PM8/16/17
to DSpace Technical Support
Hi, 
I just noticed that the tools.jar and build.xml are missing.

root@dima-vm:/dspace-6.1-src-release/dspace/target/dspace-installer# ant fresh_install

Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-8-openjdk-amd64/lib/tools.jar

Buildfile: build.xml does not exist!

Build failed

root@dima-vm:/dspace-6.1-src-release/dspace/target/dspace-installer#

Any recommedations?

Andrea Schweer

unread,
Aug 16, 2017, 6:15:53 PM8/16/17
to Βασιλική Γώγου, DSpace Technical Support
Hi,

make sure you have the JDK installed, not just the JRE. See https://stackoverflow.com/questions/5559956/ant-needs-tools-jar-and-unable-to-find-it

cheers,
Andrea
--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
Dr Andrea Schweer
Lead Software Developer, ITS Information Systems
The University of Waikato, Hamilton, New Zealand
+64-7-837 9120

Βασιλική Γώγου

unread,
Aug 17, 2017, 8:40:08 AM8/17/17
to DSpace Technical Support
And what about build.xml that is missing?

Mark H. Wood

unread,
Aug 17, 2017, 9:06:44 AM8/17/17
to DSpace Technical Support
On Thursday, August 17, 2017 at 8:40:08 AM UTC-4, Βασιλική Γώγου wrote:
And what about build.xml that is missing?



I would first fix the tools.jar problem, supposing that it may be the cause of the build.xml problem.

Βασιλική Γώγου

unread,
Aug 17, 2017, 9:30:38 AM8/17/17
to DSpace Technical Support
I've installed jdk: 
apt-get install openjdk-8-jdk
update-alternatives --config java
select 
2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

and next:  ant fresh_install
Buildfile: build.xml does not exist!
Build failed
 What's wrong with jdk?


Τη Πέμπτη, 17 Αυγούστου 2017 - 1:04:47 π.μ. UTC+3, ο χρήστης Βασιλική Γώγου έγραψε:

Tim Donohue

unread,
Aug 17, 2017, 10:17:05 AM8/17/17
to Βασιλική Γώγου, DSpace Technical Support
Hello,

After installing the JDK, you will need to rebuild DSpace (the "mvn package" step).  It is highly likely that the build.xml file was not created because the Maven build process failed to generate it previously.  So, please try rebuilding DSpace again using "mvn package" and hopefully that will resolve the problem of the missing build.xml file.

For reference, please see steps 7 and 8 in the Installation instructions here (as those are the steps you will need to rerun): https://wiki.duraspace.org/display/DSDOC6x/Installing+DSpace#InstallingDSpace-Installation

Good luck,

Tim

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
--
Tim Donohue
Technical Lead for DSpace & DSpaceDirect
DuraSpace.org | DSpace.org | DSpaceDirect.org

Βασιλική Γώγου

unread,
Aug 17, 2017, 12:43:23 PM8/17/17
to DSpace Technical Support
I run again 'mvn package' and I get BUILD SUCCESS and when I run 'ant fresh_install' I get the following: 


How can I use the -Djava.io.tmpdir= option to select an alternate temp location?

Τη Πέμπτη, 17 Αυγούστου 2017 - 1:04:47 π.μ. UTC+3, ο χρήστης Βασιλική Γώγου έγραψε:

Tim Donohue

unread,
Aug 17, 2017, 1:10:01 PM8/17/17
to Βασιλική Γώγου, DSpace Technical Support
This error sounds like you've run out of space on your server, or your /tmp directory is full (out of space).  You may want to double check that you have space to install DSpace and the /tmp directory isn't full.  Here's an answer to a similar error on StackOverflow, and it gives hints on checking your available space: https://stackoverflow.com/a/25953429/3750035

Good luck,

Tim

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Βασιλική Γώγου

unread,
Aug 17, 2017, 5:01:02 PM8/17/17
to DSpace Technical Support
I've done : 'df-h' to check disk space and then I noticed that I have two directories one /dspace-6.1-src-release and one /root/dspace-6.1-src-release
Is it right?


Τη Πέμπτη, 17 Αυγούστου 2017 - 1:04:47 π.μ. UTC+3, ο χρήστης Βασιλική Γώγου έγραψε:

Tim Donohue

unread,
Aug 17, 2017, 5:27:50 PM8/17/17
to Βασιλική Γώγου, DSpace Technical Support
It sounds like you may want to look closer at the installation instructions at: 

You only need a single [dspace-source] directory (this is the location where you build DSpace from, i.e. run "mvn package" and "ant fresh_install")
You will also need a separate [dspace] directory (which is the location where you install DSpace *into*). This is configured in your local.cfg (or dspace.cfg) and is the location that "ant fresh_install" will install the DSpace application into.  It is recommended to have this be a separate directory from [dspace-src], and you could even just name it "/dspace" (but it's entirely up to you).

So, based on the information you've given, it sounds like you need to figure out which of those directories to keep (and the other likely can be deleted). Or, you could start again and download DSpace 6.1 and unzip it into a brand new [dspace-source] directory.  Assuming you have enough disk space, hopefully things will work fine.

- Tim

--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Βασιλική Γώγου

unread,
Sep 7, 2017, 10:31:08 AM9/7/17
to DSpace Technical Support
build success on mvn package, but build failled on ant fresh_install.
my local.cfg is attached

root@dima-vm:/dspace-6.1-src-release/dspace/target/dspace-installer# ant fresh_install
Buildfile: /dspace-6.1-src-release/dspace/target/dspace-installer/build.xml

init_installation:

prepare_configs:
    [mkdir] Created dir: /dspace-6.1-src-release/dspace/target/dspace-installer/config-temp
     [copy] Copying 158 files to /dspace-6.1-src-release/dspace/target/dspace-installer/config-temp
     [copy] Copying 1 file to /dspace-6.1-src-release/dspace/target/dspace-installer/config-temp
     [copy] Copying 16 files to /dspace-6.1-src-release/dspace/target/dspace-installer/config-temp

init_configs:
     [copy] Copying 1 file to /dspace/config
   [delete] Deleting directory /dspace-6.1-src-release/dspace/target/dspace-installer/config-temp

test_database:
     [java] 2017-09-07 17:22:37,207 WARN  org.dspace.services.email.EmailServiceImpl @ Couldn't get an email session from environment:  Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
     [java]
     [java] Error running 'test':
     [java]  - java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to 192.168.6.232:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
     [java]
     [java] Please see the DSpace documentation for assistance.
     [java]
     [java] java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to 192.168.6.232:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2294)
     [java] 2017-09-07 17:22:38,289 ERROR org.dspace.storage.rdbms.DatabaseUtils @ Unable to setup Flyway against DSpace database
     [java] java.sql.SQLException: Cannot create PoolableConnectionFactory (Connection to 192.168.6.232:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2294)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
     [java]     at org.dspace.storage.rdbms.DatabaseUtils.setupFlyway(DatabaseUtils.java:473)
     [java]     at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:98)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]     at java.lang.reflect.Method.invoke(Method.java:498)
     [java]     at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
     [java]     at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
     [java] Caused by: org.postgresql.util.PSQLException: Connection to 192.168.6.232:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:265)
     [java]     at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:55)
     [java]     at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:219)
     [java]     at org.postgresql.Driver.makeConnection(Driver.java:407)
     [java]     at org.postgresql.Driver.connect(Driver.java:275)
     [java]     at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39)
     [java]     at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:256)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2304)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533)
     [java]     at org.dspace.storage.rdbms.DatabaseUtils.main(DatabaseUtils.java:105)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     [java]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java]     at java.lang.reflect.Method.invoke(Method.java:498)
     [java]     at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
     [java]     at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
     [java] Caused by: org.postgresql.util.PSQLException: Connection to 192.168.6.232:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:265)
     [java]     at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:55)
     [java]     at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:219)
     [java]     at org.postgresql.Driver.makeConnection(Driver.java:407)
     [java]     at org.postgresql.Driver.connect(Driver.java:275)
     [java]     at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39)
     [java]     at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:256)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2304)
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290)
     [java]     ... 9 more
     [java] Caused by: java.net.ConnectException: Connection refused (Connection refused)
     [java]     at java.net.PlainSocketImpl.socketConnect(Native Method)
     [java]     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
     [java]     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
     [java]     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
     [java]     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
     [java]     at java.net.Socket.connect(Socket.java:589)
     [java]     at org.postgresql.core.PGStream.<init>(PGStream.java:64)
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:147)
     [java]     ... 17 more
     [java]     at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290)
     [java]     ... 10 more
     [java] Caused by: java.net.ConnectException: Connection refused (Connection refused)
     [java]     at java.net.PlainSocketImpl.socketConnect(Native Method)
     [java]     at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
     [java]     at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
     [java]     at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
     [java]     at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
     [java]     at java.net.Socket.connect(Socket.java:589)
     [java]     at org.postgresql.core.PGStream.<init>(PGStream.java:64)
     [java]     at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:147)
     [java]     ... 18 more
     [java]
     [java] Attempting to connect to database
     [java] 2017-09-07 17:22:38,393 WARN  org.dspace.services.sessions.SessionRequestServiceImpl @ Request interceptor (org.dspace.services.events.SystemEventService$EventRequestInterceptor@c8cfb3f) failed to execute on end (request-25-1504794158211): null

BUILD FAILED
/dspace-6.1-src-release/dspace/target/dspace-installer/build.xml:792: Java returned: 1

Total time: 13 seconds



Τη Πέμπτη, 17 Αυγούστου 2017 - 1:04:47 π.μ. UTC+3, ο χρήστης Βασιλική Γώγου έγραψε:
local.cfg.EXAMPLE

Βασιλική Γώγου

unread,
Sep 7, 2017, 11:09:30 AM9/7/17
to DSpace Technical Support
my local.cfg


Τη Πέμπτη, 17 Αυγούστου 2017 - 1:04:47 π.μ. UTC+3, ο χρήστης Βασιλική Γώγου έγραψε:
local.cfg

Tim Donohue

unread,
Sep 7, 2017, 12:30:40 PM9/7/17
to Βασιλική Γώγου, DSpace Technical Support
Hello,

If you take a closer look at the new error message:

"Connection to 192.168.6.232:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections."

That is saying that DSpace cannot connect to your configured database at 192.168.6.232 on port 5432.  So, either the database is not running on that IP address and port, or the port is not responding (e.g. it's being blocked by a firewall). DSpace needs to be able to communicate with the database to fully install all the necessary database tables, etc.

So, you should take a closer look at your db.url setting in your local.cfg. If the database is running on the same server as DSpace, you also may be able to simply change "192.168.6.232:5432" to the default value of "localhost:5432", assuming that your database is running locally on port 5432.

Good luck,

Tim


--
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages