-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathBugs
34 lines (19 loc) · 1.13 KB
/
Bugs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Bugs:
- start_node() may hang if the ets tables (in init) cannot be generated. Illustrated when rand:uniform/1
does not exists; this raises an exception but the exception is caught by a try catch and we wait
indefinitely.
- string_to_list() fails for non-ascii Java strings.
Workaround: use string_to_utf8 instead, although note that it returns a binary.
- Due to changes in Java 9 (the introduction of the module system)
there may be problems with reflection.
For instance, to permit method access
in Java inner class the library has to call method.setAccessible(true)
due to a Java bug 4071957; in Java 9 (and higher) this may fail.
Note that this is an instance of deep reflection.
An example error message:
Unable to make java.lang.ClassLoader.defineClass accessible: module java.base does not "opens java.lang" to unnamed module @1941a8ff
Workaround:
Require java to "open" the module and package combination from the error
message:
java:start_node([{java_options,["--add-opens","java.base/java.lang=ALL-UNNAMED"]}]).
Starting java in this way ensures that the java runtime is started with the java.lang package open for (deep) reflection.