You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "tomas darbois (JIRA)" <de...@tuscany.apache.org> on 2008/08/12 17:02:46 UTC

[jira] Created: (TUSCANY-2545) Exception and RMI binding : propagating an exception.

Exception and RMI binding :  propagating an exception.
------------------------------------------------------

                 Key: TUSCANY-2545
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2545
             Project: Tuscany
          Issue Type: Bug
    Affects Versions: Java-SCA-1.3
         Environment: Windows 2000; JDK 1.6_05 or JDK 1.5_015, Maven 2.0.9
            Reporter: tomas darbois


Let's say we have a Calculator.

The client connects through SCA and binding RMI to the calculator. The calculator connects to the "divider"  through SCA and binding RMI.

The divider raise a ZeroException (an exception that is declared as being thrown by divide method, exception known only by Calculator and Divider ) he found that he has the divisor = 0 and didn't try to do the computation and instead throws this exception.

Calculator catches the exception and raise a new exception ServiceFatalException known by Client and Calculator (code = << throw new ServiceFatalException( "A string message", e); >>     where e is the ZeroException that has been caught).

Client is trying to catch the exception ServiceFatalException.

This architecture is failing because the RMI binding in client part tries to find the class "ZeroException" that is not defined in that environment. 

In case we add in the classpath the class ZeroException, he successfully recovers a ServiceFatalException.

I'm joining an example containing the 3 elements (the 2 standalone server and the client).



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TUSCANY-2545) Exception and RMI binding : propagating an exception.

Posted by "tomas darbois (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2545?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

tomas darbois updated TUSCANY-2545:
-----------------------------------

    Attachment: calculator-exception.rar

Here is the example and the exception seen from the client : 

3 + 2=5.0
3 - 2=1.0
3 * 2=6.0
3 / 2=1.5
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
	at $Proxy7.divide(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tuscany.sca.binding.rmi.RMIReferenceInvoker.invokeTarget(RMIReferenceInvoker.java:79)
	at org.apache.tuscany.sca.binding.rmi.RMIReferenceInvoker.invoke(RMIReferenceInvoker.java:56)
	at org.apache.tuscany.sca.extension.helper.impl.InvokerProxy.invoke(BindingsActivator.java:256)
	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:112)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
	at $Proxy6.divide(Unknown Source)
	at calculator.ClientServiceImpl.divide(ClientServiceImpl.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)
	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
	at $Proxy5.divide(Unknown Source)
	at calculator.CalculatorClient.main(CalculatorClient.java:39)
Caused by: java.rmi.UnexpectedException: unexpected exception; nested exception is: 
	java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
	java.lang.ClassNotFoundException: calculator.ZeroException (no security manager: RMI class loader disabled)
	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
	at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
	... 23 more
Caused by: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
	java.lang.ClassNotFoundException: calculator.ZeroException (no security manager: RMI class loader disabled)
	at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
	at sun.rmi.server.UnicastRef.invoke(Unknown Source)
	... 25 more
Caused by: java.lang.ClassNotFoundException: calculator.ZeroException (no security manager: RMI class loader disabled)
	at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
	at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
	at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
	at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
	at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	... 27 more


> Exception and RMI binding :  propagating an exception.
> ------------------------------------------------------
>
>                 Key: TUSCANY-2545
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2545
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>         Environment: Windows 2000; JDK 1.6_05 or JDK 1.5_015, Maven 2.0.9
>            Reporter: tomas darbois
>         Attachments: calculator-exception.rar
>
>
> Let's say we have a Calculator.
> The client connects through SCA and binding RMI to the calculator. The calculator connects to the "divider"  through SCA and binding RMI.
> The divider raise a ZeroException (an exception that is declared as being thrown by divide method, exception known only by Calculator and Divider ) he found that he has the divisor = 0 and didn't try to do the computation and instead throws this exception.
> Calculator catches the exception and raise a new exception ServiceFatalException known by Client and Calculator (code = << throw new ServiceFatalException( "A string message", e); >>     where e is the ZeroException that has been caught).
> Client is trying to catch the exception ServiceFatalException.
> This architecture is failing because the RMI binding in client part tries to find the class "ZeroException" that is not defined in that environment. 
> In case we add in the classpath the class ZeroException, he successfully recovers a ServiceFatalException.
> I'm joining an example containing the 3 elements (the 2 standalone server and the client).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (TUSCANY-2545) Exception and RMI binding : propagating an exception.

