java.lang.RuntimeException: java.nio.channels.ClosedChannelException

JDK Bug System | Webbug Group | 9 months ago
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    FULL PRODUCT VERSION : Java(TM) SE Runtime Environment (build 1.8.0_92-b14) ADDITIONAL OS VERSION INFORMATION : OSX 10.11.6 A DESCRIPTION OF THE PROBLEM : The problem comes when you set the property value for org.xnio.Options.SSL_PROTOCOL, on a two way ssl, if you do this, you have to provide also your own implementation for the SSL_JSSE_KEY_MANAGER_CLASSES property, otherwise it defaults to DummyX509KeyManager. For the trust manager it always sets the default to the X509TrustManagerImpl. The implementation is in engineInit in, the behaviour is not consistent. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : set mutual ssl, set SSL_PROTOCOL to tlsv1.2 or any other. EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - Set X509TrustManagerImpl and SunX509KeyManagerImpl ACTUAL - X509TrustManagerImpl and DummyX509KeyManager ERROR MESSAGES/STACK TRACES THAT OCCUR : WARN: Could not register a EJB receiver for connection to localhost:8443 java.lang.RuntimeException: java.nio.channels.ClosedChannelException at org.jboss.ejb.client.remoting.IoFutureHelper.get( REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- package client; import ejb3.MathRemote; import javax.naming.*; import org.jboss.ejb.client.ContextSelector; import org.jboss.ejb.client.EJBClientConfiguration; import org.jboss.ejb.client.EJBClientContext; import org.jboss.ejb.client.PropertiesBasedEJBClientConfiguration; import org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector; import java.util.*; public class StandaloneClient { public static void main(String args[]) { Context context=null; String JNDI_NAME="ejb:/EJB_WildFly_Https/MathBean!ejb3.MathRemote"; System.setProperty("", "path/standalone/configuration/clientkeystore.jks"); //change it System.setProperty("", "path/standalone/configuration/clienttruststore.jks"); //change it System.setProperty("", "password"); //change it System.setProperty("", "password"); //change it try { Properties props = new Properties(); props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); props.put("org.jboss.ejb.client.scoped.context", "true"); props.put("", "true"); props.put("", "false"); props.put("","TLSv1.2"); props.put("remote.connections", "default"); props.put("", "localhost"); props.put("remote.connection.default.port", "8443"); props.put("remote.connection.default.protocol", "https-remoting"); props.put("remote.connection.default.username", "admin"); //change it props.put("remote.connection.default.password", "admin"); //change it props.put("remote.connection.default.connect.timeout", "6000000"); context = new InitialContext(props); System.out.println("\n\tGot initial Context: "+context); } catch (Exception e) { e.printStackTrace(); } try { MathRemote remote=(MathRemote)context.lookup(JNDI_NAME); System.out.println("remote "+ remote); int sum=remote.add(2,10); System.out.println("add 2, 10 "+ sum); String result = remote.sayHello("Hello"); System.out.println("\n\t remote.add(2,10) => "+ sum); System.out.println("\n\t remote.sayHello('Hello') => "+ result); } catch(Exception e) { e.printStackTrace(); } } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : props.put("", "TLSv1.2"); and remove props.put("","TLSv1.2");

    JDK Bug System | 9 months ago | Webbug Group
    java.lang.RuntimeException: java.nio.channels.ClosedChannelException
  2. 0

    db:: 3.90::wildfly invok ejb error: EJBCLIENT000025 ms | 11 months ago
    java.lang.RuntimeException: Unrecognized SSL message, plaintext connection?
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    db:: 4.14::JBREM000200: Remote connection failed: Received an invalid message length of 1347375956 d3 | 9 months ago
    java.lang.RuntimeException: Unrecognized SSL message, plaintext connection?
  5. 0

    Wildfly 10: EJB Remote Calling stop working when migrating from Wildfly 9 to 10

    Stack Overflow | 6 months ago | Carlitos Way
    java.lang.RuntimeException: Operation failed with status WAITING

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException


      at org.jboss.ejb.client.remoting.IoFutureHelper.get()
    2. JBoss EJB client
      1. org.jboss.ejb.client.remoting.IoFutureHelper.get(
      1 frame