我在jBoss EAP 7.0.9上部署了一个WAR,它使用EJB-Client jboss-ejb-client-2.1.4.Final-redhat-1.jar
连接到jBoss EAP 7.0.0中托管的远程EJB。 当配置为非SSL时,设置可以正常运行。通过同一连接启用SSL时出现错误。我在java.net.debug
日志中看到SSL握手和证书交换很好,但随后通道失败并出现以下异常,方法调用失败;
2019-06-05 10:18:03,715 INFO [stdout] (Remoting "config-based-ejb-client-endpoint" I/O-1) 0050: 4D 4F D0 BA C8 MO...
2019-06-05 10:18:03,716 ERROR [org.xnio.listener] (Remoting "config-based-ejb-client-endpoint" I/O-1) XNIO001007: A channel event listener threw an exception: java.lang.IllegalArgumentException
at java.nio.HeapByteBuffer.put(HeapByteBuffer.java:202)
at org.xnio.Buffers.copy(Buffers.java:236)
at org.xnio.conduits.PushBackStreamSourceConduit$BufferConduit.read(PushBackStreamSourceConduit.java:130)
at org.xnio.conduits.PushBackStreamSourceConduit.read(PushBackStreamSourceConduit.java:52)
at org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:410)
at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:400)
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:89)
at org.xnio.nio.NioHandle$1.run(NioHandle.java:50)
at org.xnio.nio.WorkerThread.safeRun(WorkerThread.java:592)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:472)
2019-06-05 10:18:03,717 WARN [org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector] (default task-29) Could not register a EJB receiver for connection to udc2app001:8443: org.xnio.http.UpgradeFailedException: Invalid response code 200
at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:471)
at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:400)
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:89)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:571)
at ...asynchronous invocation...(Unknown Source)
at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:294)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:430)
at org.jboss.ejb.client.remoting.EndpointPool$PooledEndpoint.connect(EndpointPool.java:192)
at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:153)
at org.jboss.ejb.client.remoting.NetworkUtil.connect(NetworkUtil.java:133)
at org.jboss.ejb.client.remoting.ConnectionPool.getConnection(ConnectionPool.java:78)
at org.jboss.ejb.client.remoting.RemotingConnectionManager.getConnection(RemotingConnectionManager.java:51)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.setupEJBReceivers(ConfigBasedEJBClientContextSelector.java:161)
at org.jboss.ejb.client.remoting.ConfigBasedEJBClientContextSelector.getCurrent(ConfigBasedEJBClientContextSelector.java:118)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.createIdentifiableEjbClientContext(EjbNamingContext.java:269)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.setupScopedEjbClientContextIfNeeded(EjbNamingContext.java:134)
at org.jboss.ejb.client.naming.ejb.EjbNamingContext.<init>(EjbNamingContext.java:101)
at org.jboss.ejb.client.naming.ejb.ejbURLContextFactory.getObjectInstance(ejbURLContextFactory.java:38)
at org.jboss.as.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:133)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at com.xyz.ejbconnector.TafjJboss72Provider.createInitialContext(TafjJboss72Provider.java:185)
....
我怀疑与客户端-服务器不匹配有关,但与哪一个无关!我什至尝试从JBOSS_HOME/bin/client/jboss-client.jar
下的容器中替换上面的EJB客户端jar,但错误完全相同。
有人碰到过这个吗?任何指针都很棒。