0 Replies Latest reply on Mar 22, 2018 11:36 AM by Fábio Laguna

    Is it possible to invoke EJBs via pure HTTPS on Wildfly 12?

    Fábio Laguna Newbie

      Hello,

       

      Using the same environment and projects from another topic (Why is Wildfly 11 pure http invocation not working? ), but now on Wildfly 12, I tried invoking a remote EJB via pure HTTPS. The only modification I made to the project was changing the provider URL from "http://localhost:8080/wildfly-services" to "https://localhost:8443/wildfly-services" and I got the following exception:

       

      2018-03-22 10:12:16,344 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /web/index.jsp: org.apache.jasper.JasperException: javax.ejb.EJBException: java.nio.channels.ClosedChannelException
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:473)
          at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:403)
          at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:347)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
          at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
          at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
          at io.undertow.jsp.JspFileHandler.handleRequest(JspFileHandler.java:32)
          at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:67)
          at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
          at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
          at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
          at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
          at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
          at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
          at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
          at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
          at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
          at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
          at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
          at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
          at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
          at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
          at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
          at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
          at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
          at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
          at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
          at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
          at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction$$Lambda$841/1444978265.call(Unknown Source)
          at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1526)
          at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$842/1266258479.call(Unknown Source)
          at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1526)
          at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$842/1266258479.call(Unknown Source)
          at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1526)
          at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$842/1266258479.call(Unknown Source)
          at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1526)
          at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction$$Lambda$842/1266258479.call(Unknown Source)
          at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
          at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
          at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
          at io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
          at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
          at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
          at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
          at java.lang.Thread.run(Thread.java:745)
      Caused by: javax.ejb.EJBException: java.nio.channels.ClosedChannelException
          at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:207)
          at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:112)
          at com.sun.proxy.$Proxy62.calculateInterest(Unknown Source)
          at br.com.client.RemoteEJBClient.main(RemoteEJBClient.java:20)
          at br.com.client.RemoteEJBClient.func(RemoteEJBClient.java:14)
          at org.apache.jsp.index_jsp._jspService(index_jsp.java:99)
          at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
          at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:433)
          ... 50 more
      Caused by: java.nio.channels.ClosedChannelException
          at io.undertow.client.http2.Http2ClientConnection$1.handleEvent(Http2ClientConnection.java:107)
          at io.undertow.client.http2.Http2ClientConnection$1.handleEvent(Http2ClientConnection.java:99)
          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
          at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:1055)
          at io.undertow.server.protocol.framed.AbstractFramedChannel$FrameCloseListener.handleEvent(AbstractFramedChannel.java:969)
          at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
          at io.undertow.protocols.ssl.SslConduit$SslReadReadyHandler.terminated(SslConduit.java:1186)
          at org.xnio.nio.NioSocketConduit.readTerminated(NioSocketConduit.java:332)
          at org.xnio.nio.NioSocketStreamConnection.notifyReadClosed(NioSocketStreamConnection.java:148)
          at org.xnio.Connection.close(Connection.java:139)
          at org.xnio.IoUtils.safeClose(IoUtils.java:152)
          at io.undertow.protocols.ssl.SslConduit.closed(SslConduit.java:1021)
          at io.undertow.protocols.ssl.SslConduit.close(SslConduit.java:1092)
          at io.undertow.protocols.ssl.SslConduit.doUnwrap(SslConduit.java:803)
          at io.undertow.protocols.ssl.SslConduit.doHandshake(SslConduit.java:648)
          at io.undertow.protocols.ssl.SslConduit.access$900(SslConduit.java:63)
          at io.undertow.protocols.ssl.SslConduit$5$1.run(SslConduit.java:1059)
          at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:612)
          at org.xnio.nio.WorkerThread.run(WorkerThread.java:479)
      
      

       

      So, is it possible to invoke EJBs via pure HTTPS? If it is, what am I missing? If not, do you intend to add this functionality?

       

      Thanks