-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
HttpURLConnection Caused String.getBytes() NoSuchMethodError, Quarkus 1.3.0.Final and GraalVM 20.0.0 on Windows #8067
Comments
Hello, Your reproducer is using version |
@geoand |
@iwangxiaodong I mean I could not reproduce your error. I was just getting an error during the native image build. |
@iwangxiaodong can you update the reproducer with the latest code that you used to build the native image? |
I get it. I modified my quarkus-example.zip. GraalVM 20.0.0 in Windows 10 x64:
Build time is Successful, runtime is Internal Server Error Visit url http://localhost:8080/demo Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes()[B Thank you! |
I still can't build the native image with your reproducer (I am using Linux). So maybe someone with a Windows machine can give it a shot |
Yes, Only In Windows Caused. |
FWIW, native image is just a preview on Windows |
OK. Hope support as soon as possible. |
To be clear, the limitation I mentioned above is a GraalVM limitation, not a Quarkus limitation |
Hi @iwangxiaodong! I tried reproducing your issue, but it works perfectly fine on my test environment, which is composed of:
When I run the native executable and visit
There must be a difference between my environment and yours that explains the |
I got to the root of the problem. My Windows OS Locale is Chinese, Though Graal native-image build is succeeded, But runtime execute hi.exe is NoSuchMethodError. This error is Graal native-image‘s problem, I switch OS Locale to English it works!
C:\Users\xiaodong\Desktop\demo>java Hi C:\Users\xiaodong\Desktop\demo> native-image Hi C:\Users\xiaodong\Desktop\demo> hi.exe |
Describe the bug
HttpURLConnection Caused String.getBytes() NoSuchMethodError, Quarkus 1.3.0.Final and GraalVM 20.0.0 on Windows
Expected behavior
No error.
Actual behavior
Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes()[B
at com.oracle.svm.jni.functions.JNIFunctions$Support.getMethodID(JNIFunctions.java:1095)
at com.oracle.svm.jni.functions.JNIFunctions$Support.getMethodID(JNIFunctions.java:1080)
at com.oracle.svm.jni.functions.JNIFunctions.GetMethodID(JNIFunctions.java:384)
at java.net.Inet6AddressImpl.lookupAllHostAddr(Inet6AddressImpl.java)
at java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:929)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1515)
at java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:848)
at java.net.InetAddress.getAllByName0(InetAddress.java:1505)
at java.net.InetAddress.getAllByName(InetAddress.java:1364)
at java.net.InetAddress.getAllByName(InetAddress.java:1298)
at java.net.InetAddress.getByName(InetAddress.java:1248)
at java.net.InetSocketAddress.(InetSocketAddress.java:220)
at sun.net.NetworkClient.doConnect(NetworkClient.java:182)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:569)
at sun.net.www.protocol.https.HttpsClient.(HttpsClient.java:265)
at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:372)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1187)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1081)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1587)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1515)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:334)
To Reproduce
Steps to reproduce the behavior:
Configuration
Screenshots
None
Additional context
@gwenneg #7269
The text was updated successfully, but these errors were encountered: