DSpace 5.9 Java version

93 views
Skip to first unread message

grant....@flinders.edu.au

unread,
Aug 7, 2018, 9:24:15 PM8/7/18
to DSpace Technical Support
Hi,

I am upgrading from DSpace 5.6 Mirage2 to 5.9 Mirage2 in our test environment (from dspace-5.9-src-release.tar.gz). The following steps appear to be successful.

  $ mvn package -Dmirage2.on=true
  $ ant update

However, the following step throws an exception.

$ cd [dspace]
$ bin/dspace version
DSpace version:  5.9
  SCM revision:  ${buildNumber}
    SCM branch:  UNKNOWN_BRANCH
            OS:  Linux(amd64) version 2.6.32-754.el6.x86_64
Exception: org/postgresql/Driver : Unsupported major.minor version 52.0
java.lang.UnsupportedClassVersionError: org/postgresql/Driver : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:808)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        ...

I get the same exception for other dspace commands. Eg.
  $ bin/dspace database test

My understanding is that this implies the new DSpace 5.9 PostgreSQL JDBC driver requires Java 1.8 (as it was compiled with Java 1.8) whereas the doco for DSpace 5.9 recommends using Java 1.7. Assuming this is so, I guess I should change to Java 1.8. Can I use any version of Oracle JDK or OpenJDK 1.8 with DSpace 5.x/5.9 or are some versions unsuitable? I haven't attempted to start tomcat 7 yet.

My environment is:
- RHEL 6.10; 2.6.32-754.el6.x86_64 #1 SMP
- java/javac OpenJDK 1.7.0_191
- Apache Maven 3.0.5
- Apache Ant(TM) version 1.8.4
- Apache Tomcat/7.0.65
- postgres/psql (PostgreSQL) 9.2.23 [on a remote RHEL 7.5 server]

Thank you in advance.
Cheers, Grant

Adan

unread,
Aug 8, 2018, 2:26:08 AM8/8/18
to dspac...@googlegroups.com
Hi

You are using java 8 with maven, it download Postgres driver for java 8, and then deploy it in a tomcat 7.
You must use the same java version.
Or you can force the postgres driver version in the root pom.xml.
A clean package is mandatory to delete the bad downloaded driver

regards
Adán
--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
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.



Libre de virus. www.avast.com

Grant Jackson

unread,
Aug 8, 2018, 3:05:50 AM8/8/18
to dspac...@googlegroups.com

Thanks Adán.

 

Sorry, I didn't describe that very well. Please ignore the part "as it was compiled with Java 1.8".

 

I do not have Java 1.8 on the server at all. I ran maven (and ant and everything else) under Java 1.7.

 

Thanks for your idea of forcing the postgres driver version in the root pom.xml. I will consider that option if no responses re suitable versions of JDK 1.8.

 

Cheers, Grant

Mark H. Wood

unread,
Aug 8, 2018, 10:01:41 AM8/8/18
to DSpace Technical Support
I don't have a list of known compatible versions of JDK 1.8, but I can say that I've run DSpace on many 1.8 versions and cannot recall one that was *not* compatible.  We have several instances, from DSpace 1.8.1 to 6.2, running well on Java 1.8.0_172.

Grant Jackson

unread,
Aug 9, 2018, 4:52:45 AM8/9/18
to DSpace Technical Support

Great, thanks for the info Mark.

Cheers, Grant

 

From: dspac...@googlegroups.com <dspac...@googlegroups.com> On Behalf Of Mark H. Wood
Sent: Wednesday, 8 August 2018 11:32 PM
To: DSpace Technical Support <dspac...@googlegroups.com>
Subject: Re: [dspace-tech] DSpace 5.9 Java version

 

I don't have a list of known compatible versions of JDK 1.8, but I can say that I've run DSpace on many 1.8 versions and cannot recall one that was *not* compatible.  We have several instances, from DSpace 1.8.1 to 6.2, running well on Java 1.8.0_172.

--

Reply all
Reply to author
Forward
0 new messages