Posted by "tomas darbois (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621846#action_12621846 ] 

darboistom edited comment on TUSCANY-2545 at 8/12/08 8:28 AM:
-----------------------------------------------------------------

Here is the example (based on the samples : calculator-rmi-service and calculator-rmi-references) and the exception seen from the client : 

3 + 2=5.0
3 - 2=1.0
3 * 2=6.0
3 / 2=1.5
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
	at $Proxy7.divide(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tuscany.sca.binding.rmi.RMIReferenceInvoker.invokeTarget(RMIReferenceInvoker.java:79)
	at org.apache.tuscany.sca.binding.rmi.RMIReferenceInvoker.invoke(RMIReferenceInvoker.java:56)
	at org.apache.tuscany.sca.extension.helper.impl.InvokerProxy.invoke(BindingsActivator.java:256)
	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:112)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
	at $Proxy6.divide(Unknown Source)
	at calculator.ClientServiceImpl.divide(ClientServiceImpl.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)
	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
	at $Proxy5.divide(Unknown Source)
	at calculator.CalculatorClient.main(CalculatorClient.java:39)
Caused by: java.rmi.UnexpectedException: unexpected exception; nested exception is: 
	java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
	java.lang.ClassNotFoundException: calculator.ZeroException (no security manager: RMI class loader disabled)
	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
	at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
	... 23 more
Caused by: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
	java.lang.ClassNotFoundException: calculator.ZeroException (no security manager: RMI class loader disabled)
	at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
	at sun.rmi.server.UnicastRef.invoke(Unknown Source)
	... 25 more
Caused by: java.lang.ClassNotFoundException: calculator.ZeroException (no security manager: RMI class loader disabled)
	at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
	at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
	at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
	at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
	at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	... 27 more


      was (Author: darboistom):
    Here is the example and the exception seen from the client : 

3 + 2=5.0
3 - 2=1.0
3 * 2=6.0
3 / 2=1.5
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
	at $Proxy7.divide(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tuscany.sca.binding.rmi.RMIReferenceInvoker.invokeTarget(RMIReferenceInvoker.java:79)
	at org.apache.tuscany.sca.binding.rmi.RMIReferenceInvoker.invoke(RMIReferenceInvoker.java:56)
	at org.apache.tuscany.sca.extension.helper.impl.InvokerProxy.invoke(BindingsActivator.java:256)
	at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(PassByValueInterceptor.java:112)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
	at $Proxy6.divide(Unknown Source)
	at calculator.ClientServiceImpl.divide(ClientServiceImpl.java:41)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementationInvoker.invoke(JavaImplementationInvoker.java:132)
	at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(SCABindingInvoker.java:61)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:287)
	at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JDKInvocationHandler.java:154)
	at $Proxy5.divide(Unknown Source)
	at calculator.CalculatorClient.main(CalculatorClient.java:39)
Caused by: java.rmi.UnexpectedException: unexpected exception; nested exception is: 
	java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
	java.lang.ClassNotFoundException: calculator.ZeroException (no security manager: RMI class loader disabled)
	at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
	at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
	... 23 more
Caused by: java.rmi.UnmarshalException: Error unmarshaling return; nested exception is: 
	java.lang.ClassNotFoundException: calculator.ZeroException (no security manager: RMI class loader disabled)
	at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
	at sun.rmi.server.UnicastRef.invoke(Unknown Source)
	... 25 more
Caused by: java.lang.ClassNotFoundException: calculator.ZeroException (no security manager: RMI class loader disabled)
	at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
	at sun.rmi.server.LoaderHandler.loadClass(Unknown Source)
	at java.rmi.server.RMIClassLoader$2.loadClass(Unknown Source)
	at java.rmi.server.RMIClassLoader.loadClass(Unknown Source)
	at sun.rmi.server.MarshalInputStream.resolveClass(Unknown Source)
	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
	at java.io.ObjectInputStream.readSerialData(Unknown Source)
	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
	at java.io.ObjectInputStream.readObject0(Unknown Source)
	at java.io.ObjectInputStream.readObject(Unknown Source)
	... 27 more

  
