Getting the following error trying to install a service with Java 14, moving back to Java 13 and installing works. The service will not start since the variable ${java_exe} is was not resolved during install process. Also tested on old machine Windows 2008, same problem.
YAJSW: yajsw-stable-12.14
OS : Windows 10/10.0/amd64
JVM : Azul Systems, Inc./14.0.1
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
at org.codehaus.groovy.reflection.GroovyClassValueFactory.<clinit>(GroovyClassValueFactory.java:35)
at org.codehaus.groovy.reflection.ClassInfo.<clinit>(ClassInfo.java:107)
at org.codehaus.groovy.reflection.ReflectionCache.getCachedClass(ReflectionCache.java:95)
at org.codehaus.groovy.reflection.ReflectionCache.<clinit>(ReflectionCache.java:39)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.registerMethods(MetaClassRegistryImpl.java:209)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:107)
at org.codehaus.groovy.runtime.metaclass.MetaClassRegistryImpl.<init>(MetaClassRegistryImpl.java:85)
at groovy.lang.GroovySystem.<clinit>(GroovySystem.java:36)
at org.codehaus.groovy.runtime.InvokerHelper.<clinit>(InvokerHelper.java:86)
at groovy.lang.GroovyObjectSupport.getDefaultMetaClass(GroovyObjectSupport.java:59)
at groovy.lang.GroovyObjectSupport.<init>(GroovyObjectSupport.java:32)
at groovy.lang.Binding.<init>(Binding.java:33)
at org.rzo.yajsw.config.groovy.ConfigurationBinding.<init>(ConfigurationBinding.java:17)
at org.rzo.yajsw.config.groovy.GInterpolator.<init>(GInterpolator.java:31)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Unknown Source)
at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.rzo.yajsw.config.YajswConfigurationImpl.createGInterpolatornew(YajswConfigurationImpl.java:422)
at org.rzo.yajsw.config.YajswConfigurationImpl.init(YajswConfigurationImpl.java:174)
at org.rzo.yajsw.config.YajswConfigurationImpl.<init>(YajswConfigurationImpl.java:139)
at org.rzo.yajsw.wrapper.WrappedService.init(WrappedService.java:100)
at org.rzo.yajsw.WrapperExe.getService(WrapperExe.java:98)
at org.rzo.yajsw.WrapperExe.doInstall(WrapperExe.java:366)
at org.rzo.yajsw.WrapperExe.executeCommand(WrapperExe.java:166)
at org.rzo.yajsw.WrapperExe.main(WrapperExe.java:124)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.rzo.yajsw.boot.WrapperExeBooter.main(WrapperExeBooter.java:49)</init></init></init></init></init></clinit></clinit></init></init></clinit></clinit></clinit></clinit>
hello,
thank you for pointing this out.
this seems to be an issue with groovy 2.5 and jvm 14.
to resolve this I will need to upgrade to groovy 3. but groovy 3 is available for jvm 8+.
this will mean that a new major release of yajsw is required which no longer supports jvm 7.
see:
https://github.com/gradle/gradle/issues/10248
if you do not need groovy support in your configuration and only need variable interpolation then you could just rename the folder lib/extentions/groovy. However when testing this I found a bug. I will provide a patch this weekend.
for a new major release i will need some more time. the intention of the major release will be to upgrade all dependencies so as to, hopefully, clealnly support jvm 11+.
-- Ron
Hi Ron,
Do you have a timeframe/ETA on the major release supporting jvm 11+ ? Thanks in advance!
Hi Ron, thanks for the quick responding.
Yes there seems to be a bug without groovy, variable interpolation doesn't work after renaming the groovy folder. Ending up with a ${java_exe} in the service execution path.
Looking forward for the patch.
hello,
here a patch for testing.
pls replace these 2 files in yajsw-12.14 and try first with runconsole.bat. it that works uninstall your service and reinstall it.
pls let me know if this works.
you will see an exception that groovy is not found, but your process should still startup correctly.
-- Ron
Last edit: rzo 2020-05-30
Hi Ron, the patch worked for java14.
Also renaming the lib\extended\groovy folder prevents the exception durring service installation.
Thanks a lot!
resolved release 13.00