itplr-kosit / validator

Validates XML documents with XML Schema and Schematron
Apache License 2.0
80 stars 42 forks source link

Can't build tag `v1.4.0` #60

Closed christian-schlichtherle closed 4 years ago

christian-schlichtherle commented 4 years ago

When running mvn verify with OpenJDK 8, it eventually fails when running the jacoco-maven-plugin:

[...]
[INFO] --- build-helper-maven-plugin:3.1.0:reserve-network-port (reserve-network-port) @ validationtool ---
[INFO] Reserved port 58994 for validator.server.port
[INFO] Reserved port 58995 for jacoco.tcp.port
[...]
[INFO] --- jacoco-maven-plugin:0.8.5:dump (dump) @ validationtool ---
[INFO] Connecting to localhost/127.0.0.1:58995
[INFO] Connection refused (Connection refused)
[...]
christian-schlichtherle commented 4 years ago

Here are some more traces:

[...]
[INFO] --- maven-antrun-plugin:1.8:run (sleep-for-a-while) @ validationtool ---
[INFO] Executing tasks

main:
java.lang.instrument.IllegalClassFormatException: Error while instrumenting sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.
    at org.jacoco.agent.rt.internal_43f5073.CoverageTransformer.transform(CoverageTransformer.java:94)
    at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246)
    at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
    at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563)
    at java.base/java.lang.ClassLoader.defineClass2(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1108)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:183)
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:784)
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:705)
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:586)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:634)
    at java.base/java.lang.Class.forName(Class.java:546)
    at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:854)
    at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1078)
    at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1301)
    at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1386)
    at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:89)
    at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:86)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
    at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.<init>(CLDRLocaleProviderAdapter.java:86)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:188)
    at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:287)
    at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:258)
    at java.base/java.util.Calendar.createCalendar(Calendar.java:1693)
    at java.base/java.util.Calendar.getInstance(Calendar.java:1661)
    at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:677)
    at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:621)
    at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:600)
    at org.slf4j.impl.SimpleLoggerConfiguration.init(SimpleLoggerConfiguration.java:91)
    at org.slf4j.impl.SimpleLogger.init(SimpleLogger.java:174)
    at org.slf4j.impl.SimpleLogger.lazyInit(SimpleLogger.java:167)
    at org.slf4j.impl.SimpleLoggerFactory.<init>(SimpleLoggerFactory.java:45)
    at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:71)
    at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:44)
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at de.kosit.validationtool.cmd.Validator.<clinit>(Validator.java:80)
    at de.kosit.validationtool.cmd.CommandLineApplication.mainProgram(CommandLineApplication.java:90)
    at de.kosit.validationtool.cmd.CommandLineApplication.main(CommandLineApplication.java:58)
Caused by: java.io.IOException: Error while instrumenting sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.
    at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrumentError(Instrumenter.java:159)
    at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:109)
    at org.jacoco.agent.rt.internal_43f5073.CoverageTransformer.transform(CoverageTransformer.java:92)
    ... 46 more
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 59
    at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.<init>(ClassReader.java:195)
    at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.<init>(ClassReader.java:176)
    at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.<init>(ClassReader.java:162)
    at org.jacoco.agent.rt.internal_43f5073.core.internal.instr.InstrSupport.classReaderFor(InstrSupport.java:280)
    at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:75)
    at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:107)
    ... 47 more
Exception in thread "main" java.util.ServiceConfigurationError: Locale provider adapter "CLDR"cannot be instantiated.
    at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:199)
    at java.base/sun.util.locale.provider.LocaleProviderAdapter.findAdapter(LocaleProviderAdapter.java:287)
    at java.base/sun.util.locale.provider.LocaleProviderAdapter.getAdapter(LocaleProviderAdapter.java:258)
    at java.base/java.util.Calendar.createCalendar(Calendar.java:1693)
    at java.base/java.util.Calendar.getInstance(Calendar.java:1661)
    at java.base/java.text.SimpleDateFormat.initializeCalendar(SimpleDateFormat.java:677)
    at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:621)
    at java.base/java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:600)
    at org.slf4j.impl.SimpleLoggerConfiguration.init(SimpleLoggerConfiguration.java:91)
    at org.slf4j.impl.SimpleLogger.init(SimpleLogger.java:174)
    at org.slf4j.impl.SimpleLogger.lazyInit(SimpleLogger.java:167)
    at org.slf4j.impl.SimpleLoggerFactory.<init>(SimpleLoggerFactory.java:45)
    at org.slf4j.impl.StaticLoggerBinder.<init>(StaticLoggerBinder.java:71)
    at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:44)
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at de.kosit.validationtool.cmd.Validator.<clinit>(Validator.java:80)
    at de.kosit.validationtool.cmd.CommandLineApplication.mainProgram(CommandLineApplication.java:90)
    at de.kosit.validationtool.cmd.CommandLineApplication.main(CommandLineApplication.java:58)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:64)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    at java.base/sun.util.locale.provider.LocaleProviderAdapter.forType(LocaleProviderAdapter.java:188)
    ... 21 more
