[jboss-user] [EJB 3.0] - SSL EJB 3.0 invocation 4.0.5.GA
paul_da_programmer
do-not-reply at jboss.com
Mon Aug 13 15:20:59 EDT 2007
I'm trying to bind an EJB service to support SSL only invocation.
I'm running the following configuration:
JBoss 4.0.5.GA
Sun JDK 1.5.0_11
Windows XP / Solaris 9
In my case, the client is another JBoss server of the same configuration.
There seems to be two completely different methods to implement this.
One found here:
http://docs.jboss.org/jbossas/jboss4guide/r3/html/ch8.chapter.html#d0e20905
andthe second found here:
http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html_single/index.html#d0e857
I've tried both unsuccessfully.
I have the following in my startup for the server
set JAVA_OPTS=%JAVA_OPTS% -Djavax.net.ssl.keyStore=../server/DC_DEVL/conf/localhost.keystore -Djavax.net.ssl.keyStorePassword=opensource
I have the following in the startup for the client
set JAVA_OPTS=%JAVA_OPTS% -Djavax.net.ssl.trustStore=../server/DC_DEVL/conf/localhost.truststore -Djavax.net.ssl.trustStorePassword=opensource
I've gotten further with the second page (EJB 3.0 Reference Documentation), but I'm getting the following issue on the server's log immediately at every invocation of the client:
| 2007-08-13 15:06:33,229 ERROR [SocketServerInvoker#0-3843][org.jboss.remoting.transport.socket.ssl.SSLSocketServerInvoker] Failed to accept socket connection
| java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at org.jboss.remoting.transport.socket.ServerThread.createServerSocket(ServerThread.java:184)
| at org.jboss.remoting.transport.socket.ServerThread.<init>(ServerThread.java:86)
| at org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:426)
| at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:388)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.io.StreamCorruptedException: invalid stream header
| at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)
| at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
| at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:73)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
| at org.jboss.remoting.transport.socket.ServerSocketWrapper.createInputStream(ServerSocketWrapper.java:56)
| at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:76)
| at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
| at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:50)
|
On the client's log file, the call to obtain the EJB reference hangs 10 mins (the XA transaction timeout param) then I get the following stack trace:
| at com.abccorp.abcdiv.dcsynchronizer.services.impl.DCSynchronizerImpl.processPendingRecords(DCSynchronizerImpl.java:457)
| at com.abccorp.abcdiv.dcsynchronizer.services.impl.DCSynchronizerImpl.sync(DCSynchronizerImpl.java:305)
| at com.abccorp.abcdiv.tap.worker.WorkerBean.processMessage(WorkerBean.java:351)
| at com.abccorp.abcdiv.tap.worker.WorkerBean.onMessage(WorkerBean.java:288)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.tx.BMTInterceptor.handleStateless(BMTInterceptor.java:71)
| at org.jboss.ejb3.tx.BMTInterceptor.invoke(BMTInterceptor.java:131)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:245)
| at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:268)
| at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:138)
| at $Proxy121.onMessage(Unknown Source)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.onMessage(JmsServerSession.java:183)
| at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
| at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
| at org.jboss.mq.SpySession.run(SpySession.java:323)
| at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:249)
| at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
| at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
| at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection.
| at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:267)
| at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
| at org.jboss.remoting.Client.invoke(Client.java:525)
| at org.jboss.remoting.Client.invoke(Client.java:488)
| at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
| at $Proxy123.publishEvents(Unknown Source)
| at com.abccorp.abcdiv.server.dc.api.impl.remote.RemoteClientEventAPI.publishEvents(RemoteClientEventAPI.java:35)
| at com.abccorp.abcdiv.dcsynchronizer.services.impl.DCSynchronizerImpl.processPendingRecords(DCSynchronizerImpl.java:427)
| ... 33 more
| Caused by: java.lang.reflect.InvocationTargetException
| at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
| at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.createClientSocket(SocketClientInvoker.java:518)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.getConnection(SocketClientInvoker.java:485)
| at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:263)
| ... 48 more
| Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:742)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1030)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:678)
| at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75)
| at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
| at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
| at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
| at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2213)
| at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2226)
| at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2694)
| at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:761)
| at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
| at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:73)
| at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:52)
| at org.jboss.remoting.transport.socket.ClientSocketWrapper.createInputStream(ClientSocketWrapper.java:83)
| at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:76)
| at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:54)
| ... 55 more
| Caused by: java.io.EOFException: SSL peer shut down incorrectly
| at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:333)
| at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:723)
| ... 71 more
|
It seems that there is a documented problem reference here:
http://www.jboss.org/?module=bb&op=viewtopic&t=90965
but I see no resolution other than 'upgrading jboss-remoting to 2.0' which appears to require a rebuild of JBoss (not an option in my current environment).
If the above issue is the cause of this problem, is there another workaround?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073696#4073696
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073696
More information about the jboss-user
mailing list