> Exception and RMI binding :  propagating an exception.
> ------------------------------------------------------
>
>                 Key: TUSCANY-2545
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2545
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>         Environment: Windows 2000; JDK 1.6_05 or JDK 1.5_015, Maven 2.0.9
>            Reporter: tomas darbois
>         Attachments: calculator-exception.rar
>
>
> Let's say we have a Calculator.
> The client connects through SCA and binding RMI to the calculator. The calculator connects to the "divider"  through SCA and binding RMI.
> The divider raise a ZeroException (an exception that is declared as being thrown by divide method, exception known only by Calculator and Divider ) he found that he has the divisor = 0 and didn't try to do the computation and instead throws this exception.
> Calculator catches the exception and raise a new exception ServiceFatalException known by Client and Calculator (code = << throw new ServiceFatalException( "A string message", e); >>     where e is the ZeroException that has been caught).
> Client is trying to catch the exception ServiceFatalException.
> This architecture is failing because the RMI binding in client part tries to find the class "ZeroException" that is not defined in that environment. 
> In case we add in the classpath the class ZeroException, he successfully recovers a ServiceFatalException.
> I'm joining an example containing the 3 elements (the 2 standalone server and the client).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-2545) Exception and RMI binding : propagating an exception.

Posted by "ant elder (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625672#action_12625672 ] 

ant elder commented on TUSCANY-2545:
------------------------------------

Thanks for attaching all your test code to recreate this.

I'm not sure what we should do to fix this in the Tuscany code. ServiceFatalException is part of the service interface contract but ServiceFatalException has a constructor that can include a generic Throwable object so that Throwable may or may not be an exception thats part of the service interface contract. I'm tempted to say the application should just be coded to not do that, but it seems like it would be quite a common thing to happen so maybe Tuscany should try to deal with it. I've committed a change in r689002 so that the cause object of an exception is not returned by an RMI service, not 100% convinced this is the best approach but committing to trunk to get feedback.

Can you try this using the latest trunk code?

> Exception and RMI binding :  propagating an exception.
> ------------------------------------------------------
>
>                 Key: TUSCANY-2545
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2545
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>         Environment: Windows 2000; JDK 1.6_05 or JDK 1.5_015, Maven 2.0.9
>            Reporter: tomas darbois
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator-exception.rar
>
>
> Let's say we have a Calculator.
> The client connects through SCA and binding RMI to the calculator. The calculator connects to the "divider"  through SCA and binding RMI.
> The divider raise a ZeroException (an exception that is declared as being thrown by divide method, exception known only by Calculator and Divider ) he found that he has the divisor = 0 and didn't try to do the computation and instead throws this exception.
> Calculator catches the exception and raise a new exception ServiceFatalException known by Client and Calculator (code = << throw new ServiceFatalException( "A string message", e); >>     where e is the ZeroException that has been caught).
> Client is trying to catch the exception ServiceFatalException.
> This architecture is failing because the RMI binding in client part tries to find the class "ZeroException" that is not defined in that environment. 
> In case we add in the classpath the class ZeroException, he successfully recovers a ServiceFatalException.
> I'm joining an example containing the 3 elements (the 2 standalone server and the client).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-2545) Exception and RMI binding : propagating an exception.

Posted by "ant elder (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628616#action_12628616 ] 

ant elder commented on TUSCANY-2545:
------------------------------------

I've tested this using the sample code you've attached to this jira and running that with the latest trunk code, the ZeroException is not included in the cause any more and the client completes ok.

What happens for you and are you using the latest trunk code?


