Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.9.25 does not build with Java 17 #824

Closed
benalexau opened this issue Oct 18, 2021 · 6 comments
Closed

Release 2.9.25 does not build with Java 17 #824

benalexau opened this issue Oct 18, 2021 · 6 comments
Labels
bug Bugs & errors found in Reposilite

Comments

@benalexau
Copy link

What happened?

2.9.25 builds with Java 16, but rolling distributions such as Arch Linux automatically update to newer versions. The newer version is 17 and therefore Reposilite no longer builds.

cd /tmp
wget https://github.com/dzikoysk/reposilite/archive/refs/tags/2.9.25.tar.gz
tar -xf 2.9.25.tar.gz
cd reposilite-2.9.25/
java -version  # returns openjdk version "17" 2021-09-14
mvn

Fails with:

[INFO] --- gmavenplus-plugin:1.12.1:compileTests (default) @ reposilite ---
[INFO] Using isolated classloader, without GMavenPlus classpath.
[INFO] Using Groovy 3.0.8 to perform compileTests.
[INFO] Parallel parsing disabled.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for reposilite-parent 2.9.25:
[INFO] 
[INFO] reposilite-parent .................................. SUCCESS [  5.613 s]
[INFO] reposilite-backend ................................. FAILURE [  8.151 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.860 s
[INFO] Finished at: 2021-10-18T13:49:52+11:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.12.1:compileTests (default) on project reposilite: Error occurred while calling a method on a Groovy class from classpath.: InvocationTargetException: startup failed:
[ERROR] General error during instruction selection: PermittedSubclasses requires ASM9
[ERROR] 
[ERROR] java.lang.UnsupportedOperationException: PermittedSubclasses requires ASM9
[ERROR] 	at groovyjarjarasm.asm.ClassVisitor.visitPermittedSubclass(ClassVisitor.java:266)
[ERROR] 	at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:683)
[ERROR] 	at groovyjarjarasm.asm.ClassReader.accept(ClassReader.java:401)
[ERROR] 	at org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:81)
[ERROR] 	at org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:251)
[ERROR] 	at org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:189)
[ERROR] 	at org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:169)
[ERROR] 	at org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:125)
[ERROR] 	at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClassNullable(AsmReferenceResolver.java:57)
[ERROR] 	at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveClass(AsmReferenceResolver.java:44)
[ERROR] 	at org.codehaus.groovy.ast.decompiled.TypeSignatureParser.visitEnd(TypeSignatureParser.java:110)
[ERROR] 	at groovyjarjarasm.asm.signature.SignatureReader.parseType(SignatureReader.java:206)
[ERROR] 	at groovyjarjarasm.asm.signature.SignatureReader.parseType(SignatureReader.java:235)
[ERROR] 	at groovyjarjarasm.asm.signature.SignatureReader.accept(SignatureReader.java:114)
[ERROR] 	at org.codehaus.groovy.ast.decompiled.MemberSignatureParser.createMethodNode(MemberSignatureParser.java:97)
[ERROR] 	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lambda$createMethodNode$1(DecompiledClassNode.java:230)
[ERROR] 	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.createMethodNode(DecompiledClassNode.java:236)
[ERROR] 	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.lazyInitMembers(DecompiledClassNode.java:203)
[ERROR] 	at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.getDeclaredMethods(DecompiledClassNode.java:122)
[ERROR] 	at org.codehaus.groovy.ast.ClassNode.getGetterMethod(ClassNode.java:1123)
[ERROR] 	at org.codehaus.groovy.ast.ClassNode.getGetterMethod(ClassNode.java:1117)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticTypesCallSiteWriter.makeGetPropertyWithGetter(StaticTypesCallSiteWriter.java:444)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticTypesCallSiteWriter.makeGetPropertyWithGetter(StaticTypesCallSiteWriter.java:492)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticTypesCallSiteWriter.makeGetPropertyWithGetter(StaticTypesCallSiteWriter.java:499)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticTypesCallSiteWriter.makeGetPropertySite(StaticTypesCallSiteWriter.java:166)
[ERROR] 	at org.codehaus.groovy.classgen.AsmClassGenerator.visitAttributeOrProperty(AsmClassGenerator.java:986)
[ERROR] 	at org.codehaus.groovy.classgen.AsmClassGenerator.visitPropertyExpression(AsmClassGenerator.java:1134)
[ERROR] 	at org.codehaus.groovy.ast.expr.PropertyExpression.visit(PropertyExpression.java:63)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticInvocationWriter.visitArgument(StaticInvocationWriter.java:514)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticInvocationWriter.loadArguments(StaticInvocationWriter.java:461)
[ERROR] 	at org.codehaus.groovy.classgen.asm.InvocationWriter.writeDirectMethodCall(InvocationWriter.java:208)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticInvocationWriter.writeDirectMethodCall(StaticInvocationWriter.java:387)
[ERROR] 	at org.codehaus.groovy.classgen.asm.InvocationWriter.makeDirectCall(InvocationWriter.java:299)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticInvocationWriter.makeDirectCall(StaticInvocationWriter.java:133)
[ERROR] 	at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:381)
[ERROR] 	at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:121)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticInvocationWriter.makeCall(StaticInvocationWriter.java:649)
[ERROR] 	at org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:456)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticInvocationWriter.writeInvokeMethod(StaticInvocationWriter.java:140)
[ERROR] 	at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:844)
[ERROR] 	at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:76)
[ERROR] 	at org.codehaus.groovy.classgen.asm.StatementWriter.writeReturn(StatementWriter.java:613)
[ERROR] 	at org.codehaus.groovy.classgen.AsmClassGenerator.visitReturnStatement(AsmClassGenerator.java:681)
[ERROR] 	at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:73)
[ERROR] 	at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:94)
[ERROR] 	at org.codehaus.groovy.classgen.asm.sc.StaticTypesStatementWriter.writeBlockStatement(StaticTypesStatementWriter.java:78)
[ERROR] 	at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:617)
[ERROR] 	at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
[ERROR] 	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:138)
[ERROR] 	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:111)
[ERROR] 	at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:461)
[ERROR] 	at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:408)
[ERROR] 	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:106)
[ERROR] 	at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:556)
[ERROR] 	at org.codehaus.groovy.ast.ClassNode.visitMethods(ClassNode.java:1099)
[ERROR] 	at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1092)
[ERROR] 	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:52)
[ERROR] 	at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:271)
[ERROR] 	at org.codehaus.groovy.control.CompilationUnit$3.call(CompilationUnit.java:797)
[ERROR] 	at org.codehaus.groovy.control.CompilationUnit$IPrimaryClassNodeOperation.doPhaseOperation(CompilationUnit.java:942)
[ERROR] 	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:671)
[ERROR] 	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:635)
[ERROR] 	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:610)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR] 	at org.codehaus.gmavenplus.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:214)
[ERROR] 	at org.codehaus.gmavenplus.mojo.AbstractCompileMojo.doCompile(AbstractCompileMojo.java:314)
[ERROR] 	at org.codehaus.gmavenplus.mojo.CompileTestsMojo.execute(CompileTestsMojo.java:77)
[ERROR] 	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
[ERROR] 	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
[ERROR] 	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
[ERROR] 	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
[ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
[ERROR] 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
[ERROR] 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
[ERROR] 	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:972)
[ERROR] 	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
[ERROR] 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
[ERROR] 	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
[ERROR] 
[ERROR] 1 error

