You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2012/06/28 09:59:42 UTC

[jira] [Created] (CAMEL-5407) Better error message when trying to write a null body as file

Claus Ibsen created CAMEL-5407:
----------------------------------

             Summary: Better error message when trying to write a null body as file
                 Key: CAMEL-5407
                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Claus Ibsen
            Priority: Minor
             Fix For: 2.11


See nabble
http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html

We should have a better error message instead of something about no type converter exception.

We could also consider an option to the file producer, to silently ignore writing files if there is no message body.

Finding a good name for this option is a challenge 
- skipNullBody
- ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CAMEL-5407) Better error message when trying to write a null body as file

Posted by "Alan Foster (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432854#comment-13432854 ] 

Alan Foster edited comment on CAMEL-5407 at 8/13/12 9:37 AM:
-------------------------------------------------------------

I have attached the patch for this.

I added the option as 'allowNullBody', following a similar naming convention of a different component.

For documentation purposes:
Name          | Default | Description
allowNullBody | false   | Used to specify if a null body is allowed during file writing. If set to true then an empty file will be created, when set to false an a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the `fileExist` option is set to Override, then the file will be truncated, and if set to `append` it will be unchanged
                
      was (Author: alanfoster):
    My patch for this.

I added the option as 'allowNullBody', following a similar naming convention of a different component
                  
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5407) Better error message when trying to write a null body as file

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

Claus Ibsen updated CAMEL-5407:
-------------------------------

          Component/s: camel-ftp
    Affects Version/s: 2.10.0
        Fix Version/s: 2.10.1

Added allowNullBody option to camel-ftp as well. And backported to 2.10 branch.
                
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-ftp
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.10.1, 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CAMEL-5407) Better error message when trying to write a null body as file

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

Willem Jiang reassigned CAMEL-5407:
-----------------------------------

    Assignee: Willem Jiang
    
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5407) Better error message when trying to write a null body as file

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

Claus Ibsen commented on CAMEL-5407:
------------------------------------

This need to work for the ftp components as well as they are built on top of the file stuff. So we should try to ensure they are in sync.
                
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CAMEL-5407) Better error message when trying to write a null body as file

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

Willem Jiang resolved CAMEL-5407.
---------------------------------

    Resolution: Fixed
    
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CAMEL-5407) Better error message when trying to write a null body as file

Posted by "Alan Foster (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432854#comment-13432854 ] 

Alan Foster edited comment on CAMEL-5407 at 8/13/12 9:46 AM:
-------------------------------------------------------------

I have attached the patch for this, including some tests.

I added the option as 'allowNullBody', following a similar naming convention of a different component.

For documentation purposes:
Name          | Default | Description
allowNullBody | false   | Used to specify if a null body is allowed during file writing. If set to true then an empty file will be created, when set to false, and attempting to send a null body to the file component, a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the `fileExist` option is set to 'Override', then the file will be truncated, and if set to `append` the file will remain unchanged

I appreciate any feedback for my first patch! :)
                
      was (Author: alanfoster):
    I have attached the patch for this, including some tests.

I added the option as 'allowNullBody', following a similar naming convention of a different component.

For documentation purposes:
Name          | Default | Description
allowNullBody | false   | Used to specify if a null body is allowed during file writing. If set to true then an empty file will be created, when set to false an a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the `fileExist` option is set to Override, then the file will be truncated, and if set to `append` it will be unchanged

I appreciate any feedback for my first patch! :)
                  
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5407) Better error message when trying to write a null body as file

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432983#comment-13432983 ] 

Willem Jiang commented on CAMEL-5407:
-------------------------------------

Applied the patch with thanks to Alan, I also fix some CS errors of the patch and updated the File2 wiki page.
                
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CAMEL-5407) Better error message when trying to write a null body as file

Posted by "Alan Foster (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13432854#comment-13432854 ] 

Alan Foster edited comment on CAMEL-5407 at 8/13/12 9:38 AM:
-------------------------------------------------------------

I have attached the patch for this, including some tests.

I added the option as 'allowNullBody', following a similar naming convention of a different component.

For documentation purposes:
Name          | Default | Description
allowNullBody | false   | Used to specify if a null body is allowed during file writing. If set to true then an empty file will be created, when set to false an a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the `fileExist` option is set to Override, then the file will be truncated, and if set to `append` it will be unchanged

I appreciate any feedback for my first patch! :)
                
      was (Author: alanfoster):
    I have attached the patch for this.

I added the option as 'allowNullBody', following a similar naming convention of a different component.

For documentation purposes:
Name          | Default | Description
allowNullBody | false   | Used to specify if a null body is allowed during file writing. If set to true then an empty file will be created, when set to false an a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the `fileExist` option is set to Override, then the file will be truncated, and if set to `append` it will be unchanged
                  
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-5407) Better error message when trying to write a null body as file

Posted by "Alan Foster (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-5407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435923#comment-13435923 ] 

Alan Foster commented on CAMEL-5407:
------------------------------------

@ClausIbsen

Thanks for this; I had completely forgotten to look into adding the allowNullBody option to the camel-ftp component too, sorry about that!
                
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core, camel-ftp
>    Affects Versions: 2.10.0
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.10.1, 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAMEL-5407) Better error message when trying to write a null body as file

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

Alan Foster updated CAMEL-5407:
-------------------------------

    Attachment: fileAllowNullBody.patch

My patch for this.

I added the option as 'allowNullBody', following a similar naming convention of a different component
                
> Better error message when trying to write a null body as file
> -------------------------------------------------------------
>
>                 Key: CAMEL-5407
>                 URL: https://issues.apache.org/jira/browse/CAMEL-5407
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.11.0
>
>         Attachments: fileAllowNullBody.patch
>
>
> See nabble
> http://camel.465427.n5.nabble.com/Can-t-route-wsdl-request-into-file-tp5715201.html
> We should have a better error message instead of something about no type converter exception.
> We could also consider an option to the file producer, to silently ignore writing files if there is no message body.
> Finding a good name for this option is a challenge 
> - skipNullBody
> - ignoreWritingNullBody

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira