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

TCK failure, NPE in JsonProvider.createParser(InputStream) #57

Open
starksm64 opened this issue May 17, 2022 · 3 comments
Open

TCK failure, NPE in JsonProvider.createParser(InputStream) #57

starksm64 opened this issue May 17, 2022 · 3 comments

Comments

@starksm64
Copy link
Member

The TCK jsonprovidertests have a test that verifies calling jakarta.json.Json.createParser(InputStream = null) throws a JsonException. Currently this is seeing an NPE as described in this issue:
jakartaee/platform-tck#1002

Current parsson version in glassfish is 1.1.0.

@starksm64 starksm64 changed the title TCK failure TCK failure, NPE in JsonProvider.createParser(InputStream) May 17, 2022
@starksm64
Copy link
Member Author

It looks like the root cause of this is not loading the com.sun.ts.tests.jsonp.provider.MyJsonProvider class:
jakartaee/platform-tck#1003

@jbescos
Copy link
Member

jbescos commented Jun 8, 2022

I think there is currently no deterministic way to know which implementation will be loaded first from the META-INF/services. When 2 different implementations exists in the classpath there is no logic to determine which one should be used.

We should agree in a common solution, because I think this is also a problem in mail and jsonb at least.

@lukasj what is your opinion in this?.

@jbescos
Copy link
Member

jbescos commented Jun 8, 2022

I discussed with @lukasj and he told me there is already one bundle dependency that contains Parsson implementation and JSONP API. This bundle does not have META-INF/services, so it will allow other implementations in the classpath to be loaded.

In few words, you need to remove from GF any Parsson and JSONP dependency, and add this one instead org.eclipse.parsson:jakarta.json:
https://github.com/eclipse-ee4j/parsson/blob/master/bundles/jakarta.json/pom.xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants