Incompatible JVM in GGTS (Eclipse) and JAVA 1.8

前端 未结 10 2320
说谎
说谎 2020-11-27 18:48

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          


        
相关标签:
10条回答
  • 2020-11-27 19:24

    Version 1.8.0_40 and 1.8.0_45 has breaking updates with grails. Spring can not copy non-Root methods.

    Since the initial posting a workaround has been developed.

    aclement commented on Mar 5 Here is the build: http://repo.spring.io/libs-snapshot-local/org/springframework/springloaded/1.2.2.BUILD-SNAPSHOT/springloaded-1.2.2.BUILD-SNAPSHOT.jar

    To test it under grails, what I do is go into the grails folder: grails-2.5.0/lib/org.springframework/springloaded/jars

    I then rename the spring loaded jar that is there and put in a symlink to the jar above. It used to be that you could just modify the startGrails script to point to the new version, but now due to the forking I find you need to do the symlink thing. Or drop that jar into this folder and rename it to match the expectations of grails (rename it from springloaded-1.2.2.BUILD-SNAPSHOT.jar to springloaded-1.2.0.RELEASE.jar)

    If you want to rollback instead

    Grails is natively supported in 1.8.0_25, 1.8.0_31

    http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html#jdk-8u25-oth-JPR

    Once you have a compatible java version clean your grails project. Ensure that your java path variables are set to point to your expected version.

    set JAVA_HOME=C:\java\jdk1.8.0_25
    set PATH=%JAVA_HOME%\bin;%PATH%;
    
    0 讨论(0)
  • 2020-11-27 19:28

    I thought I should add my two pence worth on this topic. Recently I hit the same issue trying to upgrade an ancient app to 2.4.4. The reason for my post is because all of the above instructions are a little out of date and whilst in most cases it may appear to work. The moment you introduce mysql drivers all of the above mentioned versions of spring loaded hit a new issue around incompatibility and Non-root when attempting to trigger the database.

    I got ggts fully working with JDK 1.8_065. To make it work get hold of springloaded-1.2.5.RELEASE.jar Put this into grails-2.4.4/lib/org.springframework/springloaded/jars/ folder. When you install ggts inside the ggts-bundle folder is grails-2.4.4. So put the file in the above location within the ggts-bundle folder. Unless you have changed configuration.
    Re-launch GGTS I spent ages on it and thought I should update the instructions.

    Also the other thing that I hit issues around was forking under grails 2.4.4 with my uprade and ended up setting

    grails.project.fork = []
    

    In my BuildConfig.groovy

    0 讨论(0)
  • 2020-11-27 19:35

    Changing the springloaded version in my pom.xml did the trick.

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>springloaded</artifactId>
        <version>1.2.6.RELEASE</version>
    </dependency>
    

    When I was experiencing the issue my springloaded version was 1.2.1.RELEASE

    0 讨论(0)
  • 2020-11-27 19:36

    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.

    0 讨论(0)
提交回复
热议问题