Projects tigase _server server-core Issues #1378
Exception in phase 'semantic analysis' in source unit 'Script1.groovy' (#1378)
Unknown opened 5 years ago

Windows Server 2019 (x64) OpenJDK v13 Tigase Server 8.0.0

Trying to start up Tigase Server for the first time and I get this error spit out in command prompt preventing it from starting at all... I ran the setup.bat from win-stuff, installed it as a service (doesn't start properly from there either) and followed all the other directions as closely as possible. Not sure what I'm missing.

2020-01-27 19:55:59.615 [main]             BasicComponent.reloadScripts()          CONFIG:   Reloading admin scripts for component: message-router.
2020-01-27 19:55:59.631 [main]             BasicComponent.loadScripts()            CONFIG:   Loading admin scripts for component: message-router.
2020-01-27 19:55:59.631 [main]             BasicComponent.loadScripts()            CONFIG:   message-router: Loading scripts from directory: scripts/admin
2020-01-27 19:56:00.318 [main]             ThreadExceptionHandler.uncaughtException()  SEVERE: Uncaught thread: "main" exception
BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' Unsupported class file major version 57
	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:969)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:647)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:596)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:390)
	at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:89)
	at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:330)
	at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:327)
	at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:325)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:309)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:251)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:331)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.compile(GroovyScriptEngineImpl.java:181)
	at tigase.server.script.Script.init(Script.java:82)
	at tigase.server.script.AddScriptCommand.addAdminScript(AddScriptCommand.java:49)
	at tigase.server.BasicComponent.loadScripts(BasicComponent.java:1021)
	at tigase.server.BasicComponent.reloadScripts(BasicComponent.java:891)
	at tigase.server.BasicComponent.setScriptsBaseDir(BasicComponent.java:743)
	at tigase.server.BasicComponent.initialize(BasicComponent.java:843)
	at tigase.server.MessageRouter.initialize(MessageRouter.java:247)
	at tigase.kernel.core.Kernel.initBean(Kernel.java:136)
	at tigase.kernel.core.Kernel.getInstance(Kernel.java:303)
	at tigase.server.Bootstrap.start(Bootstrap.java:326)
	at tigase.server.XMPPServer.start(XMPPServer.java:188)
	at tigase.server.XMPPServer.main(XMPPServer.java:142)
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 57
	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:184)
	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:166)
	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:152)
	at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:273)
	at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
	at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
	at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
	at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)
	at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125)
	at org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:855)
	at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:466)
	at org.codehaus.groovy.control.ResolveVisitor.resolveFromDefaultImports(ResolveVisitor.java:631)
	at org.codehaus.groovy.control.ResolveVisitor.resolveFromDefaultImports(ResolveVisitor.java:611)
	at org.codehaus.groovy.control.ResolveVisitor.resolveFromDefaultImports(ResolveVisitor.java:585)
	at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:464)
	at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:427)
	at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:342)
	at org.codehaus.groovy.control.ResolveVisitor.resolveOrFail(ResolveVisitor.java:423)
	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:889)
	at org.codehaus.groovy.control.ResolveVisitor.transformDeclarationExpression(ResolveVisitor.java:1292)
	at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:877)
	at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:142)
	at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
	at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86)
	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:106)
	at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1554)
	at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:110)
	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:121)
	at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:53)
	at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:256)
	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:132)
	at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1103)
	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:54)
	at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1466)
	at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:229)
	at org.codehaus.groovy.control.CompilationUnit$13.call(CompilationUnit.java:705)
	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:965)
	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:647)
	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:596)
	at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:390)
	at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:89)
	at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:330)
	at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:327)
	at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:325)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:309)
	at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:251)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.getScriptClass(GroovyScriptEngineImpl.java:331)
	at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.compile(GroovyScriptEngineImpl.java:181)
	at tigase.server.script.Script.init(Script.java:82)
	at tigase.server.script.AddScriptCommand.addAdminScript(AddScriptCommand.java:49)
	at tigase.server.BasicComponent.loadScripts(BasicComponent.java:1021)
	at tigase.server.BasicComponent.reloadScripts(BasicComponent.java:891)
	at tigase.server.BasicComponent.setScriptsBaseDir(BasicComponent.java:743)
	at tigase.server.BasicComponent.initialize(BasicComponent.java:843)
	at tigase.server.MessageRouter.initialize(MessageRouter.java:247)
	at tigase.kernel.core.Kernel.initBean(Kernel.java:136)
	at tigase.kernel.core.Kernel.getInstance(Kernel.java:303)
	at tigase.server.Bootstrap.start(Bootstrap.java:326)
	at tigase.server.XMPPServer.start(XMPPServer.java:188)
	at tigase.server.XMPPServer.main(XMPPServer.java:142)

Unknown commented 5 years ago

This error means that Groovy embedded within the Tigase XMPP Server used for scripting does not support JDK 13 and cannot compile Groovy scripts.

Unknown commented 5 years ago

@hantu85 the documentation just says:

Java Development Kit v8 or later - We recommend OpenJDK

Is there a preferred or max supported JDK version I should switch to?

Unknown commented 5 years ago

To answer my own question, it looks like JDK 11 is the latest that works. JDK 12 and 13 both produce this error. Thanks for the tip.

issue 1 of 1
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#1378
Please wait...
Page is in error, reload to recover