question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTTP Put results in "Unable to make field private java.lang.String java.net.URL.host accessible: module java.base does not "opens java.net" to unnamed"

See original GitHub issue

khttp version is 1.0.0

When calling HTTP PUT to a url, i keep getting below error

java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.net.URL.host accessible: module java.base does not "opens java.net" to unnamed module @5f5a92bb
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354) ~[na:na]
        at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297) ~[na:na]
        at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:178) ~[na:na]
        at java.base/java.lang.reflect.Field.setAccessible(Field.java:172) ~[na:na]
        at khttp.requests.GenericRequest.toIDN(GenericRequest.kt:198) ~[khttp-1.0.0.jar!/:na]
        at khttp.requests.GenericRequest.makeRoute(GenericRequest.kt:208) ~[khttp-1.0.0.jar!/:na]
        at khttp.requests.GenericRequest.<init>(GenericRequest.kt:132) ~[khttp-1.0.0.jar!/:na]
        at khttp.KHttp.request(KHttp.kt:60) ~[khttp-1.0.0.jar!/:na]
        at khttp.KHttp.put(KHttp.kt:55) ~[khttp-1.0.0.jar!/:na]
        at khttp.KHttp.put$default(KHttp.kt:54) ~[khttp-1.0.0.jar!/:na]
        at ai.paravision.mozart.orchestrator.worker.WorkerClient.search$suspendImpl(WorkerClient.kt:29) ~[classes!/:0.0.0]

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

1reaction
Jetugcommented, Aug 25, 2022

Use JDK 1.8

0reactions
OndraZizkacommented, Oct 25, 2022

@ascclemens , Would you allow to publish this into Maven central under ch.zizka.khttp ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix the ''module java.base does not "opens java.io ...
Problem Description But every time I try to run and build (I want to emulator as of now), I get the following error...
Read more >
Issues · ascclemens/khttp
HTTP Put results in "Unable to make field private java.lang.String java.net.URL.host accessible: module java.base does not "opens java.net" to unnamed".
Read more >
Unable to make field private final java.lang.String java.io.File ...
Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module.
Read more >
Permissions in the Java Development Kit (JDK)
A permission object represents, but does not grant access to, a system resource. Permission objects are constructed and assigned ("granted") to code based...
Read more >
Groovy Language Documentation
is an agile and dynamic language for the Java Virtual Machine ... The following binary arithmetic operators are available in Groovy: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found