我需要让grails努力从netflix编译asgard,但我似乎遇到了一个我尚未找到解决方案的问题。
$ $GRAILS_HOME/bin/grails help
| Error java.lang.reflect.InvocationTargetException
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| Error at java.lang.reflect.Method.invoke(Method.java:597)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:234)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262)
| Error Caused by: java.lang.IllegalAccessError: class sun.reflect.GeneratedMethodAccessor1 cannot access its superclass sun.reflect.MethodAccessorImpl
| Error at sun.misc.Unsafe.defineClass(Native Method)
| Error at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
| Error at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
| Error at java.security.AccessController.doPrivileged(Native Method)
| Error at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
| Error at sun.reflect.MethodAccessorGenerator.generateMethod(MethodAccessorGenerator.java:59)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:28)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| Error at java.lang.reflect.Method.invoke(Method.java:597)
| Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrap.invoke(PogoMetaMethodSite.java:252)
| Error at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
| Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
| Error at grails.util.BuildSettings.establishProjectStructure(BuildSettings.groovy:1452)
| Error at grails.util.BuildSettings.setBaseDir(BuildSettings.groovy:835)
| Error at grails.util.BuildSettings$setBaseDir.callCurrent(Unknown Source)
| Error at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:46)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
| Error at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
| Error at grails.util.BuildSettings.<init>(BuildSettings.groovy:774)
| Error at grails.util.BuildSettings.<init>(BuildSettings.groovy:749)
| Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRunner.java:164)
| Error ... 6 more
$ java -version
java version "1.6.0_37"
Java(TM) SE Runtime Environment (build 1.6.0_37-b06-434-11M3909)
Java HotSpot(TM) 64-Bit Server VM (build 20.12-b01-434, mixed mode)
2.1.1的zip文件来自grails网站,我还没有发现任何遗漏。所有grails命令都是这样做的。
我错过了什么吗?
答案 0 :(得分:0)
您是否关注asgard reccomandation ??
Run Sun/Oracle Java 6 on Linux or Mac
Avoid Java 7
Avoid OpenJDK
Avoid Windows
Yes, Asgard runs on Grails, and Grails runs on Java, and Java is supposed to be "run
anywhere", except for the fact that Asgard users have reported incompatibility problems with
Java 7, OpenJDK, and Windows. A future version of Asgard will be Java 7 compatible, and
perhaps it will work with OpenJDK eventually. The Windows issue is less likely to get
debugged by Netflix engineers, but if you figure it out feel free to send a pull request.