johnzon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jin Kwon (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (JOHNZON-214) Align dependency versions
Date Sat, 15 Jun 2019 13:35:00 GMT

     [ https://issues.apache.org/jira/browse/JOHNZON-214?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jin Kwon updated JOHNZON-214:
-----------------------------
    Description: 
With following dependency and its transitive dependencies.

{code}
[INFO] +- org.apache.johnzon:johnzon-jsonb:jar:1.1.12:test
[INFO] |  \- org.apache.johnzon:johnzon-mapper:jar:1.1.11:test
[INFO] |     \- org.apache.johnzon:johnzon-core:jar:1.1.11:test
{code}

A simple test fails.

{{log.debug("Jsonb: {}", JsonbBuilder.create());}}

{code}
java.lang.NoClassDefFoundError: org/apache/johnzon/core/Types

	at org.apache.johnzon.jsonb.JsonbAccessMode.<init>(JsonbAccessMode.java:138)
	at org.apache.johnzon.jsonb.JohnzonBuilder.lambda$build$10(JohnzonBuilder.java:206)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at org.apache.johnzon.jsonb.JohnzonBuilder.build(JohnzonBuilder.java:196)
	at javax.json.bind.JsonbBuilder.create(JsonbBuilder.java:85)
	at com.github.jinahya.jsonrpc.bind.v2.JsonbUtilsTest.test1(JsonbUtilsTest.java:18)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:532)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:108)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
{code}

With following overridden dependency tree, it works.

{code}
[INFO] +- org.apache.johnzon:johnzon-core:jar:1.1.12:test
[INFO] +- org.apache.johnzon:johnzon-jsonb:jar:1.1.12:test
[INFO] +- org.apache.johnzon:johnzon-mapper:jar:1.1.12:test
{code}

FYI, following dependency tree doesn't work either.

{code}
[INFO] +- org.apache.johnzon:johnzon-jsonb:jar:1.1.12:test
[INFO] +- org.apache.johnzon:johnzon-mapper:jar:1.1.12:test
[INFO] |  \- org.apache.johnzon:johnzon-core:jar:1.1.11:test
{code}

  was:
With following dependency and its transitive dependencies.

{code}
[INFO] +- org.apache.johnzon:johnzon-jsonb:jar:1.1.12:test
[INFO] |  \- org.apache.johnzon:johnzon-mapper:jar:1.1.11:test
[INFO] |     \- org.apache.johnzon:johnzon-core:jar:1.1.11:test
{code}

A simple test fails.

{{log.debug("Jsonb: {}", JsonbBuilder.create());}}

{code}
java.lang.NoClassDefFoundError: org/apache/johnzon/core/Types

	at org.apache.johnzon.jsonb.JsonbAccessMode.<init>(JsonbAccessMode.java:138)
	at org.apache.johnzon.jsonb.JohnzonBuilder.lambda$build$10(JohnzonBuilder.java:206)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at org.apache.johnzon.jsonb.JohnzonBuilder.build(JohnzonBuilder.java:196)
	at javax.json.bind.JsonbBuilder.create(JsonbBuilder.java:85)
	at com.github.jinahya.jsonrpc.bind.v2.JsonbUtilsTest.test1(JsonbUtilsTest.java:18)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:532)
	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:108)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:112)
	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
	at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
	at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
	at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:69)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.ClassNotFoundException: org.apache.johnzon.core.Types
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
	... 45 more
{code}

With following overridden dependency tree, it works.

{code}
[INFO] +- org.apache.johnzon:johnzon-core:jar:1.1.12:test
[INFO] +- org.apache.johnzon:johnzon-jsonb:jar:1.1.12:test
[INFO] +- org.apache.johnzon:johnzon-mapper:jar:1.1.12:test
{code}

FYI, following dependency tree doesn't work either.

{code}
[INFO] +- org.apache.johnzon:johnzon-jsonb:jar:1.1.12:test
[INFO] +- org.apache.johnzon:johnzon-mapper:jar:1.1.12:test
[INFO] |  \- org.apache.johnzon:johnzon-core:jar:1.1.11:test
{code}


> Align dependency versions
> -------------------------
>
>                 Key: JOHNZON-214
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-214
>             Project: Johnzon
>          Issue Type: Improvement
>          Components: JSON-B
>    Affects Versions: 1.1.12
>         Environment: {code}
> > java --version
> java 11.0.3 2019-04-16 LTS
> Java(TM) SE Runtime Environment 18.9 (build 11.0.3+12-LTS)
> Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode)
> {code}
> {code}
> > mvn --version
> Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-05T04:00:29+09:00)
> Maven home: C:\Users\onacit\scoop\apps\maven\current\bin\..
> Java version: 11.0.3, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11.0.3
> Default locale: en_US, platform encoding: MS949
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
> {code}
>            Reporter: Jin Kwon
>            Priority: Major
>
> With following dependency and its transitive dependencies.
> {code}
> [INFO] +- org.apache.johnzon:johnzon-jsonb:jar:1.1.12:test
> [INFO] |  \- org.apache.johnzon:johnzon-mapper:jar:1.1.11:test
> [INFO] |     \- org.apache.johnzon:johnzon-core:jar:1.1.11:test
> {code}
> A simple test fails.
> {{log.debug("Jsonb: {}", JsonbBuilder.create());}}
> {code}
> java.lang.NoClassDefFoundError: org/apache/johnzon/core/Types
> 	at org.apache.johnzon.jsonb.JsonbAccessMode.<init>(JsonbAccessMode.java:138)
> 	at org.apache.johnzon.jsonb.JohnzonBuilder.lambda$build$10(JohnzonBuilder.java:206)
> 	at java.base/java.util.Optional.orElseGet(Optional.java:369)
> 	at org.apache.johnzon.jsonb.JohnzonBuilder.build(JohnzonBuilder.java:196)
> 	at javax.json.bind.JsonbBuilder.create(JsonbBuilder.java:85)
> 	at com.github.jinahya.jsonrpc.bind.v2.JsonbUtilsTest.test1(JsonbUtilsTest.java:18)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> 	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:532)
> 	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
> 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
> 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
> 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
> 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
> 	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
> 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$4(NodeTestTask.java:108)
> 	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
> 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:98)
> 	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:74)
> 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
> {code}
> With following overridden dependency tree, it works.
> {code}
> [INFO] +- org.apache.johnzon:johnzon-core:jar:1.1.12:test
> [INFO] +- org.apache.johnzon:johnzon-jsonb:jar:1.1.12:test
> [INFO] +- org.apache.johnzon:johnzon-mapper:jar:1.1.12:test
> {code}
> FYI, following dependency tree doesn't work either.
> {code}
> [INFO] +- org.apache.johnzon:johnzon-jsonb:jar:1.1.12:test
> [INFO] +- org.apache.johnzon:johnzon-mapper:jar:1.1.12:test
> [INFO] |  \- org.apache.johnzon:johnzon-core:jar:1.1.11:test
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message