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

Bug: Unable to make field accessible #32

Open
4 tasks done
mininotallarines opened this issue Oct 22, 2024 · 1 comment
Open
4 tasks done

Bug: Unable to make field accessible #32

mininotallarines opened this issue Oct 22, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mininotallarines
Copy link

Prerequisites

Describe the issue

Hi, I pulled the latest version of this library but had to build it myself since I'm using springboot 3.2, and the published artifact still uses javax instead of Jakarta. I saw that there's already an issues for that but I managed to work around that by just cloning the repo and mvn installing myself.

I then generated a fat jar using the maven shade plugin and used the lib directly in my project (kinde-management-fat.jar). Everything works just fine except when trying to update an organization (setting the externalId) I'm faced with this error:

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field private final sun.net.www.protocol.https.DelegateHttpsURLConnection sun.net.www.protocol.https.HttpsURLConnectionImpl.delegate accessible: module java.base does not "opens sun.net.www.protocol.https" to unnamed module @3e27aa33
	at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:391) ~[na:na]
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:367) ~[na:na]
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:315) ~[na:na]
	at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:183) ~[na:na]
	at java.base/java.lang.reflect.Field.setAccessible(Field.java:177) ~[na:na]
	at org.glassfish.jersey.client.internal.HttpUrlConnector$3.run(HttpUrlConnector.java:544) ~[kinde-management-2.0.0-fat.jar:na]
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:571) ~[na:na]
	at org.glassfish.jersey.client.internal.HttpUrlConnector.setRequestMethodViaJreBugWorkaround(HttpUrlConnector.java:531) ~[kinde-management-2.0.0-fat.jar:na]
	at org.glassfish.jersey.client.internal.HttpUrlConnector._apply(HttpUrlConnector.java:375) ~[kinde-management-2.0.0-fat.jar:na]
	at org.glassfish.jersey.client.internal.HttpUrlConnector.apply(HttpUrlConnector.java:273) ~[kinde-management-2.0.0-fat.jar:na]
	at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:300) ~[kinde-management-2.0.0-fat.jar:na]

Seems that there's something wrong with the jersey client version being used (4.0.0-M1). I've tried other request like getUser, createOrganization, deleteOrganization, ... they're all working fine, but it's just the update organization request that I know of that is not working.

I built the kinde-management project with maven 3.9.8 on jdk 21 and imported it in my project using gradle 8.5 on jdk 21. Project runtime is also jdk 21.

Let me know if I forgot to share important information.

Thanks in advance for taking a look at the issue.

Library URL

https://github.com/kinde-oss/kinde-java-sdk

Library version

2.0.0

Operating system(s)

macOS

Operating system version(s)

15.0.1 (24A348)

Further environment details

No response

Reproducible test case URL

No response

Additional information

No response

@mininotallarines mininotallarines added the bug Something isn't working label Oct 22, 2024
@brettchaldecott
Copy link
Contributor

This has been investigated and the cause appears to be the servers HTTPS PATCH response. This only affects some of the API calls. It requires the implementation of some extra code in the client to handle HTTPS PATCH responses.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants