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

From: [email protected] <[email protected]> On Behalf Of 
Adan
Sent: Wednesday, 8 August 2018 3:53 PM
To: [email protected]
Subject: Re: [dspace-tech] DSpace 5.9 Java version

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
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
--
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 
[email protected]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.



[https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif]<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>

Libre de virus. 
www.avast.com<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>

--
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 
[email protected]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to