Hi Bernd,

How very interesting. Thanks for pointing this out. You're right, suppressStackTraces should probably also suppress the stack traces for suppressed exceptions. (Kind of funny given the names, but the word "suppress" is being used in two different senses here.)

I've filed this bug to track the issue:

https://bugs.openjdk.java.net/browse/JDK-8144968

I'm not sure if there's anything to be done about SQLWarning though.

s'marks


On 12/8/15 5:37 PM, e...@zusammenkunft.net wrote:
Hello

I noticed that RMI servers honor the sun.rmi.server.suppressStackTraces system 
property only for the
`cause` member, but not for the suppressed exception array. This seems to be 
not documented (and is most
likely not wanted?)

It looks like it does also not handle SQLWarning#getNextWarning() chains, but I 
guess this is not expected.

With suppressed remote stacks:

java.lang.Exception: suppressor
at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:276)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:253)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:162)
at 
java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:217)
at 
java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:171)
at com.sun.proxy.$Proxy0.test(Unknown Source)
at testl.RMIS.main(RMIS.java:54)
Suppressed: java.lang.RuntimeException: suppresed
at testl.RMIS$RemoteObj.test(RMIS.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)
at sun.rmi.transport.Transport$1.run(Transport.java:200)
at sun.rmi.transport.Transport$1.run(Transport.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$255(TCPTransport.java:683)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$$Lambda$1/1626415735.run(Unknown
 Source)
at java.security.AccessController.doPrivileged(Native Method)
at 
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

Greetings
Bernd

Reply via email to