GGTS(Eclipse)和JAVA 1.8中不兼容的JVM [英] Incompatible JVM in GGTS (Eclipse) and JAVA 1.8

查看:1228
本文介绍了GGTS(Eclipse)和JAVA 1.8中不兼容的JVM的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于升级到Java 1.8,在GGTS(eclipse)中运行grails应用程序有一些问题。



堆栈以:开始:

  2015年3月5日3: 51:31 PM org.springsource.loaded.jvm.JVM copyMethod 
SEVERE:复制方法问题。不兼容的JVM?
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
在java.lang.reflect.Method.invoke(Method.java:497)
在org.springsource.loaded.jvm.JVM.copyMethod(JVM.java:134)
在org.springsource.loaded .ri.OriginalClassInvoker.createJavaMethod(OriginalClassInvoker.java:68)
在org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredMethods(ReflectiveInterceptor.java:151)
在org.codehaus.groovy.reflection.CachedClass $ 3 $ 1.run(CachedClass.java:84)
在java.security.AccessController.doPrivileged(本机方法)
在org.codehaus.groovy.reflection.CachedClass $ 3.initValue(CachedClass.java:81 )
...
在java.lang.reflect.Method.invoke(Method.java:497)
在org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java: 1270)$在$ org.codehaus.groovy.grails.cli.support.GrailsS​​tarter.main(GrailsS​​tarter.java)上的$ b $ :264)
导致:java.lang.IllegalArgumentException:无法在java.lang.reflect.Method.copy(Method.java:151)
中复制非root方法
。 ..更多

我曾经在Java 1.7中运行相同的应用程序。我的同事升级到1.8,不能再运行了。我已经用SUN JDK测试了,现在我再次使用OpenJDK,而且没有帮助
当前JDK openjdk版本1.8.0_40





JAVA_HOME,JAVA_PATH和任何其他变量似乎指向正确的JDK安装。我已经删除了所有以前的(从操作系统的JDK 1.6和1.7,以确保没有引用它们)。



由于某些原因,GGTS仍然抱怨错误的JVM。我明白错误可能与编译器1.7相关,试图在1.8中编译文件,但我不知道这个引用在eclipse中的引用。



我的Eclipse安装信息在Java下列出以下内容:

  vm 
/usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
eclipse.home.location = file:/home/arb/dev/applications/ggts-3.6.3。 SR1 /
eclipse.launcher = / home / arb / dev / applications / ggts-3.6.3.SR1 / GGTS
eclipse.launcher.name = GGTS
eclipse.p2.data.area =@config.dir /../ p2
eclipse.p2.profile = DefaultProfile
eclipse.product = org.springsource.ggts.ide
eclipse.startTime = 1425566898624
eclipse .stateSaveDelayInterval = 30000
eclipse.vm = / usr / lib64 / jvm / jre-1.8.0-openjdk / bin / java
eclipse.vmargs = -Dgrails.console.enable.interactive = false
-Dgrails.console.enable.terminal = false
-Djline.terminal = jline.UnsupportedTerminal
-Dgrails.console.class = grails.build.logging.GrailsEclipseConsole
-Dosgi.requiredJavaVersion = 1.6
-Xms60m
-Xmx1024m


解决方案

这是一个与jdk8u40有关的问题,回到jdku31。它在那个版本中工作。
我在windows和linux环境中遇到同样的问题。


Having some problem with running a grails application in GGTS (eclipse) due to upgrade to Java 1.8.

The stack starts with:

Mar 05, 2015 3:51:31 PM org.springsource.loaded.jvm.JVM copyMethod
SEVERE: Problems copying method. Incompatible JVM?
java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor91.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springsource.loaded.jvm.JVM.copyMethod(JVM.java:134)
    at org.springsource.loaded.ri.OriginalClassInvoker.createJavaMethod(OriginalClassInvoker.java:68)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlClassGetDeclaredMethods(ReflectiveInterceptor.java:151)
    at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
...
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1270)
    at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:236)
    at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:264)
Caused by: java.lang.IllegalArgumentException: Can not copy a non-root Method
    at java.lang.reflect.Method.copy(Method.java:151)
    ... 280 more

I used to run the same application in Java 1.7. My colleagues upgraded to 1.8 and no longer able to run it.

I tested with SUN JDK and now I am on OpenJDK again and that does not help Current JDK openjdk version "1.8.0_40"

JAVA_HOME, JAVA_PATH and any other variable seems to point to the correct JDK installation. I have removed all the previous (JDK 1.6 & 1.7 from the OS to be sure that there is no reference to them).

For some reason GGTS still complains for a wrong JVM. I understand the error might be related to a compiler 1.7 trying to compile files in the 1.8, but I am not sure where this reference is comming from in eclipse.

My Eclipse installation information lists the following under Java:

-vm
/usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
eclipse.home.location=file:/home/arb/dev/applications/ggts-3.6.3.SR1/
eclipse.launcher=/home/arb/dev/applications/ggts-3.6.3.SR1/GGTS
eclipse.launcher.name=GGTS
eclipse.p2.data.area=@config.dir/../p2
eclipse.p2.profile=DefaultProfile
eclipse.product=org.springsource.ggts.ide
eclipse.startTime=1425566898624
eclipse.stateSaveDelayInterval=30000
eclipse.vm=/usr/lib64/jvm/jre-1.8.0-openjdk/bin/java
eclipse.vmargs=-Dgrails.console.enable.interactive=false
-Dgrails.console.enable.terminal=false
-Djline.terminal=jline.UnsupportedTerminal
-Dgrails.console.class=grails.build.logging.GrailsEclipseConsole
-Dosgi.requiredJavaVersion=1.6
-Xms60m
-Xmx1024m

解决方案

It's a problem related to jdk8u40, go back to jdku31. It works in that version. I'm running into the same problem both in windows and linux environments.

这篇关于GGTS(Eclipse)和JAVA 1.8中不兼容的JVM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