12 Replies Latest reply on Mar 20, 2009 2:17 AM by (JMW)

    Problem inserting/extracting attachments

      I have two LC sevices. One renders pdf forms using data, including attachments, from a DB. Once the user has updated such a form, it gets submitted to the other service. This one extracts the data, including attachments, and updates the DB. Basically the DB contains a bunch of identifiable objects which are accessible to the user through pdf forms.

       

      When a user adds an attachment, or several, in Adobe Reader and submits the form to the second service, it works just fine. Rendering this particular object to pdf again also works fine.?? The attachments added in the previous "step" are included in the form and can be opened in Adobe Reader.

       

      Problem:When a form contains attachments that have been added by our first service, some of them won't be extracted correctly and thus cannot be saved back into the DB. Mysteriously some attacments work just fine, even though all of them were added in the same way to the very same pdf form. In one case I have four jpg's attached to a form, 2 of which work and 2that don't.

       

      Looking att the list var that contins tha extracted attachments I see that the ones that don't work look like this:...

       

      and that's it. a single line. The ones that do work are much longer of course.

       

      Even the ones that don't work can be opened just fine from Reader prior to being submitted to the service. In Reader, the only way to distinguish the attachments added by our first service is that they have timesamps in the description field.

       

      Best Regards,

      JMV

       

        • 1. Re: Problem inserting/extracting attachments
          Level 1
          Anyone?<br /><br />Some more info. This is what the Attachments map var looks like before it is submitted to the renderPDFForm operation of the FormsService.<br /><br />Linebreaks and indentation added by me for clarity:<br /><br />[PID:-1] /process_data/attachmentsMap - Map: java.util.HashMap:       Number of elements :3<br />{<br />Winter.jpg-><br /><document state="active" senderVersion="0" <br />persistent="false" senderPersistent="false" <br />passivated="false" senderPassivated="false" deserialized="false" <br />senderHostId="null" callbackId="0" <br />senderCallbackId="0" callbackRef="null" <br />isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" <br />disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" <br />inlineSize="0" contentType="application/octet-stream" length="-1"><br />     <cacheId/><br />     <localBackendId/><br />     <globalBackendId/><br />     <senderLocalBackendId/><br />     <senderGlobalBackendId/><br />     <inline/><br />     <senderPullServantJndiName/><br />     <attributes <br />  wsfilename="e:\Attachments\142\A52F75F5-33F0-47AA-8604-C5E4EEE443B7" <br />  basename="A52F75F5-33F0-47AA-8604-C5E4EEE443B7" <br />  file="e:\Attachments\142\A52F75F5-33F0-47AA-8604-C5E4EEE443B7"/><br /></document><br /><br />Water lilies.jpg-><br /><document state="active" senderVersion="0" <br />persistent="false" senderPersistent="false" <br />passivated="false" senderPassivated="false" deserialized="false" <br />senderHostId="null" callbackId="0" <br />senderCallbackId="0" callbackRef="null" <br />isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" <br />disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" <br />inlineSize="0" contentType="application/octet-stream" length="-1"><br />     <cacheId/><br />     <localBackendId/><br />     <globalBackendId/><br />     <senderLocalBackendId/><br />     <senderGlobalBackendId/><br />     <inline/><br />     <senderPullServantJndiName/><br />     <attributes <br />  wsfilename="e:\Attachments\142\682D94C2-A6DB-46FB-A669-AF241ED011B5" <br />  basename="682D94C2-A6DB-46FB-A669-AF241ED011B5" <br />  file="e:\Attachments\142\682D94C2-A6DB-46FB-A669-AF241ED011B5"/><br /></document><br /><br />Sunset.jpg-><br /><document state="active" senderVersion="0" <br />persistent="false" senderPersistent="false" <br />passivated="false" senderPassivated="false" deserialized="false" <br />senderHostId="null" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" <br />isTransactionBound="false" defaultDisposalTimeout="600" <br />disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" <br />inlineSize="0" contentType="application/octet-stream" length="-1"><br />     <cacheId/><br />     <localBackendId/><br />     <globalBackendId/><br />     <senderLocalBackendId/><br />     <senderGlobalBackendId/><br />     <inline/><br />     <senderPullServantJndiName/><br />     <attributes <br />  wsfilename="e:\Attachments\142\FC553C65-3036-4660-9514-1C3BC274D6BF" <br />  basename="FC553C65-3036-4660-9514-1C3BC274D6BF" <br />  file="e:\Attachments\142\FC553C65-3036-4660-9514-1C3BC274D6BF"/><br /></document><br />}
          • 2. Re: Problem inserting/extracting attachments
            Level 1
            When i open the resulting pdf in Reader, all the attachments work just fine. I then add a fourth attachment, "Blue hills.jpg" in Reader and submit the form to our second service using a watched folder.<br /><br />This is what the attachments list var looks like after being extracted using the processFormSubmission service operation of the FormsService.<br /><br />Linebreaks and indentation added by me for clarity: <br /><br />[PID:-1] /process_data/attachmentsList - List: java.util.ArrayList:       Number of elements :4<br />{<br />1:<br /><document state="passive" senderVersion="0" persistent="false" <br /> senderPersistent="false" passivated="true" senderPassivated="false" <br /> deserialized="false" senderHostId="null" callbackId="0" <br /> senderCallbackId="0" callbackRef="null" isLocalizable="true" <br /> isTransactionBound="false" defaultDisposalTimeout="600" <br /> disposalTimeout="600" maxInlineSize="65536" <br /> defaultMaxInlineSize="65536" inlineSize="28521" <br /> contentType="null" length="-1"><br />     <cacheId/><br />     <localBackendId/><br />     <globalBackendId/><br />     <senderLocalBackendId/><br />     <senderGlobalBackendId/><br /><br />        "inline" element below has been edited due to <br />          unpostable characters.<br />     <inline>���ï¿...snip...FX Global Lightin...</inline><br />     <senderPullServantJndiName/><br />     <attributes <br />      modification-date="Wed Aug 04 13:00:00 CEST 2004"    <br />         creation-date="Wed Mar 18 21:42:57 CET 2009" <br />        description="" name="Blue hills.jpg"/><br /></document><br />2:<br /><document state="passive" senderVersion="0" persistent="false" <br /> senderPersistent="false" passivated="true" senderPassivated="false" <br /> deserialized="false" senderHostId="null" callbackId="0"  <br /> senderCallbackId="0" callbackRef="null" isLocalizable="true" <br /> isTransactionBound="false" defaultDisposalTimeout="600" <br /> disposalTimeout="600" maxInlineSize="65536" <br /> defaultMaxInlineSize="65536" inlineSize="0" <br /> contentType="null" length="-1"><br />     <cacheId/><br />     <localBackendId><br />          <DocumentFileID  <br />fileName="C:\TEMP\AdobeDocumentStorage\local\docm1237408627390\924c6476cba7c878e2c5d1ac 2ecf9b12"/><br />     <localBackendId/><br />     <globalBackendId/><br />     <senderLocalBackendId/><br />     <senderGlobalBackendId/><br />     <inline/><br />     <senderPullServantJndiName/><br />     <attributes <br />      modification-date="Wed Mar 18 21:37:27 CET 2009" <br />      creation-date="Wed Mar 18 21:37:27 CET 2009" <br />      description="" name="Winter.jpg"/><br /></document><br />3:<br /><document state="passive" senderVersion="0" persistent="false" <br /> senderPersistent="false" passivated="true" senderPassivated="false" <br /> deserialized="false" senderHostId="null" callbackId="0" <br /> senderCallbackId="0" callbackRef="null" isLocalizable="true" <br /> isTransactionBound="false" defaultDisposalTimeout="600"     <br /> disposalTimeout="600" maxInlineSize="65536" <br /> defaultMaxInlineSize="65536" inlineSize="0" <br /> contentType="null" length="-1"><br />     <cacheId/><br />     <localBackendId><br />          <DocumentFileID fileName="C:\TEMP\AdobeDocumentStorage\local\docm1237408627390\924c6476cba7c878e2c5d1ac2e cf9b12"/><br />     <localBackendId/><br />     <globalBackendId/><br />     <senderLocalBackendId/><br />        <senderGlobalBackendId/><br />        <inline/><br />        <senderPullServantJndiName/><br />     <attributes <br />      modification-date="Wed Mar 18 21:37:27 CET 2009" <br />      creation-date="Wed Mar 18 21:37:27 CET 2009" <br />      description="" name="Winter.jpg"/><br /></document><br />4:<br /><document state="passive" senderVersion="0" persistent="false" <br /> senderPersistent="false" passivated="true" senderPassivated="false" <br /> deserialized="false" senderHostId="null" callbackId="0" <br /> senderCallbackId="0" callbackRef="null" isLocalizable="true" <br /> isTransactionBound="false" defaultDisposalTimeout="600" <br /> disposalTimeout="600" maxInlineSize="65536" <br /> defaultMaxInlineSize="65536" inlineSize="0" <br /> contentType="null" length="-1"><br />     <cacheId/><br />     <localBackendId><br />          <DocumentFileID fileName="C:\TEMP\AdobeDocumentStorage\local\docm1237408627390\924c6476cba7c878e2c5d1ac2e cf9b12"/><br />     <localBackendId/><br />     <globalBackendId/><br />        <senderLocalBackendId/><br />        <senderGlobalBackendId/><br />        <inline/><br />        <senderPullServantJndiName/><br />     <attributes <br />      modification-date="Wed Mar 18 21:37:27 CET 2009" <br />      creation-date="Wed Mar 18 21:37:27 CET 2009" <br />      description="" name="Winter.jpg"/><br /></document><br />}<br /><br />Notice how "Water lilies.jpg" and "Sunset.jpg" have turned into copies of "Winter.jpg"!<br /><br />Note:<br />Although it probably has nothing to to with my problem, it seems to me that Reader, or is it LC, generates xml that isn't well formed. Looks like the <localBackendId> is incorrectly terminated with <localBackendId/>. Something for adobe to look into?
            • 3. Re: Problem inserting/extracting attachments
              pguerett Level 6
              If you write out the PDF at the end of the 1st step can you open all attachments? If you write out the PDF at the beginning of the second step are all attachments there or are you passing the list variable between processes?
              • 4. Re: Problem inserting/extracting attachments
                Level 1
                I'm not sure i understand what you mean by "step". I log the entire pdf both before and after extraction of attachments in our second service. Both of those logged copies display the correct attachments in Reader. Each attachment also opens fine when double-clicked in Reader.

                The list of extracted attachments in our second service is not passed between processes. The only thing I do to it before logging it is get-collection-size(). I'm going to move the logging so it happens RIGHT after extraction, just to make sure.

                In our first service, the attachments map does get passed between sub-processes before the pdf is renderred.

                Some more testing seems to indicate that the attachment with the name that comes last in aphbetical order, always "survives" but copies itself over the ones that preceed it. Files added in Reader are not affected by this "copying" behaviour.
                • 5. Re: Problem inserting/extracting attachments
                  pguerett Level 6
                  can you send the processes and the forms (with attachemnts) to livecyle8@gmail.com and I will have a look. This is not an issue with the DB extraction or update so I will modify the process to read the PDF from disk instead. I should be able to simulate what you are doing and get to the root of the problem.
                  • 6. Re: Problem inserting/extracting attachments
                    Level 1
                    When I try to mail you from my company email account I get this:<br /><br />livecyle8@gmail.com<br />gmail-smtp-in.l.google.com #<gmail-smtp-in.l.google.com #5.1.1 SMTP; 550-5.1.1 The email account that you tried to reach does not exist. Please try> #SMTP#
                    • 7. Re: Problem inserting/extracting attachments
                      pguerett Level 6
                      That is the right email ...does your company block gmail access?

                      Can you post your email and I will reply from my corporate account.
                      • 8. Re: Problem inserting/extracting attachments
                        Level 1
                        I tried again, changing the extension on the xml files and sending the (rather large) example pdf in a separate mail.

                        No error message this time! Let me know if you got it.
                        • 9. Re: Problem inserting/extracting attachments
                          Level 1
                          My company does not block Gmail. One of my collegues sent an email to another Gmail adress earlier today without problems.
                          • 10. Re: Problem inserting/extracting attachments
                            Level 1
                            In my second attempt I sent 3 mails. So far I got one new error message from Gmail. Let me know if the others got through.
                            • 11. Re: Problem inserting/extracting attachments
                              pguerett Level 6
                              Haven't got the files yet ....just spotted a typo in the address:

                              livecycle8@gmail.com

                              Sorry about that
                              • 12. Re: Problem inserting/extracting attachments
                                Level 1
                                Re-sent to the corrected address...