Closed heguangyong closed 1 year ago
fustic@Karma moqui % ./gradlew -version
Build time: 2022-03-09 15:04:47 UTC Revision: 36dc52588e09b4b72f2010bc07599e0ee0434e2e
Kotlin: 1.5.31 Groovy: 3.0.9 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 11.0.12 (Eclipse Foundation 11.0.12+7) OS: Mac OS X 11.5 x86_64
all jdk versions in my macos list below: fustic@Karma moqui % /usr/libexec/java_home -V Matching Java Virtual Machines (6): 11.0.12 (x86_64) "Eclipse Temurin" - "Eclipse Temurin 11" /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home 1.8.341.10 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home 1.8.0_312 (x86_64) "Eclipse Temurin" - "Eclipse Temurin 8" /Library/Java/JavaVirtualMachines/temurin-8.jdk/Contents/Home 1.8.0_77 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_77.jdk/Contents/Home 1.7.0_80 (x86_64) "Oracle Corporation" - "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home 1.7.0_79 (x86_64) "Oracle Corporation" - "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home /Library/Java/JavaVirtualMachines/temurin-11.jdk/Contents/Home
the idea gradle build env is different from the terminal env. when run the docker file script,we should set GRADLE_USER_HOME to make sure the gradle version with the jdk class build version is the right match . here is a reference for description this tip. https://blog.csdn.net/wusj3/article/details/110791719
Interesting, thanks for sharing.
macos sys under docker folder; run the moqui-run.sh script, always throw the following exceptions. I have set the gradle compile version as jdk11. I am not sure where is the jdk17 version?
16:23:04.535 ERROR main .moqui.i.c.ExecutionContextFactoryImpl Error loading ToolFactory with class org.moqui.fop.FopToolFactory java.lang.UnsupportedClassVersionError: org/moqui/fop/FopToolFactory has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?] at MoquiStart$StartClassLoader.findJarClass(MoquiStart.java:826) ~[moqui/:?] at MoquiStart$StartClassLoader.loadClass(MoquiStart.java:787) ~[moqui/:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?] at org.moqui.util.MClassLoader.loadClassInternal(MClassLoader.java:404) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.util.MClassLoader.loadClass(MClassLoader.java:381) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.util.MClassLoader.loadClass(MClassLoader.java:370) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.impl.context.ExecutionContextFactoryImpl.preFacadeInit(ExecutionContextFactoryImpl.groovy:579) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.impl.context.ExecutionContextFactoryImpl.(ExecutionContextFactoryImpl.groovy:218) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?]
at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[?:?]
at org.moqui.Moqui.dynamicInit(Moqui.java:62) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1]
at org.moqui.impl.webapp.MoquiContextListener.contextInitialized(MoquiContextListener.groovy:68) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1]
at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1048) ~[jetty-server-10.0.12.jar:10.0.12]
at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[jetty-servlet-10.0.12.jar:10.0.12]
at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:983) ~[jetty-server-10.0.12.jar:10.0.12]
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[jetty-servlet-10.0.12.jar:10.0.12]
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[jetty-servlet-10.0.12.jar:10.0.12]
at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[jetty-webapp-10.0.12.jar:10.0.12]
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:900) ~[jetty-server-10.0.12.jar:10.0.12]
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[jetty-servlet-10.0.12.jar:10.0.12]
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[jetty-webapp-10.0.12.jar:10.0.12]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.12.jar:10.0.12]
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[jetty-util-10.0.12.jar:10.0.12]
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-10.0.12.jar:10.0.12]
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[jetty-server-10.0.12.jar:10.0.12]
at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[jetty-server-10.0.12.jar:10.0.12]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.12.jar:10.0.12]
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[jetty-util-10.0.12.jar:10.0.12]
at org.eclipse.jetty.server.Server.start(Server.java:470) ~[jetty-server-10.0.12.jar:10.0.12]
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-10.0.12.jar:10.0.12]
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[jetty-server-10.0.12.jar:10.0.12]
at org.eclipse.jetty.server.Server.doStart(Server.java:415) ~[jetty-server-10.0.12.jar:10.0.12]
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.12.jar:10.0.12]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at MoquiStart.main(MoquiStart.java:307) ~[moqui/:?]
16:23:04.714 INFO main .moqui.i.c.ExecutionContextFactoryImpl Cache Facade initialized
....
16:24:43.974 ERROR main o.moqui.i.w.MoquiContextListener Error initializing webapp context: java.lang.UnsupportedClassVersionError: org/moqui/fop/HtmlRenderServlet has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 java.lang.UnsupportedClassVersionError: org/moqui/fop/HtmlRenderServlet has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?] at MoquiStart$StartClassLoader.findJarClass(MoquiStart.java:826) ~[moqui/:?] at MoquiStart$StartClassLoader.loadClass(MoquiStart.java:787) ~[moqui/:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?] at org.moqui.util.MClassLoader.loadClassInternal(MClassLoader.java:404) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.util.MClassLoader.loadClass(MClassLoader.java:381) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.util.MClassLoader.loadClass(MClassLoader.java:370) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.impl.webapp.MoquiContextListener.contextInitialized(MoquiContextListener.groovy:129) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1048) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[jetty-servlet-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:983) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[jetty-servlet-10.0.12.jar:10.0.12] at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[jetty-servlet-10.0.12.jar:10.0.12] at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[jetty-webapp-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:900) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[jetty-servlet-10.0.12.jar:10.0.12] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[jetty-webapp-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.Server.start(Server.java:470) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.Server.doStart(Server.java:415) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.12.jar:10.0.12] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at MoquiStart.main(MoquiStart.java:307) ~[moqui/:?] 16:24:43.981 WARN main o.eclipse.j.w.WebAppContext Failed startup of context o.e.j.w.WebAppContext@62923ee6{Moqui Root Webapp,/,file:///opt/moqui/,UNAVAILABLE} java.lang.UnsupportedClassVersionError: org/moqui/fop/HtmlRenderServlet has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0 at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?] at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?] at MoquiStart$StartClassLoader.findJarClass(MoquiStart.java:826) ~[moqui/:?] at MoquiStart$StartClassLoader.loadClass(MoquiStart.java:787) ~[moqui/:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?] at org.moqui.util.MClassLoader.loadClassInternal(MClassLoader.java:404) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.util.MClassLoader.loadClass(MClassLoader.java:381) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.util.MClassLoader.loadClass(MClassLoader.java:370) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.moqui.impl.webapp.MoquiContextListener.contextInitialized(MoquiContextListener.groovy:129) ~[moqui-framework-3.1.0-rc1.jar:3.1.0-rc1] at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1048) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624) ~[jetty-servlet-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:983) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740) ~[jetty-servlet-10.0.12.jar:10.0.12] at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392) ~[jetty-servlet-10.0.12.jar:10.0.12] at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304) ~[jetty-webapp-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:900) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306) ~[jetty-servlet-10.0.12.jar:10.0.12] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532) ~[jetty-webapp-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.gzip.GzipHandler.doStart(GzipHandler.java:221) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.Server.start(Server.java:470) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) ~[jetty-util-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.server.Server.doStart(Server.java:415) ~[jetty-server-10.0.12.jar:10.0.12] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93) ~[jetty-util-10.0.12.jar:10.0.12] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?] at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?] at MoquiStart.main(MoquiStart.java:307) ~[moqui/:?] 16:24:44.050 INFO main o.eclipse.j.s.AbstractConnector Started ServerConnector@38234a38{HTTP/1.1, (http/1.1)}{0.0.0.0:80} 16:24:44.080 INFO main o.eclipse.j.s.Server Started Server@732f29af{STARTING}[10.0.12,sto=30000] @115132ms