Caused by: java.util.ServiceConfigurationError: sun.util.locale.provider.LocaleDataMetaInfo: Unable to load sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo
    at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:584)
    at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:856)
    at java.base/java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext(ServiceLoader.java:1078)
    at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1301)
    at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1386)
    at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:89)
    at java.base/sun.util.cldr.CLDRLocaleProviderAdapter$1.run(CLDRLocaleProviderAdapter.java:86)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:554)
    at java.base/sun.util.cldr.CLDRLocaleProviderAdapter.<init>(CLDRLocaleProviderAdapter.java:86)
    ... 27 more
Caused by: java.lang.LinkageError: loader 'platform' attempted duplicate class definition for sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo. (sun.util.resources.cldr.provider.CLDRLocaleDataMetaInfo is in module jdk.localedata of loader 'platform')
    at java.base/java.lang.ClassLoader.defineClass2(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1108)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:183)
    at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:784)
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClassInModuleOrNull(BuiltinClassLoader.java:705)
    at java.base/jdk.internal.loader.BuiltinClassLoader.findClass(BuiltinClassLoader.java:586)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:634)
    at java.base/java.lang.Class.forName(Class.java:546)
    at java.base/java.util.ServiceLoader.loadProvider(ServiceLoader.java:854)
    ... 34 more
[ERROR] Async process failed for: [java, -javaagent:/Users/christian/.m2/repository/org/jacoco/org.jacoco.agent/0.8.5/org.jacoco.agent-0.8.5-runtime.jar=destfile=/Users/christian/sandbox/validator/target/jacoco.exec,excludes=**/validationtool/model/**:**/validationtool/cmd/assertions/**,output=tcpserver,address=localhost,port=58995, -classpath, /Users/christian/sandbox/validator/target/classes:/Users/christian/.m2/repository/net/sf/saxon/Saxon-HE/9.9.1-7/Saxon-HE-9.9.1-7.jar:/Users/christian/.m2/repository/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar:/Users/christian/.m2/repository/commons-cli/commons-cli/1.4/commons-cli-1.4.jar:/Users/christian/.m2/repository/org/fusesource/jansi/jansi/1.18/jansi-1.18.jar:/Users/christian/.m2/repository/org/slf4j/slf4j-simple/1.7.25/slf4j-simple-1.7.25.jar:/Users/christian/.m2/repository/org/apache/commons/commons-lang3/3.10/commons-lang3-3.10.jar:/Users/christian/.m2/repository/org/glassfish/jaxb/jaxb-runtime/2.3.3/jaxb-runtime-2.3.3.jar:/Users/christian/.m2/repository/jakarta/xml/bind/jakarta.xml.bind-api/2.3.3/jakarta.xml.bind-api-2.3.3.jar:/Users/christian/.m2/repository/org/glassfish/jaxb/txw2/2.3.3/txw2-2.3.3.jar:/Users/christian/.m2/repository/com/sun/istack/istack-commons-runtime/3.0.11/istack-commons-runtime-3.0.11.jar:/Users/christian/.m2/repository/com/sun/activation/jakarta.activation/1.2.2/jakarta.activation-1.2.2.jar:/Users/christian/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar, de.kosit.validationtool.cmd.CommandLineApplication, -s, /Users/christian/sandbox/validator/target/test-classes/examples/simple/scenarios.xml, -r, /Users/christian/sandbox/validator/target/test-classes/examples/simple/repository, --port, 58994, -D]
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.access$200 (DefaultExecutor.java:48)
    at org.apache.commons.exec.DefaultExecutor$1.run (DefaultExecutor.java:200)
    at java.lang.Thread.run (Thread.java:748)
     [echo] 58995
[INFO] Executed tasks
[...]
christian-schlichtherle commented 4 years ago

I figured I need to set the environment variable JAVA_HOME. Then it builds fine with OpenJDK 1.8. Sorry, my fault.