You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Lisa Penninger (JIRA)" <ji...@apache.org> on 2009/01/12 22:46:00 UTC

[jira] Created: (CXF-1972) cannot send MTOM attachment over 64K when server schema validation on

cannot send MTOM attachment over 64K when server schema validation on
---------------------------------------------------------------------

                 Key: CXF-1972
                 URL: https://issues.apache.org/jira/browse/CXF-1972
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.1.3
         Environment: RedHat Linux 2.6.9-42.ELsmp
            Reporter: Lisa Penninger


I'm using MTOM with CXF 2.1.3 to send an attachment to the server, with validation turned on in the server.  Everything is working fine, as long as the attachment data is 64K or less.  One byte over 64K, and the stream returned by getDataSource().getInputStream() is empty.  The stream is created okay with all the data, but in DocLiteralInInterceptor.handleMessage it eventually calls Base64Data.get, which does a close on the stream.  This is only a problem if the stream is a FileInputStream, which it will be if the data is over 64K, and this particular codepath is only taken if validation is turned on.  I've been able to reproduce this with the mtom sample code.  I will attach my changes to Server.java to turn on validation, and the stack trace showing where the problem occurs.

Thanks, Lisa

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


[jira] Commented: (CXF-1972) cannot send MTOM attachment over 64K when server schema validation on

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663358#action_12663358 ] 

Daniel Kulp commented on CXF-1972:
----------------------------------


This is a JAXB bug..    I've logged a bug with them:
https://jaxb.dev.java.net/issues/show_bug.cgi?id=588

Feel free to vote for it there.


> cannot send MTOM attachment over 64K when server schema validation on
> ---------------------------------------------------------------------
>
>                 Key: CXF-1972
>                 URL: https://issues.apache.org/jira/browse/CXF-1972
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>         Environment: RedHat Linux 2.6.9-42.ELsmp
>            Reporter: Lisa Penninger
>         Attachments: Server.java, stack.txt
>
>
> I'm using MTOM with CXF 2.1.3 to send an attachment to the server, with validation turned on in the server.  Everything is working fine, as long as the attachment data is 64K or less.  One byte over 64K, and the stream returned by getDataSource().getInputStream() is empty.  The stream is created okay with all the data, but in DocLiteralInInterceptor.handleMessage it eventually calls Base64Data.get, which does a close on the stream.  This is only a problem if the stream is a FileInputStream, which it will be if the data is over 64K, and this particular codepath is only taken if validation is turned on.  I've been able to reproduce this with the mtom sample code.  I will attach my changes to Server.java to turn on validation, and the stack trace showing where the problem occurs.
> Thanks, Lisa

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


[jira] Updated: (CXF-1972) cannot send MTOM attachment over 64K when server schema validation on

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

Lisa Penninger updated CXF-1972:
--------------------------------

    Attachment: Server.java

Changes to mtom sample code to reproduce issue.  Only change is to turn on validation.

> cannot send MTOM attachment over 64K when server schema validation on
> ---------------------------------------------------------------------
>
>                 Key: CXF-1972
>                 URL: https://issues.apache.org/jira/browse/CXF-1972
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>         Environment: RedHat Linux 2.6.9-42.ELsmp
>            Reporter: Lisa Penninger
>         Attachments: Server.java, stack.txt
>
>
> I'm using MTOM with CXF 2.1.3 to send an attachment to the server, with validation turned on in the server.  Everything is working fine, as long as the attachment data is 64K or less.  One byte over 64K, and the stream returned by getDataSource().getInputStream() is empty.  The stream is created okay with all the data, but in DocLiteralInInterceptor.handleMessage it eventually calls Base64Data.get, which does a close on the stream.  This is only a problem if the stream is a FileInputStream, which it will be if the data is over 64K, and this particular codepath is only taken if validation is turned on.  I've been able to reproduce this with the mtom sample code.  I will attach my changes to Server.java to turn on validation, and the stack trace showing where the problem occurs.
> Thanks, Lisa

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


[jira] Resolved: (CXF-1972) cannot send MTOM attachment over 64K when server schema validation on

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

