【问题标题】:User-mapped section open error in GrailsGrails 中的用户映射部分打开错误
【发布时间】:2017-10-24 10:51:51
【问题描述】:

我正在尝试在 Windows 10 上使用 IDEA 2017.1.4 为 Grails 应用程序构建 WAR 文件。 我收到以下错误:

|Compiling 17 GSP files for package [AECommand]
.Error 
|WAR packaging error: G:\Dropbox\thePlatform\AETN\aetn-dd-custom-commands\target\classes\gsp\views.properties (The requested operation cannot be performed on a file with a user-mapped section open)
Process finished with exit code 1

应用程序在 IDEA 中运行良好,并在 PowerShell 中给我同样的错误。它在我的 MacPro 上使用终端“grails war”命令运行并构建良好,目前我无法使用该命令。

MacPro 和 Windows IDEA 项目使用 JDK7。

当我尝试使用 JDK8 在 PowerShell 中运行该应用程序时,我收到以下错误,其中包含“不兼容的 JVM?”里面的信息:

Oct 24, 2017 6:45:17 AM org.springsource.loaded.jvm.JVM copyMethod
SEVERE: Problems copying method. Incompatible JVM?
java.lang.reflect.InvocationTargetException
        at sun.reflect.GeneratedMethodAccessor58.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 org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
        at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
        at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
        at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
        at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:343)
        at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:293)
        at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:3048)
        at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:483)
        at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:176)

【问题讨论】:

    标签: java grails java-8 openjdk


    【解决方案1】:

    有趣的是,将 JAVA_HOME 设置为 JDK7 并使用 PowerShell 解决了问题 - JAR 已构建。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-31
      • 2016-05-15
      • 2010-11-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-07
      相关资源
      最近更新 更多