[ 
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.

Reply via email to