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

Parsson media do not work with injection framework on module path #61

Closed
tomas-langer opened this issue Jun 16, 2022 · 8 comments · Fixed by #62, #63, #64 or #66
Closed

Parsson media do not work with injection framework on module path #61

tomas-langer opened this issue Jun 16, 2022 · 8 comments · Fixed by #62, #63, #64 or #66
Assignees
Labels
bug Something isn't working

Comments

@tomas-langer
Copy link

When I run Weld + Jersey + Parsson on module path, I get the following exception:

java.lang.reflect.InaccessibleObjectException: Unable to make private void org.eclipse.parsson.media.JsonValueBodyWriter.init() accessible: module org.eclipse.parsson.media does not "opens org.eclipse.parsson.media" to module weld.core.impl

As the init method annotated with @PostConstruct is private, we need to have it open for injection frameworks, as otherwise this cannot be called.

Please either change the method to public or open the package.

Thank you.

@tomas-langer tomas-langer added the bug Something isn't working label Jun 16, 2022
@lukasj
Copy link
Member

lukasj commented Jun 16, 2022

injection frameworks should define requirements for this to work, like ie CDI should say sth like annotated methods needs to be open to at least jakarta.enterprise.cdi and be able to take it from there. Explicitly opening the package to particular implementation is closing doors for working with other implementations, while opening it for everyone is just too much.

all in all, making the method public sounds like the only solution for now

@tomas-langer
Copy link
Author

I also needed to add opens for org.glassfish.hk2.utilities, so definitely this needs to either be an open module, or declare the method as public (I also prefer the latter option)

lukasj added a commit to lukasj/parsson that referenced this issue Jun 16, 2022
…n module path

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
lukasj added a commit that referenced this issue Jun 16, 2022
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
@lukasj lukasj closed this as completed Jun 16, 2022
@jansupol
Copy link

Reopening as the bug is against Parsson 1.0.0.

@jansupol jansupol reopened this Jun 16, 2022
@lukasj
Copy link
Member

lukasj commented Jun 16, 2022

so it is not a problem in master?

@jansupol
Copy link

It is a problem in master, too. Both versions have the problem.

@tomas-langer
Copy link
Author

I am using version 1.1.0 - I would need to get it fixed in that major version

@jansupol
Copy link

@tomas-langer Parsson 1.1.0 is EE 10 parsson. Are you sure you are using 1.1.0?

@lukasj
Copy link
Member

lukasj commented Jun 16, 2022

since API 2.1.x is backwards compatible with 2.0.x and Parsson 1.1.x is backward compatible with 1.0.x I see no point being stuck at 2.0.x/1.0.x unless there is strong reason for the older version

lukasj added a commit to lukasj/parsson that referenced this issue Jun 17, 2022
…n module path

Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
(cherry picked from commit 68d27e2)
@lukasj lukasj linked a pull request Jun 17, 2022 that will close this issue
lukasj added a commit that referenced this issue Jun 17, 2022
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
(cherry picked from commit 68d27e2)
@lukasj lukasj closed this as completed Jun 17, 2022
@lukasj lukasj linked a pull request Jun 28, 2022 that will close this issue
@lukasj lukasj linked a pull request Jun 28, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment