Esri / geoportal-server-harvester

Metadata Harvester for Esri Geoportal Server
http://esri.github.io/geoportal-server/
Apache License 2.0
31 stars 24 forks source link

Getting error on BrokerController.class - compiled with different version of java #114

Closed jjosserand closed 4 years ago

jjosserand commented 4 years ago

What is the proper way to recompile this class so it can be used with my version of java? Caused by: java.lang.UnsupportedClassVersionError: com/esri/geoportal/harvester/rest/BrokerController has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class [com.esri.geoportal.harvester.rest.BrokerController])

mhogeweg commented 4 years ago

do you know what Java version you are using. as the message suggest it looks like your tomcat is using an older version than what the harvester was compiled with

jjosserand commented 4 years ago

1.8

Yours truly, Jesse Josserand https://github.com/jjosserand

On Fri, Jul 10, 2020 at 5:26 PM Marten notifications@github.com wrote:

do you know what Java version you are using. as the message suggest it looks like your tomcat is using an older version than what the harvester was compiled with

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Esri/geoportal-server-harvester/issues/114#issuecomment-656921092, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTIPQ4MY42VDQCBIVWDUYDR26ITDANCNFSM4OW4UEOA .

pandzel-zz commented 4 years ago

Jesse,

In the top level pom.xml do the following:

  1. Replace values of maven.compiler.source and maven.compiler.target from '11' to '1.8'
  2. Comment out the section in pom.xml marked as ' Dependencies required for JAVA 11/13 runtime environment' (three dependencies obsolete in 1.8)

then recompile the entire code with JDK 1.8 with: 'mvn clean install'.

Let us know if that has solved your issues.

jjosserand commented 4 years ago

Don't have source as far as I know.

Yours truly, Jesse Josserand https://github.com/jjosserand

On Mon, Jul 13, 2020 at 1:07 PM Piotr Andzel notifications@github.com wrote:

Jesse,

In the top level pom.xml do the following:

  1. Replace values of maven.compiler.source and maven.compiler.target from '11' to '1.8'
  2. Comment out the section in pom.xml marked as ' Dependencies required for JAVA 11/13 runtime environment' (three dependencies obsolete in 1.8)

then recompile the entire code with JDK 1.8 with: 'mvn clean install'.

Let us know if that has solved your issues.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Esri/geoportal-server-harvester/issues/114#issuecomment-657709388, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTIPQ7YV4F7BB6H4YNSWRLR3NENBANCNFSM4OW4UEOA .

mhogeweg commented 4 years ago

the Geoportal Server source code is available here in this repository. You can clone it or download into a local zip. Then expand and run the maven command from the top-level folder.

jjosserand commented 4 years ago

Ok. Thanks. I can download the zip, of course. I understand that. However, I've been away from this level of coding for some time doing management, sysadmin, and database work. Would you mind giving me the exact commands I need to run after I've uploaded the code to the affected server(s)?

pandzel-zz commented 4 years ago

Jesse,

You need the following:

  1. Java JDK (I presume you may already have one). Important! Having just Java JRE (runtime) is not enough; JDK is required. We use AdoptOpenJDK for our daily work available at: https://adoptopenjdk.net/, You can test if you have JDK installed by invoking javac --version (notice its javac not java? javac is a compiler),
  2. Make sure you have JAVA_HOME environment variable pointing to the 'root' folder where your JDK is installed,
  3. You need Apache Maven build tool available at https://maven.apache.org/,
  4. It's a good idea to put 'bin' folders from your JDK and Maven on your PATH environment variable,

Then invoke build from within Harvester root folder:

mvn clean install

First time you do it it will take time because build has to download all the required dependencies. Once it's done the 'war' file will be placed inside 'target' folder within Harvester root folder.

jjosserand commented 4 years ago

Thanks very much!!!

Yours truly, Jesse Josserand https://github.com/jjosserand

On Wed, Jul 15, 2020 at 11:38 AM Piotr Andzel notifications@github.com wrote:

Jesse,

You need the following:

  1. Java JDK (I presume you may already have one). Important! Having just Java JRE (runtime) is not enough; JDK is required. We use AdoptOpenJDK for our daily work available at: https://adoptopenjdk.net/, You can test if you have JDK installed by invoking javac --version (notice its javac not java? javac is a compiler),
  2. Make sure you JAVA_HOME environment variable pointing to the 'root' folder where your JDK is installed,
  3. You need Apache Maven build tool available at https://maven.apache.org/,
  4. It's a good idea to put 'bin' folders from your JDK and Maven on your PATH environment variable,

Then invoke build from within Harvester root folder:

mvn clean install

First time you do it it will take time because build has to download all the required dependencies. Once it's done the 'war' file will be placed inside 'target' folder within Harvester root folder.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Esri/geoportal-server-harvester/issues/114#issuecomment-658870816, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTIPQ65WBUUR2ODZ3GWJG3R3XLQDANCNFSM4OW4UEOA .

jjosserand commented 3 years ago

I really appreciate your help. I have three additional needs in a different environment and wonder if you'd be willing to give me some directions to resolve situations there. They are not bugs, but I definitely could use your guidance. If you or anyone on this thread is willing to help, I will provide the details in a follow-up email. Thanks. I await your response.

Yours truly, Jesse Josserand https://github.com/jjosserand

On Wed, Jul 15, 2020 at 9:02 PM Jesse Josserand jesse.josserand@gmail.com wrote:

Thanks very much!!!

On Wed, Jul 15, 2020 at 11:38 AM Piotr Andzel notifications@github.com wrote:

Jesse,

You need the following:

  1. Java JDK (I presume you may already have one). Important! Having just Java JRE (runtime) is not enough; JDK is required. We use AdoptOpenJDK for our daily work available at: https://adoptopenjdk.net/, You can test if you have JDK installed by invoking javac --version (notice its javac not java? javac is a compiler),
  2. Make sure you JAVA_HOME environment variable pointing to the 'root' folder where your JDK is installed,
  3. You need Apache Maven build tool available at https://maven.apache.org/,
  4. It's a good idea to put 'bin' folders from your JDK and Maven on your PATH environment variable,

Then invoke build from within Harvester root folder:

mvn clean install

First time you do it it will take time because build has to download all the required dependencies. Once it's done the 'war' file will be placed inside 'target' folder within Harvester root folder.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Esri/geoportal-server-harvester/issues/114#issuecomment-658870816, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTIPQ65WBUUR2ODZ3GWJG3R3XLQDANCNFSM4OW4UEOA .

mhogeweg commented 3 years ago

you've got mail!

jjosserand commented 3 years ago

Where have I got mail? (ha ha).