lindenb / jvarkit

Java utilities for Bioinformatics
https://jvarkit.readthedocs.io/
Other
476 stars 131 forks source link

Build error: failed to create jvarkit.jar object #238

Closed Gilquin closed 1 year ago

Gilquin commented 1 year ago

Subject of the issue

Error encountered during compilation when running:

./gradlew jvarkit

Your environment

Steps to reproduce

Follow the documentation steps.

Expected behaviour

The jvarkit.jar should be created without errors.

Actual behaviour

Build fails with error:

[ant:javac] ./jvarkit/src/main/java/com/github/lindenb/jvarkit/tools/tbi2bed/VcfTbiToBed.java:216:
error: package com.github.lindenb.jvarkit.tools.vcfregulomedb does not exist

See corresponding scan for complete report and log.

lindenb commented 1 year ago

@Gilquin hi laurent.

It works on my machine using the branch 'dev' and a fresh install:

git clone -b dev "https://github.com/lindenb/jvarkit.git"

could you please try with this branch ?

Gilquin commented 1 year ago

Hello,

Unfortunately, I get two new errors this time:

[ant:javac] /home/lgilquin/softwares/jvarkit/src/main/java/com/github/lindenb/jvarkit/variant/VcfSpringBeanVariantAnnotator.java:35: error: cannot access ApplicationContext
[ant:javac] import org.springframework.context.ApplicationContext;
[ant:javac]                                   ^
[ant:javac]   bad class file: /home/lgilquin/softwares/jvarkit/lib/org/springframework/spring-context/6.0.9/spring-context-6.0.9.jar(/org/springframework/context/ApplicationContext.class)
[ant:javac]     class file has wrong version 61.0, should be 55.0
[ant:javac]     Please remove or make sure it appears in the correct subdirectory of the classpath.
[ant:javac] /home/lgilquin/softwares/jvarkit/src/main/java/com/github/lindenb/jvarkit/variant/VcfSpringBeanVariantAnnotator.java:36: error: cannot access FileSystemXmlApplicationContext
[ant:javac] import org.springframework.context.support.FileSystemXmlApplicationContext;
[ant:javac]                                           ^
[ant:javac]   bad class file: /home/lgilquin/softwares/jvarkit/lib/org/springframework/spring-context/6.0.9/spring-context-6.0.9.jar(/org/springframework/context/support/FileSystemXmlApplicationContext.class)
[ant:javac]     class file has wrong version 61.0, should be 55.0
[ant:javac]     Please remove or make sure it appears in the correct subdirectory of the classpath.

Here is the new scan

EDIT: Doesn't Spring Framework 6 requires Java 17 or higher ?

lindenb commented 1 year ago

yes please, try with java 17:

https://stackoverflow.com/questions/74648576/spring-class-file-has-wrong-version-61-0-should-be-55-0

lindenb commented 1 year ago

BTW a pre-compiled jar is available at https://uncloud.univ-nantes.fr/index.php/s/4sL77oWR2BFzSBH .

Gilquin commented 1 year ago

BTW a pre-compiled jar is available at https://uncloud.univ-nantes.fr/index.php/s/4sL77oWR2BFzSBH .

Yes, I saw that option, thanks!

yes please, try with java 17:

https://stackoverflow.com/questions/74648576/spring-class-file-has-wrong-version-61-0-should-be-55-0

I will try with java 17 later on. I will close the issue.