-
Notifications
You must be signed in to change notification settings - Fork 89
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
NoSuchFieldError on last just released jdk #35
Comments
can you please report result of
|
The version of jdk 6
The version of jdk 7
|
|
@carrot-garden
|
Hello, I've also encountered this problem in the little project that I take part in. It is 100% reproducible on Oracle's JRE 7u13 and 6u39. [Thread-6] ERROR com.barchart.udt.SocketUDT - Failed to INIT native library It is probably caused by fixing the http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-0433 vulnerability. The root cause was that method UDT_InitFieldRefAll access field 'port' in Java class InetSocketAddress (around line 400) that is private. Previous JREs allowed this, but in the newest one is the bug was fixed and thus the method doesn't work anymore. The fix would be to access the field value using public getter, and rewrite every function that sets this field's value that the new InetSocketAddress would be spawned with correct 'port' value (because there is no public setter for this field, it's accesible only through constructor). |
@wmichal, yes you are right~! |
@carrot-garden thanks,i will test it later. |
try current snapshot |
I can confirm this works with the latest JRE 7. Any chance you can cut a release (again, sorry). |
@carrot-garden ,i confirm it works on the last oracle JDK 7 too,did it affect the older jre? |
@CCob ,hi CCob,do you want to implement the android support?! |
No I don't, do you :) |
@CCob ,i wanna to ,but i am going to my spring festival,when i go back hometwon ,i have no network connection... |
@carrot-garden should the next version add support the older version of JDK or OpenJDK which not change the implement? |
this fix works fine both in old and new jdk |
Caused by: java.lang.RuntimeException: init
at com.barchart.udt.SocketUDT.(SocketUDT.java:153)
... 3 more
Caused by: java.lang.NoSuchFieldError: port
at com.barchart.udt.SocketUDT.initClass0(Native Method)
at com.barchart.udt.SocketUDT.(SocketUDT.java:150)
... 3 more
hi ,barchart ,cause the oracle change the class InetSocketAddress's implement in the last release,so your native binding which get the filed id such as addr and port of the InetSocketAddress class will cause an error,not the change is moving the addr and port field to an inner class:
this change may be cause you guys to rewrite the native binding ...
The text was updated successfully, but these errors were encountered: