junixsocket icon indicating copy to clipboard operation
junixsocket copied to clipboard

junixsocket-rmi Graal metadata references test classes

Open rschmitt opened this issue 1 month ago • 2 comments

Running native-image with junixsocket-rmi on the classpath produces:

Warning: Could not resolve org.newsclub.net.unix.rmi.RemoteCloseableThing$IsCloseable for serialization configuration.
Warning: Could not resolve org.newsclub.net.unix.rmi.RemoteCloseableThing$NotCloseable for serialization configuration.
Warning: Could not resolve org.newsclub.net.unix.rmi.RemoteCloseableThingImpl for serialization configuration.
Warning: Could not resolve org.newsclub.net.unix.rmi.RemoteCloseableThingImpl$IsCloseableImpl for serialization configuration.
Warning: Could not resolve org.newsclub.net.unix.rmi.RemoteCloseableThingImpl$NotCloseableImpl for serialization configuration.
Warning: Cannot register dynamic proxy for interface list: org.newsclub.net.unix.rmi.NaiveFileInputStreamRemote. Reason: Class org.newsclub.net.unix.rmi.NaiveFileInputStreamRemote not found..

These are emitted as warnings, but the build immediately fails (even with -H:+AllowIncompleteClasspath):

Internal exception: com.oracle.svm.core.util.UserError$UserException: Error parsing serialization configuration in jar:file:.../junixsocket-rmi-2.10.1.jar!/META-INF/native-image/com.kohlschutter.junixsocket/junixsocket-rmi/serialization-config.json:
java.lang.NullPointerException: Cannot register null value as class for reflection. Please ensure that all values you register are not null.
Verify that the configuration matches the corresponding schema at https://github.com/oracle/graal/blob/master/docs/reference-manual/native-image/assets/

Manually removing the problematic entries from the jar file fixes the problem.

It's possible I'm just doing something wrong here but I figured I'd file a bug report. It would take me some time to produce a repro case, but I can do so if necessary.

rschmitt avatar Dec 07 '25 01:12 rschmitt