You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Yang Sun (JIRA)" <tu...@ws.apache.org> on 2007/09/24 02:17:50 UTC

[jira] Created: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

RMI Implementation Error Handling lost inner exception's detail information
---------------------------------------------------------------------------

                 Key: TUSCANY-1802
                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Java Implementation Extension
            Reporter: Yang Sun
             Fix For: Java-SCA-0.99


Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.

/--------------------------------------
Hi,

I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
-----------------------------------------------------------------------
    private Object doInvoke(Object payload) throws SpringInvocationException {
        if (theMethod == null)
            setupMethod(); 

        if (badInvoker)
            throw new SpringInvocationException("Spring invoker incorrectly configured");
        // Invoke the method on the Spring bean using the payload, returning the results 
        try {
            Object ret;

            if (payload != null && !payload.getClass().isArray()) {
                ret = theMethod.invoke(bean, payload);
            } else {
                ret = theMethod.invoke(bean, (Object[])payload);
            }
            return ret;
        } catch (InvocationTargetException e) {
            throw new SpringInvocationException(e.getMessage());
        } catch (Exception e) { 
            throw new SpringInvocationException(e.getMessage());
        }

    } // end method doInvoke
------------------------------------------------------------------------ 
When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 

The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.

I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 

Best Regards,
Yang Sun
--------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "ant elder (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ant elder updated TUSCANY-1802:
-------------------------------

    Fix Version/s:     (was: Java-SCA-0.99)
                   Java-SCA-Next

> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>             Fix For: Java-SCA-Next
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Assigned: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "Simon Laws (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws reassigned TUSCANY-1802:
-----------------------------------

    Assignee: Simon Laws  (was: Venkatakrishnan)

> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>            Assignee: Simon Laws
>             Fix For: Java-SCA-Next
>
>         Attachments: 1802.patch
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Venkatakrishnan resolved TUSCANY-1802.
--------------------------------------

    Resolution: Fixed

Patch applied in r646190.  Thanks for the patch.

> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>            Assignee: Simon Laws
>             Fix For: Java-SCA-Next
>
>         Attachments: 1802.patch
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Assigned: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng reassigned TUSCANY-1802:
-------------------------------------

    Assignee: Venkatakrishnan

> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>            Assignee: Venkatakrishnan
>             Fix For: Java-SCA-Next
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "Venkatakrishnan (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587055#action_12587055 ] 

Venkatakrishnan commented on TUSCANY-1802:
------------------------------------------

Hi Simon, I have already applied this patch locally and just waiting for a complete successful build before I check this in.  

> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>            Assignee: Simon Laws
>             Fix For: Java-SCA-Next
>
>         Attachments: 1802.patch
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "wangfeng (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

wangfeng updated TUSCANY-1802:
------------------------------

    Attachment: 1802.patch

This patch has provided the original exception when invoking the service.

Modifiy file SpringBeanNotFoundException.java,SpringInvocationException.java,SpringOperationNotFoundException.java and add the cause exception on the constructor method.
Modify file SpringInvoker.java and make the method 'setupMethod' throws an SpringInvocationException.

> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>            Assignee: Venkatakrishnan
>             Fix For: Java-SCA-Next
>
>         Attachments: 1802.patch
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "Raymond Feng (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng updated TUSCANY-1802:
----------------------------------

    Patch Info: [Patch Available]

> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>            Assignee: Venkatakrishnan
>             Fix For: Java-SCA-Next
>
>         Attachments: 1802.patch
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "gengshaoguang (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529771 ] 

gengshaoguang commented on TUSCANY-1802:
----------------------------------------

Hi,Yang,
My opinion of your request is that the "original" exception got wrapped is because of the class hierarchy, the method can not throw exception types else.

And, wrapping the exception will not prevent you from knowing the original one! Am I right?

Good Luck


> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>             Fix For: Java-SCA-0.99
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "Yang Sun (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529779 ] 

Yang Sun commented on TUSCANY-1802:
-----------------------------------

Hi, 

I don't think so. The original exception has not been wrapped. The wrapper only takes the error message.

>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException( e.getMessage());
>         } catch (Exception e) {
>             throw new SpringInvocationException(e.getMessage());
>         }

Am I right?

Regards,
Yang Sun

> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>             Fix For: Java-SCA-0.99
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Commented: (TUSCANY-1802) RMI Implementation Error Handling lost inner exception's detail information

Posted by "Simon Laws (JIRA)" <tu...@ws.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-1802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12587076#action_12587076 ] 

Simon Laws commented on TUSCANY-1802:
-------------------------------------

Great. Thanks Venkat. Sorry for the confusion. 

> RMI Implementation Error Handling lost inner exception's detail information
> ---------------------------------------------------------------------------
>
>                 Key: TUSCANY-1802
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-1802
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>            Reporter: Yang Sun
>            Assignee: Simon Laws
>             Fix For: Java-SCA-Next
>
>         Attachments: 1802.patch
>
>
> Here is an email I sent to the tuscany user group. Raymond Feng confirms it may be a potential bug. Please have a look.
> /--------------------------------------
> Hi,
> I am a new user of Tuscany and I am very excited with this great software. I am trying to introduce it into my project and currently I am evaluate it with every possible situations. 
> Currently, I met a small problem with the spring implementation. I am not sure if I understand the background and configure the composites right. Please correct me if I make anything wrong. 
> The problem I met is that I cannot get the detailed original exception when the server-side throw any kinds of exceptions. After a rough looking at the src code and debugging, I see the following code in SpringInvoker.java :
> -----------------------------------------------------------------------
>     private Object doInvoke(Object payload) throws SpringInvocationException {
>         if (theMethod == null)
>             setupMethod(); 
>         if (badInvoker)
>             throw new SpringInvocationException("Spring invoker incorrectly configured");
>         // Invoke the method on the Spring bean using the payload, returning the results 
>         try {
>             Object ret;
>             if (payload != null && !payload.getClass().isArray()) {
>                 ret = theMethod.invoke(bean, payload);
>             } else {
>                 ret = theMethod.invoke(bean, (Object[])payload);
>             }
>             return ret;
>         } catch (InvocationTargetException e) {
>             throw new SpringInvocationException(e.getMessage());
>         } catch (Exception e) { 
>             throw new SpringInvocationException(e.getMessage());
>         }
>     } // end method doInvoke
> ------------------------------------------------------------------------ 
> When the invoked method throw an exception (checked or unchecked), the program flow will go to the InvocationTargetException exception handler. Then the program only put the message of the original message to the wrapper exception SpringInvocationException. The detailed information of the original exception is missing. I am thinking it is here that will lost the detailed information of the original exception detail. 
> The reason for me to bring this question is that if we cannot get the detailed information of the original exception, how can we deal with the application exceptions (such as NotEnoughMoneyException)? The only thing I can get is the java.lang.reflect.InvocationTargetException wrapped in java.rmi.UnexpectedException. And with those information, I cannot get the right information to make the further decision in the program.
> I am not sure whether I got the right point or if I misunderstand anything. Please give me some suggestions on this problem. 
> Best Regards,
> Yang Sun
> --------------------------------------------------------------------------------/

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


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org