Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9259

Uploading images at catalog/control/addImageForProduct does not work

    Details

      Description

      java.lang.Exception: Service [addMultipleuploadForProduct] threw an unexpected exception/error
              at org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:361) [ofbiz.jar:?]
              at org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:302) [ofbiz.jar:?]
      
      
      2017-07-09 15:42:40,189 |sse-nio-8443-exec-11 |CallService                   |E| ERROR: Could not complete the Method to upload multiple images for product [file:/home/devanshu/ofbiz_dev/bug_crush/trunk/applications/product/minilang/product/imagemanagement/ImageManagementServices.xml#UploadProductImages] process [problem invoking the [addMultipleuploadForProduct] service with the map named [addAdditionalViewForProductMap] containing [{userLogin=[GenericEntity:UserLogin][createdStamp,2017-07-09 02:42:04.614(java.sql.Timestamp)][createdTxStamp,2017-07-09 02:42:04.609(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledBy,null()][disabledDateTime,null()][enabled,null()][externalAuthId,null()][hasLoggedOut,null()][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,Asia/Calcutta(java.lang.String)][lastUpdatedStamp,2017-07-09 02:43:49.871(java.sql.Timestamp)][lastUpdatedTxStamp,2017-07-09 02:43:49.702(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,null()][userLdapDn,null()][userLoginId,admin(java.lang.String)], productId=GZ-1000, _uploadedFile_contentType=image/png, timeZone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=19800000,dstSavings=0,useDaylight=false,transitions=6,lastRule=null], locale=en_US, productContentTypeId=IMAGE, imageResize=null, uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=204237 cap=204237], _uploadedFile_fileName=3d Spider Man Homecoming M Movie Tickets Online Booking  Showtimes in Indore   Paytm.com.png}]: Service [addMultipleuploadForProduct] target threw an unexpected exception (null)]
      
      

      Steps followed for regeneration:

      • Go to Catalog application.
      • Click on the (Image Management) menu item.
      • Click on the (Upload) sub-menu item.
      • Set a product and upload image(s).
      • Click on the (Upload) button.
      1. OFBIZ-9259.patch
        1 kB
        Devanshu Vyas

        Issue Links

          Activity

          Hide
          devanshu.vyas Devanshu Vyas added a comment - - edited

          Hello Jacques,

          I tried to regenerate the issue, but I found a different issue.

          java.lang.Exception: Service [addMultipleuploadForProduct] threw an unexpected exception/error
                  at org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:361) [ofbiz.jar:?]
                  at org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:302) [ofbiz.jar:?]
          
          
          2017-07-09 15:42:40,189 |sse-nio-8443-exec-11 |CallService                   |E| ERROR: Could not complete the Method to upload multiple images for product [file:/home/devanshu/ofbiz_dev/bug_crush/trunk/applications/product/minilang/product/imagemanagement/ImageManagementServices.xml#UploadProductImages] process [problem invoking the [addMultipleuploadForProduct] service with the map named [addAdditionalViewForProductMap] containing [{userLogin=[GenericEntity:UserLogin][createdStamp,2017-07-09 02:42:04.614(java.sql.Timestamp)][createdTxStamp,2017-07-09 02:42:04.609(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledBy,null()][disabledDateTime,null()][enabled,null()][externalAuthId,null()][hasLoggedOut,null()][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,Asia/Calcutta(java.lang.String)][lastUpdatedStamp,2017-07-09 02:43:49.871(java.sql.Timestamp)][lastUpdatedTxStamp,2017-07-09 02:43:49.702(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,null()][userLdapDn,null()][userLoginId,admin(java.lang.String)], productId=GZ-1000, _uploadedFile_contentType=image/png, timeZone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=19800000,dstSavings=0,useDaylight=false,transitions=6,lastRule=null], locale=en_US, productContentTypeId=IMAGE, imageResize=null, uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=204237 cap=204237], _uploadedFile_fileName=3d Spider Man Homecoming M Movie Tickets Online Booking  Showtimes in Indore   Paytm.com.png}]: Service [addMultipleuploadForProduct] target threw an unexpected exception (null)]
          
          

          Steps followed for regeneration:

          • Go to Catalog application.
          • Click on the (Image Management) menu item.
          • Click on the (Upload) sub-menu item.
          • Set a product and upload image(s).
          • Click on the (Upload) button.

          Let me know if this is the issue you are referring to or is entirely different.

          Show
          devanshu.vyas Devanshu Vyas added a comment - - edited Hello Jacques, I tried to regenerate the issue, but I found a different issue. java.lang.Exception: Service [addMultipleuploadForProduct] threw an unexpected exception/error at org.apache.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:361) [ofbiz.jar:?] at org.apache.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:302) [ofbiz.jar:?] 2017-07-09 15:42:40,189 |sse-nio-8443-exec-11 |CallService |E| ERROR: Could not complete the Method to upload multiple images for product [file:/home/devanshu/ofbiz_dev/bug_crush/trunk/applications/product/minilang/product/imagemanagement/ImageManagementServices.xml#UploadProductImages] process [problem invoking the [addMultipleuploadForProduct] service with the map named [addAdditionalViewForProductMap] containing [{userLogin=[GenericEntity:UserLogin][createdStamp,2017-07-09 02:42:04.614(java.sql.Timestamp)][createdTxStamp,2017-07-09 02:42:04.609(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang. String )][disabledBy, null ()][disabledDateTime, null ()][enabled, null ()][externalAuthId, null ()][hasLoggedOut, null ()][isSystem, null ()][lastCurrencyUom, null ()][lastLocale, null ()][lastTimeZone,Asia/Calcutta(java.lang. String )][lastUpdatedStamp,2017-07-09 02:43:49.871(java.sql.Timestamp)][lastUpdatedTxStamp,2017-07-09 02:43:49.702(java.sql.Timestamp)][partyId,admin(java.lang. String )][passwordHint, null ()][requirePasswordChange, null ()][successiveFailedLogins, null ()][userLdapDn, null ()][userLoginId,admin(java.lang. String )], productId=GZ-1000, _uploadedFile_contentType=image/png, timeZone=sun.util.calendar.ZoneInfo[id= "Asia/Calcutta" ,offset=19800000,dstSavings=0,useDaylight= false ,transitions=6,lastRule= null ], locale=en_US, productContentTypeId=IMAGE, imageResize= null , uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=204237 cap=204237], _uploadedFile_fileName=3d Spider Man Homecoming M Movie Tickets Online Booking Showtimes in Indore Paytm.com.png}]: Service [addMultipleuploadForProduct] target threw an unexpected exception ( null )] Steps followed for regeneration: Go to Catalog application. Click on the (Image Management) menu item. Click on the (Upload) sub-menu item. Set a product and upload image(s). Click on the (Upload) button. Let me know if this is the issue you are referring to or is entirely different.
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Hi Devanshu,

          As far as I remember it was not the same, but indeed now I can only reproduce the one you reported above.

          Show
          jacques.le.roux Jacques Le Roux added a comment - Hi Devanshu, As far as I remember it was not the same, but indeed now I can only reproduce the one you reported above.
          Hide
          devanshu.vyas Devanshu Vyas added a comment -

          Thanks Jacques for the confirmation.
          Should I close this issue and create a separate ticket for the updated log?

          Show
          devanshu.vyas Devanshu Vyas added a comment - Thanks Jacques for the confirmation. Should I close this issue and create a separate ticket for the updated log?
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          I suggest to simply update the description by replacing by the new error, doing so...

          Show
          jacques.le.roux Jacques Le Roux added a comment - I suggest to simply update the description by replacing by the new error, doing so...
          Hide
          jacques.le.roux Jacques Le Roux added a comment -

          Hi Devanshu,

          Done, I let you decide if we should remove our comments (I think so, just useless duplicates now). Thank you for you help on this

          Show
          jacques.le.roux Jacques Le Roux added a comment - Hi Devanshu, Done, I let you decide if we should remove our comments (I think so, just useless duplicates now). Thank you for you help on this
          Hide
          devanshu.vyas Devanshu Vyas added a comment -

          Thanks Jacques for updating the ticket.

          I think we should leave the comments here, the ticket history is recording everything.
          I am now starting to work on the issue fix.

          Show
          devanshu.vyas Devanshu Vyas added a comment - Thanks Jacques for updating the ticket. I think we should leave the comments here, the ticket history is recording everything. I am now starting to work on the issue fix.
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          Thanks Devanshu, looking forward

          Then maybe you should assign this issue to yourself

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited Thanks Devanshu, looking forward Then maybe you should assign this issue to yourself
          Hide
          devanshu.vyas Devanshu Vyas added a comment -

          Uploaded patch containing the fix for the NPE on uploading image(s). Delegator was fetched from the context instead of the DispatchContext and thus was throwing NPE while running the EntityUtilProperties.getPropertyValue().

          Show
          devanshu.vyas Devanshu Vyas added a comment - Uploaded patch containing the fix for the NPE on uploading image(s). Delegator was fetched from the context instead of the DispatchContext and thus was throwing NPE while running the EntityUtilProperties.getPropertyValue().
          Hide
          jacques.le.roux Jacques Le Roux added a comment - - edited

          Thanks Devanshu,

          Your patch is in
          trunk r1801742
          R16.11 r1801743
          R15.12 r1801744

          Show
          jacques.le.roux Jacques Le Roux added a comment - - edited Thanks Devanshu, Your patch is in trunk r1801742 R16.11 r1801743 R15.12 r1801744

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              jacques.le.roux Jacques Le Roux
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development