Opened 9 years ago

Last modified 3 years ago

#893 new defect

Upgrade tomcat in GS3 from 7.026 to 7.057 to work with JDK 8?

Reported by: ak19 Owned by: nobody
Priority: moderate Milestone: 3.11 Release
Component: Greenstone3 Runtime Severity: enhancement
Keywords: tomcat Cc:


I can get GS3 to work with Java 8, but only by upgrading the tomcat that GS3 uses to 7.0.57:

I worked on an "Ubuntu 14.04 LTS" 64 bit machine (bedrock) here. I installed JDK1.8, set up the Java environment in my .profile and logged out and back in, just to make doubly sure all processes will use this java and no other. I then checked out gs3 from SVN and compiled it up.

The compilation succeeded but running the GS3 tomcat server initially failed with the error: "The type java.util.Map$Entry cannot be resolved."

Googling the error led to the stackoverflow page

The suggested solution was to update tomcat to 7.0.54. I found 7.0.57 at I extracted it into my new gs3-svn's "package"s folder and renamed the extracted folder to "tomcat", after renaming the old "tomcat" folder there to tomcat-7.0.26.

The new tomcat contains up-to-date helper jar files for jasper and ecj, as was mentioned at stackoverflow.

Restarting the server now allows me to to view the /greenstone3 servlet. I can search the lucene demo collection after rebuilding it. Rebuilding the solr collection from GLI and searching it still works, so on the surface the new tomcat seems to be okay with JDK8.

I then repeated the above with the JAVA settings back to JDK 7, to confirm that the newer tomcat works with Java 7. It seems to be fine, so maybe we can make GS3 ship with the newer tomcat by default, in order for GS3 users to be able to work with Java 8 out of the box.

Therefore, to try Java 8 with GS3, you will need tomcat 7.0.57. Untar it into GS3/packages and name the folder "tomcat" after moving out the old one.

Change History (2)

comment:1 by ak19, 9 years ago

Java 6 (JDK 1.6.0_45) works with tomcat 7.0.57 too, so committed the change to build.xml to grab the newer tomcat from nzdl.

Not tested against Java 5. Not tested at all on windows.

comment:2 by kjdon, 3 years ago

Milestone: 3.10 Release3.11 Release

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.