Appears corrected in Groovy 3.0.9 as per https://issues.apache.org/jira/browse/GROOVY-10194.

Reposilite version

2.x

Relevant log output

No response

@benalexau benalexau added the bug Bugs & errors found in Reposilite label Oct 18, 2021
@dzikoysk
Copy link
Owner

Thanks, I don't quite invest much time in 2.x as I'm mostly focused on 3.x, so I didn't test it on JDK17 yet. I've bumped Groovy and I hope it's all we need for now :)

@benalexau
Copy link
Author

Thanks @dzikoysk, the 2.x branch now builds OK on Java 17:

git clone https://github.com/dzikoysk/reposilite.git
cd reposilite
git checkout 2.x
mvn

Would it be possible to please release a 2.9.26 so it can be referenced from https://aur.archlinux.org/packages/reposilite/?

dzikoysk added a commit that referenced this issue Oct 19, 2021
dzikoysk added a commit that referenced this issue Oct 19, 2021
@dzikoysk
Copy link
Owner

@benalexau
Copy link
Author

Thanks @dzikoysk. I confirm the 2.9.26 tag also builds successfully. Your fast responses to these tickets are much appreciated, especially given this is an older branch as well.

@MouettE-SC
Copy link
Contributor

AUR arch package updated to 2.9.26. Thanks !

@dzikoysk
Copy link
Owner

Thanks for maintaining Reposilite package in AUR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs & errors found in Reposilite
Projects
None yet
Development

No branches or pull requests

3 participants