1

I am having a legacy grails application that uses Grails 2.4.4 & has a runtime of Java7 / Tomcat7. We are planning to take it to Azure app service but azure supports runtime starting from java 8 / tc 8.5.

We are looking to upgrade the application to grails 2.5 as that seems to be supporting jdk8. Are there any pointers on how a 2.4.4 application could be migrated to 2.5 ?

Ashwin Sridhar
  • 125
  • 1
  • 14
  • Without knowing what is in your app it is impossible to say what will need to be addressed. FYI... The primary reasons that we released Grails 2.5 when we released Grails 3 included that we wanted there to be a 2.x release with support for Java 8 and the latest version of Groovy at the time. We did not introduce a lot of changes in 2.5 to allow that. Most 2.4 to 2.5 upgrades were straightforward. – Jeff Scott Brown Jul 08 '20 at 19:49
  • Could you confirm if grails 2.5.6 built app is compatible with tomcat 8 ? From the docs below, i see tomcat 6 & 7 mentioned. https://grails.github.io/grails2-doc/2.5.6/guide/gettingStarted.html – Ashwin Sridhar Jul 08 '20 at 20:02

2 Answers2

0

I have done this already. There were some issues i had to solve but the error-logs and stackoverflow were my friends. I cannot provide a howto but if you just try it and send the errors you get i would be pleased to help you.

powlwoq
  • 1
  • 3
  • I was able to get the application compiled on Java 8. But with Java 8 runtime on a tomcat, i get a issue related to java.lang.ClassNotFoundException: sun.misc.BASE64Decoder – Ashwin Sridhar Jul 09 '20 at 22:20
  • Maybe this will help you: https://stackoverflow.com/questions/35301409/migrating-from-sun-misc-base64-to-java-8-java-util-base64 – powlwoq Jul 10 '20 at 18:37
0

I was able to successfully get the application with a stack of grails 2.2.4 , java 1.7 , tomcat 7 migrated to grails 2.5.6 , Java 1.8 (compile) , tomcat 9 ( runtime java 11). Some of the hurdles i encountered are:

  1. If your app uses JAXB , make sure that is available in app's runtime. With java 8 runtimes, they were available by default.
  2. mailService Bean creation issues - Ran to issues with instantiating the mailService Bean & was resolved by setting the poolSize to 1 in the configuration.
  3. txManager , sessionFactory instantiating issues - those were are settled by having the runtime jars - JaxB , marshaller etc. Though the stacktrace was misleading.
aldrin
  • 4,482
  • 1
  • 33
  • 50
Ashwin Sridhar
  • 125
  • 1
  • 14