Daniel Kulp resolved CXF-1972.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.3
                   2.1.6
         Assignee: Daniel Kulp


Implemented a workaround to lock the attachments and cache them.

> cannot send MTOM attachment over 64K when server schema validation on
> ---------------------------------------------------------------------
>
>                 Key: CXF-1972
>                 URL: https://issues.apache.org/jira/browse/CXF-1972
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>         Environment: RedHat Linux 2.6.9-42.ELsmp
>            Reporter: Lisa Penninger
>            Assignee: Daniel Kulp
>             Fix For: 2.1.6, 2.2.3
>
>         Attachments: Server.java, stack.txt
>
>
> I'm using MTOM with CXF 2.1.3 to send an attachment to the server, with validation turned on in the server.  Everything is working fine, as long as the attachment data is 64K or less.  One byte over 64K, and the stream returned by getDataSource().getInputStream() is empty.  The stream is created okay with all the data, but in DocLiteralInInterceptor.handleMessage it eventually calls Base64Data.get, which does a close on the stream.  This is only a problem if the stream is a FileInputStream, which it will be if the data is over 64K, and this particular codepath is only taken if validation is turned on.  I've been able to reproduce this with the mtom sample code.  I will attach my changes to Server.java to turn on validation, and the stack trace showing where the problem occurs.
> Thanks, Lisa

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


[jira] Commented: (CXF-1972) cannot send MTOM attachment over 64K when server schema validation on

Posted by "Lisa Penninger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-1972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12663995#action_12663995 ] 

Lisa Penninger commented on CXF-1972:
-------------------------------------

I would have titled the JAXB bug something more like "Data loss with validation and MTOM/attachments".  The current title sounds much too harmless.

> cannot send MTOM attachment over 64K when server schema validation on
> ---------------------------------------------------------------------
>
>                 Key: CXF-1972
>                 URL: https://issues.apache.org/jira/browse/CXF-1972
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>         Environment: RedHat Linux 2.6.9-42.ELsmp
>            Reporter: Lisa Penninger
>         Attachments: Server.java, stack.txt
>
>
> I'm using MTOM with CXF 2.1.3 to send an attachment to the server, with validation turned on in the server.  Everything is working fine, as long as the attachment data is 64K or less.  One byte over 64K, and the stream returned by getDataSource().getInputStream() is empty.  The stream is created okay with all the data, but in DocLiteralInInterceptor.handleMessage it eventually calls Base64Data.get, which does a close on the stream.  This is only a problem if the stream is a FileInputStream, which it will be if the data is over 64K, and this particular codepath is only taken if validation is turned on.  I've been able to reproduce this with the mtom sample code.  I will attach my changes to Server.java to turn on validation, and the stack trace showing where the problem occurs.
> Thanks, Lisa

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


[jira] Updated: (CXF-1972) cannot send MTOM attachment over 64K when server schema validation on

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

Lisa Penninger updated CXF-1972:
--------------------------------

    Attachment: stack.txt

This is the point where the stream is closed, and the data is lost.

> cannot send MTOM attachment over 64K when server schema validation on
> ---------------------------------------------------------------------
>
>                 Key: CXF-1972
>                 URL: https://issues.apache.org/jira/browse/CXF-1972
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>         Environment: RedHat Linux 2.6.9-42.ELsmp
>            Reporter: Lisa Penninger
>         Attachments: stack.txt
>
>
> I'm using MTOM with CXF 2.1.3 to send an attachment to the server, with validation turned on in the server.  Everything is working fine, as long as the attachment data is 64K or less.  One byte over 64K, and the stream returned by getDataSource().getInputStream() is empty.  The stream is created okay with all the data, but in DocLiteralInInterceptor.handleMessage it eventually calls Base64Data.get, which does a close on the stream.  This is only a problem if the stream is a FileInputStream, which it will be if the data is over 64K, and this particular codepath is only taken if validation is turned on.  I've been able to reproduce this with the mtom sample code.  I will attach my changes to Server.java to turn on validation, and the stack trace showing where the problem occurs.
> Thanks, Lisa

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