Grails Java 8开发模式支持

时间:2015-12-04 20:59:03

标签: grails java-8

由于Java 7现在不再被公开维护,并且Grails 2.4.X对Java 8的支持在重新加载时在dev-mode 中是边缘的(崩溃)。 我想知道在迁移之前是否有人在Java 8 dev-mode Grails 2.5或Grails 3 方面有更好的运气?

理论上,很多东西都是通过迁移到更新的Spring Boot(即grails 3)来升级的。

我的错误:

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]

从日志文件中:

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

1 个答案:

答案 0 :(得分:1)

我的建议,简单,负载和明确:迁移(或真正升级),不要回头。

为什么。 我们在2014年10月开始了一个GG项目,Grails 2.3和JDK7,一直到2.5.1和Java 8.然后我们开始看到我们脚下的地面转移Grails 3和Gradle在那里我们停滞不前。 Grails 3.1,.2,.3,.4,.5 ......而我们站在玻璃后面看。 Stackoverflow在新的功能和问题上嗡嗡作响,而Grails 2上的水流变得更薄更干燥。它很痛苦,我认为你现在必须经历这个。

如何。 你最大的问题(如果不是也是唯一的问题)就是你在BuildConfig文件中遇到的问题 - 插件。除了BuildConfig.groovybuild.gradle步骤之外,您可以在decent Upgrade page中盲目跟踪其他所有内容。例如,必须更改处理spring安全性和Web服务的插件,如果你在视图中嵌入了ajax组件(如submitToRemote和remoteFunction),那么你需要考虑在纯jQuery和ajax调用中重建所有这些组件。只需为所有这些组件添加ajax插件即可正常工作。

步骤。

  1. 稍微了解Gradle并严重依赖sdkman
  2. IDE的IntelliJ 15
  3. 创建Grails 3项目
  4. 如果Spring安全性是您的插件之一,请不要从旧项目中复制代码,使用quickstart
  5. 在本地合并插件机制
  6. 对于较旧的ajax UI组件,您可以将以下行添加到build.gradle,并且所有内容都应该像他们一样工作,尽管GG团队建议不要这样做。 compile 'org.grails.plugins:ajax-tags:1.0.0.RC1'
  7. 使用了哪些网络服务?按照steps in this post查看如何制作插件以及使用服务
  8. 是的,现在按照上面提到的升级页面中的步骤进行操作 密切关注每一个插件。受支持的文件位于this page
  9. 其他重要步骤?添加为评论或直接添加到此列表中,以使G2的用户更轻松,更轻松地完成此任务。我会继续编辑这个。