You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Brian McCallister (JIRA)" <ji...@apache.org> on 2007/08/03 01:41:48 UTC

[jira] Created: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Throw Useful Exception on No TypeConverter Available
----------------------------------------------------

                 Key: CAMEL-84
                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
             Project: Apache Camel
          Issue Type: Improvement
          Components: camel-core
    Affects Versions: 1.0.0
            Reporter: Brian McCallister


When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Commented: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45981#action_45981 ] 

Hadrian Zbarcea commented on CAMEL-84:
--------------------------------------

Just committed partial fix.  This wasn't a fun one.

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 2.0.0
>
>         Attachments: camel-84.patch, camel-84_2.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Commented: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_39984 ] 

James Strachan commented on CAMEL-84:
-------------------------------------

Hadrian - I'm thinking this should be more at the runtime level rather than the java-dsl-creation of the route definition. Am also wondering about consistency. If we throw exceptions in the convertBody(Type) DSL entry, we should be consistent - should we also throw checked exceptions on the TypeConverter API too?

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.2.0
>
>         Attachments: camel-84.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Assigned: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea reassigned CAMEL-84:
------------------------------------

    Assignee: Hadrian Zbarcea  (was: Hadrian Zbarcea)

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.4.0
>
>         Attachments: camel-84.patch, camel-84_2.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Commented: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=42551#action_42551 ] 

Claus Ibsen commented on CAMEL-84:
----------------------------------

This is hard to remedy. Camel internals is used to/dependent upon that Camel silently ignores the fact that it could no convert the type and returns a null.

We have other tickets reported in JIRA for improvements to the type converter system to get
- hold of meta data so you can do context based type conversions (get access to the Exchange etc.)
- get hold of user specified encodings for conversion with bytes
- etc.



> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.4.0
>
>         Attachments: camel-84.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Commented: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45983#action_45983 ] 

Claus Ibsen commented on CAMEL-84:
----------------------------------

Hadrian great work. Yeah that was a tought job.

I think we should consider for camel 2.0 to let IntrospectionSupport throw NoTypeConversionAvailableException in the convert method.
Or since its mostly used internally we could consider adding NoTypeConversionAvailableException to the throws list.

Then we avoid wrapping this, as I don't like that when we have the NoTypeConversionAvailableException class to be thrown in these conditions.

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 2.0.0
>
>         Attachments: camel-84.patch, camel-84_2.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Resolved: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea resolved CAMEL-84.
----------------------------------

    Fix Version/s: 1.5.0
                       (was: 2.0.0)
       Resolution: Fixed

Finally...

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.5.0
>
>         Attachments: camel-84.patch, camel-84_2.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Commented: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40058 ] 

James Strachan commented on CAMEL-84:
-------------------------------------

This discussion came up on the dev list...
http://www.nabble.com/Re%3A-Some-Notes-on-Using-Camel-p12462313s22882.html

If we think there might be ambiguity between null as a conversion result and as a marker of no conversion available - then we need to use exceptions for NoTypeConversionAvailableException in the Type Conversion module - then these would just filter up in the DSL when using things like convertBody(someClass)

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.2.0
>
>         Attachments: camel-84.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Updated: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-84:
-----------------------------

    Fix Version/s: 1.4.0
                       (was: 1.3.0)

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.4.0
>
>         Attachments: camel-84.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Updated: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-84:
-----------------------------

    Attachment: camel-84_2.patch

A patch that lets the null passes through. However still plenty of unit test failures due Camel internals is used to returns null instead of thrown a exception

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.4.0
>
>         Attachments: camel-84.patch, camel-84_2.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Commented: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45990#action_45990 ] 

Hadrian Zbarcea commented on CAMEL-84:
--------------------------------------

I think I nailed it.  I committed more fixes for the failing components.  I hope I didn't miss any.  I'll check again in the morning, document the fix as it may have impact on user's processors and then we can close this.

The impact should not be significant, but could be annoying because instead of checking for null, users should change their code to catch the runtime exception NoTypeConversionAvailableException.

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 2.0.0
>
>         Attachments: camel-84.patch, camel-84_2.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Updated: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "Hadrian Zbarcea (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hadrian Zbarcea updated CAMEL-84:
---------------------------------

       Patch Info: [Patch Available]
       Attachment: camel-84.patch
    Fix Version/s: 1.2.0
         Assignee: Hadrian Zbarcea

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.2.0
>
>         Attachments: camel-84.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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


[jira] Updated: (CAMEL-84) Throw Useful Exception on No TypeConverter Available

Posted by "James Strachan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Strachan updated CAMEL-84:
--------------------------------

    Fix Version/s:     (was: 1.2.0)
                   1.3.0

> Throw Useful Exception on No TypeConverter Available
> ----------------------------------------------------
>
>                 Key: CAMEL-84
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-84
>             Project: Apache Camel
>          Issue Type: Improvement
>          Components: camel-core
>    Affects Versions: 1.0.0
>            Reporter: Brian McCallister
>            Assignee: Hadrian Zbarcea
>             Fix For: 1.3.0
>
>         Attachments: camel-84.patch
>
>
> When there is no type converter available an NPE is thrown that requires tracing through sources to find root of problem

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