1

As Java 7 is now no longer being publicly maintained and Grails 2.4.X support for Java 8 is marginal (it crashes) in dev-mode when reloading. I was wondering if anyone had a better luck with Java 8 dev-mode Grails 2.5 or Grails 3 before I migrate?

In theory a lot of things were upgraded by migrating to the newer Spring Boot (i.e., grails 3).

My errors:

found a projection 312
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x000000010e4eee40, pid=95784, tid=20739
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V  [libjvm.dylib+0xeee40]
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /Users/nathandunn/repositories/Apollo/hs_err_pid95784.log
[thread 36867 also had an error]

From the log file:

Internal exceptions (10 events):
Event: 40.212 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/ProjectionService$_$tt__loadTrackJson_closure25BeanInfo> (0
x00000007a09ab690) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile/systemDi
Event: 40.212 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/ProjectionService$_$tt__loadTrackJson_closure25Customizer> 
(0x00000007a0a3a9b0) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile/system
Event: 40.227 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/projection/ProjectionSequence$_toJSONObject_closure1BeanInf
o> (0x00000007a0e2e020) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile/sys
Event: 40.228 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/projection/ProjectionSequence$_toJSONObject_closure1Customi
zer> (0x00000007a0ec5290) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile/s
Event: 40.232 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/ProjectionService$_createExonLocations_closure9BeanInfo> (0
x00000007a1048ae0) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile/systemDi
Event: 40.233 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/ProjectionService$_createExonLocations_closure9Customizer> 
(0x00000007a10d7a40) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile/system
Event: 40.237 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/ProjectionService$_extractHighLevelLocations_closure12BeanI
nfo> (0x00000007a1253d28) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile/s
Event: 40.238 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/ProjectionService$_extractHighLevelLocations_closure12Custo
mizer> (0x00000007a12edd70) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile
Event: 40.243 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/ProjectionService$_extractExonArrayLocations_closure13BeanI
nfo> (0x00000007a148f458) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile/s
Event: 40.244 Thread 0x00007f8690d2b800 Exception <a 'java/lang/ClassNotFoundException': org/bbop/apollo/ProjectionService$_extractExonArrayLocations_closure13Custo
mizer> (0x00000007a152a408) thrown at [/Users/java_re/workspace/8-2-build-macosx-x86_64/jdk8u45/3457/hotspot/src/share/vm/classfile
3
  • I use jdk8 for 2.4, 2.5, 3.0 apps. Could you please provide the stacktrace/errormessage/... you get? You might need to swap out springloaded with older versions, but that should be about it.
    – cfrick
    Dec 5, 2015 at 10:55
  • Ggts supports jdk 8.25 8.31. Anything higher won't work in ggts but it's fine for command line. I hit an issue around generating ssl key. Upgraded tomcat plug in to 8. Which has a fix then back to tomcat 7 plug in. After first attempt that generates keys
    – V H
    Dec 5, 2015 at 15:25
  • More detail added. I'm using Intellij and the command-line. I get the same results in both. Dec 6, 2015 at 17:45

1 Answer 1

3

My advice, simple, load and clear: migrate (or upgrade really), and don't look back.

The Why. We started a GG project in Oct 2014 with Grails 2.3 and JDK7, and went all the way up to 2.5.1 and Java 8. Then we started seeing the grounds shift under our feet with Grails 3 and Gradle out there while we stagnated. Grails 3.1, .2, .3, .4, .5... while we stood behind glass looking. Stackoverflow was buzzing with the new features and problems while water streams were getting thinner and drier on Grails 2. It hurt and I think you must be going through this now.

The How. Your biggest (if not and only) problem is what you got into your BuildConfig file - the plugins. Almost everything else you can follow blindly in this decent Upgrade page but the BuildConfig.groovy to build.gradle step. For example, plugins that dealt with spring security and web services had to be changed, and if you have embedded ajax components (like submitToRemote and remoteFunction) in your views, then you need to think about rebuilding all those in pure jQuery and ajax calls or just add the ajax plugin for all such components to work as they did.

The Steps.

  1. Get to know Gradle a little bit and depend heavily on sdkman
  2. IntelliJ 15 for an IDE
  3. Create a Grails 3 project
  4. If spring security is one of your plugins, don't copy code from your older project, incorporate the plugin mechanics locally using quickstart
  5. For your older ajax UI components, you could add the following line to your build.gradle and all should work as they did, although the GG team advises against that. compile 'org.grails.plugins:ajax-tags:1.0.0.RC1'
  6. Web services used? Follow the steps in this post to see how you should craft the plugin inclusion as well as using the services
  7. Yes, now follow the steps in the upgrade page mentioned above, but keep an eye on each and every plugin. The supported ones are in this page.

Others vital steps? Add as comments or straight to this list to make such a task easier and easier for the G2'ers out there. I will keep editing this.

2
  • 1
    Thanks . . this is exactly the type of advice I was looking for. We have a few features to get first, but it looks like this is the way to go. Dec 6, 2015 at 23:40
  • Added Step 6 about REST web services. Was using wslite, which is not supported in G3.
    – mohsenmadi
    Dec 7, 2015 at 1:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.