> Exception and RMI binding :  propagating an exception.
> ------------------------------------------------------
>
>                 Key: TUSCANY-2545
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2545
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>         Environment: Windows 2000; JDK 1.6_05 or JDK 1.5_015, Maven 2.0.9
>            Reporter: tomas darbois
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator-exception.rar
>
>
> Let's say we have a Calculator.
> The client connects through SCA and binding RMI to the calculator. The calculator connects to the "divider"  through SCA and binding RMI.
> The divider raise a ZeroException (an exception that is declared as being thrown by divide method, exception known only by Calculator and Divider ) he found that he has the divisor = 0 and didn't try to do the computation and instead throws this exception.
> Calculator catches the exception and raise a new exception ServiceFatalException known by Client and Calculator (code = << throw new ServiceFatalException( "A string message", e); >>     where e is the ZeroException that has been caught).
> Client is trying to catch the exception ServiceFatalException.
> This architecture is failing because the RMI binding in client part tries to find the class "ZeroException" that is not defined in that environment. 
> In case we add in the classpath the class ZeroException, he successfully recovers a ServiceFatalException.
> I'm joining an example containing the 3 elements (the 2 standalone server and the client).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-2545) Exception and RMI binding : propagating an exception.

Posted by "tomas darbois (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12628603#action_12628603 ] 

tomas darbois commented on TUSCANY-2545:
----------------------------------------

It doesn't seem to do the trick.

It s failing in the recovering of the return from the reference.

> Exception and RMI binding :  propagating an exception.
> ------------------------------------------------------
>
>                 Key: TUSCANY-2545
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2545
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>         Environment: Windows 2000; JDK 1.6_05 or JDK 1.5_015, Maven 2.0.9
>            Reporter: tomas darbois
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator-exception.rar
>
>
> Let's say we have a Calculator.
> The client connects through SCA and binding RMI to the calculator. The calculator connects to the "divider"  through SCA and binding RMI.
> The divider raise a ZeroException (an exception that is declared as being thrown by divide method, exception known only by Calculator and Divider ) he found that he has the divisor = 0 and didn't try to do the computation and instead throws this exception.
> Calculator catches the exception and raise a new exception ServiceFatalException known by Client and Calculator (code = << throw new ServiceFatalException( "A string message", e); >>     where e is the ZeroException that has been caught).
> Client is trying to catch the exception ServiceFatalException.
> This architecture is failing because the RMI binding in client part tries to find the class "ZeroException" that is not defined in that environment. 
> In case we add in the classpath the class ZeroException, he successfully recovers a ServiceFatalException.
> I'm joining an example containing the 3 elements (the 2 standalone server and the client).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-2545) Exception and RMI binding : propagating an exception.

Posted by "tomas darbois (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-2545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625334#action_12625334 ] 

tomas darbois commented on TUSCANY-2545:
----------------------------------------

Perhaps this is not an issue, in Tuscany point of view, can we have an update on the matter from one dev. 

There are workarounds for users, but the usual way to handle exception doesn't work. :) 

> Exception and RMI binding :  propagating an exception.
> ------------------------------------------------------
>
>                 Key: TUSCANY-2545
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2545
>             Project: Tuscany
>          Issue Type: Bug
>    Affects Versions: Java-SCA-1.3
>         Environment: Windows 2000; JDK 1.6_05 or JDK 1.5_015, Maven 2.0.9
>            Reporter: tomas darbois
>             Fix For: Java-SCA-Next
>
>         Attachments: calculator-exception.rar
>
>
> Let's say we have a Calculator.
> The client connects through SCA and binding RMI to the calculator. The calculator connects to the "divider"  through SCA and binding RMI.
> The divider raise a ZeroException (an exception that is declared as being thrown by divide method, exception known only by Calculator and Divider ) he found that he has the divisor = 0 and didn't try to do the computation and instead throws this exception.
> Calculator catches the exception and raise a new exception ServiceFatalException known by Client and Calculator (code = << throw new ServiceFatalException( "A string message", e); >>     where e is the ZeroException that has been caught).
> Client is trying to catch the exception ServiceFatalException.
> This architecture is failing because the RMI binding in client part tries to find the class "ZeroException" that is not defined in that environment. 
> In case we add in the classpath the class ZeroException, he successfully recovers a ServiceFatalException.
> I'm joining an example containing the 3 elements (the 2 standalone server and the client).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.