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

#57: Use relocated json dependencies #58

Merged
merged 2 commits into from
Oct 8, 2023
Merged

#57: Use relocated json dependencies #58

merged 2 commits into from
Oct 8, 2023

Conversation

TheSnoozer
Copy link
Contributor

Fix #57: Use relocated json dependencies

  • The dependency javax.json:javax.json-api was relocated to jakarta.json:jakarta.json-api (implicit bump from version 1.1.4 to 2.1.2)
  • The dependency org.glassfish:javax.json was relocated to org.glassfish:jakarta.json (implicit bump from version 1.1.4 to 2.0.1)

- The dependency javax.json:javax.json-api was relocated to jakarta.json:jakarta.json-api (implicit bump from version 1.1.4 to 2.1.2)
- The dependency org.glassfish:javax.json was relocated to org.glassfish:jakarta.json (implicit bump from version 1.1.4 to 2.0.1)
@TheSnoozer TheSnoozer added the dependencies Pull requests that update a dependency file label Oct 8, 2023
@TheSnoozer TheSnoozer added this to the 6.0.0 milestone Oct 8, 2023
Aparently we now need to stop relying on
```
            <groupId>org.glassfish</groupId>
            <artifactId>jakarta.json</artifactId>
            <version>2.0.1</version>
```
and instead use
```
            <groupId>org.eclipse.parsson</groupId>
            <artifactId>parsson</artifactId>
            <version>1.1.4</version>
```

See https://github.com/elastic/elasticsearch-java/pull / 63
and https://jakarta.ee/blogs/javax-jakartaee-namespace-ecosystem-progress/
@TheSnoozer
Copy link
Contributor Author

When using org.glassfish:jakarta.json one get's

jakarta.json.JsonException: Provider org.eclipse.parsson.JsonProviderImpl not found

	at jakarta.json.spi.JsonProvider.newInstance(JsonProvider.java:160)
	at jakarta.json.spi.JsonProvider.provider(JsonProvider.java:144)
	at jakarta.json.Json.createGeneratorFactory(Json.java:157)
	at pl.project13.core.util.JsonManager.dumpJson(JsonManager.java:37)
	at pl.project13.core.util.TestJsonManager.testDumpWithUnicode(TestJsonManager.java:147)
	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.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:54)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
	at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: java.lang.ClassNotFoundException: org.eclipse.parsson.JsonProviderImpl
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)

while running tests.

This https://github.com/elastic/elasticsearch-java/pull/63 suggests to use org.eclipse.parsson:parsson Instead

@TheSnoozer TheSnoozer merged commit bc503ab into master Oct 8, 2023
24 checks passed
@TheSnoozer TheSnoozer deleted the 57 branch October 21, 2023 06:52
@TheSnoozer TheSnoozer modified the milestones: 6.0.0, 6.0.0-rc.6 Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Stop relying on javax.json 1.1.4
1 participant