Reputation: 301
Switching from Java 1.8.161 to 1.8.0_331 the EJB client stopped working. The error message is:
Apr 25, 2022 8:34:49 AM org.xnio.ChannelListeners invokeChannelListener
ERROR: XNIO001007: A channel event listener threw an exception
java.io.IOError: java.io.FileNotFoundException: Invalid file path
at org.xnio.channels.Channels$4.run(Channels.java:998)
at org.xnio.channels.Channels$4.run(Channels.java:988)
at java.security.AccessController.doPrivileged(Native Method)
at org.xnio.channels.Channels.<clinit>(Channels.java:988)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:403)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:242)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:199)
at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:113)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.ChannelListeners$DelegatingChannelListener.handleEvent(ChannelListeners.java:1092)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:88)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:539)
Caused by: java.io.FileNotFoundException: Invalid file path
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.xnio.channels.Channels$4.run(Channels.java:993)
... 14 more
Here https://www.oracle.com/java/technologies/javase/8u331-relnotes.html is written that:
The parsing of URLs in the LDAP, DNS, RMI and CORBA built-in JNDI providers as been made more strict. The strength of the parsing can be controlled by system properties
But setting the system property seems do not have effect. So I would want to know what means "The parsing of URLs as been made more strict"? How it should be?
We use Wildfly 8 as application server. We get the Context with this code:
private static Context createRemoteEjbContext(String host, int port) throws NamingException {
Properties props = new Properties();
String providerURL = "http-remoting://" + host + ":" + port;
props.put(Context.PROVIDER_URL, providerURL);
props.put("remote.connection.default.connect.options.org.jboss.remoting3.RemotingOptions.HEARTBEAT_INTERVAL", 60000);
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
props.put("jboss.naming.client.ejb.context", true);
return new InitialContext(props);
}
and from the context we lookup passing this string:
dataloy/dataloy-ejb/BasicServicesEJB!com.dataloy.svc.impl.ejb.BasicServicesHome
Any idea? Thanks Andrea
Upvotes: 2
Views: 4636
Reputation: 21
Theres a bug when you use Wildfly with JDK 11.0.15, just downgrade to version 11.0.14, that worked for our enviroment
Upvotes: 2
Reputation: 11
Many thanks Pablo! You have just ended hours of me beating my head against a wall. Upgraded from 331 to 333 and it's resolved.
Upvotes: 1
Reputation: 29
According to:
Java: FileOutputStream("NUL:") not working after Java upgrade
"You can try setting the system property jdk.io.File.enableADS to true to re-enable the old behaviour."
There is a bug in this jvm version, that affects the library xnio (https://issues.redhat.com/browse/XNIO-404).
If that doesnt work, you can apply the same patch used in https://issues.redhat.com/browse/XNIO-404 (I tested copying the class Channels.java and changed the problematic line, so it writes to NUL, as in the issue). Anyway, i will wait for the fix en the jvm bug, and if that is closed without fixing i will apply any of the previous solutions.
PS: It is fixed in 1.8.0_333
Upvotes: 1