[JBossCache] - JGroups: Problem with rebooting peers
by mrkmrk
Hi
I'm really sure if this is the right place to ask. I could not find any specific JGroups forums.
However, let me know if there is a more suitable place.
We're using JGroups 2.4.1 sp3 in a JBoss 4.0.2. We're using JGroups to send messages between the various servers. It works fine.
We have one problem, though. When one of the destination servers reboots, the first message from the sender server fails. The log on the sender server says: ""2nd attempt to send data failed too". By adding some logging in BasicConnectionTable we've found that a "Socket Closed" occurs. The code in _send(byte[] data, int offset, int length) tries once, catches the IOException and tries again the same closed connection, then giving the "2nd.." message.
| private void _send(byte[] data, int offset, int length) {
| synchronized(send_mutex) {
| try {
| doSend(data, offset, length);
| updateLastAccessed();
| }
| catch(IOException io_ex) {
| if(log.isWarnEnabled())
| log.warn("peer closed connection, trying to re-send msg");
| try {
| doSend(data, offset, length);
| updateLastAccessed();
| }
| catch(IOException io_ex2) {
| if(log.isErrorEnabled()) log.error("2nd attempt to send data failed too");
| }
| catch(Exception ex2) {
| if(log.isErrorEnabled()) log.error("exception is " + ex2);
| }
| }
| catch(InterruptedException iex) {}
| catch(Throwable ex) {
| if(log.isErrorEnabled()) log.error("exception is " + ex);
| }
| }
| }
|
We really don't want to loose that message.
Have I missed something? Is there something I can do?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059067#4059067
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059067
18Â years, 9Â months
[JBoss jBPM] - hibernate exception not hidden from ejb client
by gogoasa
Hello,
I use the remote ejb/CommandServiceBean ejb in order to query an enterprise (EJB) jBPM deployment.
The EJB client only depends on the jBPM jar (for the various Command implementations) and on the JBoss client jar. If a Hibernate exceptin occurs, it is wrapped by a JBPMException and rethrown. When deserialiezed on the client side (which does not have a Hibernate dependency), a ClassNotFoundException occurs.
Here is the exception handling code in the EJB :
catch (Exception e) {
| throw new JbpmException("couldn't execute "+command, e);
| }
I think the CommandServiceBean should not wrap internal implementation-specific exceptions; it should instead simply copy the stack trace and throw a new implementation-independent exception which contains the exception trace without containing the causes themselves. That typically avoids ClassNotFoundExceptions without losing exception history.
| java.lang.reflect.UndeclaredThrowableException
| at $Proxy1.execute(Unknown Source)
| at fr.bnf.jbpm.client.GetInvalidDocumentsTest.testExecute(GetInvalidDocumentsTest.java:27)
| 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 junit.framework.TestCase.runTest(TestCase.java:164)
| at junit.framework.TestCase.runBare(TestCase.java:130)
| at junit.framework.TestResult$1.protect(TestResult.java:106)
| at junit.framework.TestResult.runProtected(TestResult.java:124)
| at junit.framework.TestResult.run(TestResult.java:109)
| at junit.framework.TestCase.run(TestCase.java:120)
| at junit.framework.TestSuite.runTest(TestSuite.java:230)
| at junit.framework.TestSuite.run(TestSuite.java:225)
| at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
| Caused by: java.lang.ClassNotFoundException: org.hibernate.collection.PersistentMap (no security manager: RMI class loader disabled)
| at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:371)
| at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
| at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
| at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
| at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
| at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1544)
| at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1466)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1699)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1908)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1832)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at java.util.ArrayList.readObject(ArrayList.java:591)
| 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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:946)
| at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1809)
| at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1719)
| at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1305)
| at java.io.ObjectInputStream.readObject(ObjectInputStream.java:348)
| at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
| at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:134)
| at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
| at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
| at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
| at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
| at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
| ... 20 more
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059066#4059066
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059066
18Â years, 9Â months