Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • Trunk
    • 17.12.05, 18.12.01
    • party
    • None
    • OS: Ubuntu 20.04

      $ java -version
      java version "1.8.0_271"
      Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
      Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)

    Description

      partymgr fails to upload image

       

      Steps to reproduce issue:

      open https://localhost:8443/partymgr/control/viewprofile?partyId=admin
      in Party Content panel
      select image to upload
      select "Logo Image URL"
      click ok

      console output:

      2020-12-25 16:24:06,533 |sse-nio-18443-exec-4 |UtilHttp |E| File upload errororg.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException
      2020-12-25 16:24:06,573 |sse-nio-18443-exec-4 |ModelService |I| Set default value [DOCUMENT] for parameter [contentTypeId]
      2020-12-25 16:24:06,661 |sse-nio-18443-exec-4 |UtilProperties |I| ResourceBundle ServiceErrorUiLabels (en) created in 0.087s with 40 properties
      2020-12-25 16:24:06,662 |sse-nio-18443-exec-4 |ModelService |E| [ModelService.validate] : {uploadPartyContentFile} : (IN) Required test error: org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId]
      2020-12-25 16:24:06,662 |sse-nio-18443-exec-4 |ServiceDispatcher |E| Incoming context (in runSync : uploadPartyContentFile) does not match expected requirements
      org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId]
      at org.apache.ofbiz.service.ModelService.validate(ModelService.java:1305) ~[main/:?]

      Attachments

        1. v.jpeg
          105 kB
          Wai

        Activity

          Could this be a problem in R18 only?

          jleroux Jacques Le Roux added a comment - Could this be a problem in R18 only?
          jleroux Jacques Le Roux added a comment - - edited

          I tried with the provided v.jpeg image and got no issues at all on Windows 7 locally.

          Same on trunk demo as you can see there:
          https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin

          I checked the logs in both and found no related issues.

          jleroux Jacques Le Roux added a comment - - edited I tried with the provided v.jpeg image and got no issues at all on Windows 7 locally. Same on trunk demo as you can see there: https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin I checked the logs in both and found no related issues.
          wt Wai added a comment -

          The setting for http.upload.max.size=-1 at the time this issue was found.

          wt Wai added a comment - The setting for http.upload.max.size=-1 at the time this issue was found.

          Hi Wai,

          It should not be related to the size of image. I fixed that with OFBIZ-11534. It's now possible to load files at least as heavy as 2,5 GB.
          Note that, for security reason, with OFBIZ-12080 I changed how files are uploaded. The size is OOTB illimited (http.upload.max.size properties in general.properties).

          I'll have a look when I'll get a chance, any help is apprectiated...

          jleroux Jacques Le Roux added a comment - Hi Wai, It should not be related to the size of image. I fixed that with OFBIZ-11534 . It's now possible to load files at least as heavy as 2,5 GB. Note that, for security reason, with OFBIZ-12080 I changed how files are uploaded. The size is OOTB illimited (http.upload.max.size properties in general.properties). I'll have a look when I'll get a chance, any help is apprectiated...
          wt Wai added a comment -

          I've discovered that when down scaling the image from 105kB to 67kB, then the upload works well. This would imply another issue. Is there a limit to the size of images that ofbiz can accept?

          wt Wai added a comment - I've discovered that when down scaling the image from 105kB to 67kB, then the upload works well. This would imply another issue. Is there a limit to the size of images that ofbiz can accept?
          wt Wai added a comment - - edited

          Image upload issue persists. Following the same steps to reproduce the issue. Notice that once this issue happens, the callback never stops. I notice that it happens with this particular image. I've uploaded the image v.jpeg

           

          2021-01-31 15:25:15,572 |sse-nio-8443-exec-11 |UtilHttp |E| File upload errororg.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException
          2021-01-31 15:25:15,573 |sse-nio-8443-exec-11 |ModelService |I| Set default value [DOCUMENT] for parameter [contentTypeId]
          2021-01-31 15:25:15,620 |sse-nio-8443-exec-11 |UtilProperties |I| ResourceBundle ServiceErrorUiLabels (en_US) created in 0.047s with 40 properties
          2021-01-31 15:25:15,621 |sse-nio-8443-exec-11 |ModelService |E| [ModelService.validate] : {uploadPartyContentFile} : (IN) Required test error: org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId]
          2021-01-31 15:25:15,621 |sse-nio-8443-exec-11 |ServiceDispatcher |E| Incoming context (in runSync : uploadPartyContentFile) does not match expected requirements
          org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId]
          at org.apache.ofbiz.service.ModelService.validate(ModelService.java:1305) ~[main/:?]
          at org.apache.ofbiz.service.ModelService.validate(ModelService.java:1219) ~[main/:?]
          at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:403) [main/:?]
          at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240) [main/:?]
          at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:93) [main/:?]
          at org.apache.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:253) [main/:?]
          at org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:1013) [main/:?]
          at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:664) [main/:?]

          ...

          2021-01-31 15:25:15,572 |sse-nio-8443-exec-11 |UtilHttp |E| File upload errororg.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException
          2021-01-31 15:25:15,573 |sse-nio-8443-exec-11 |ModelService |I| Set default value [DOCUMENT] for parameter [contentTypeId]
          2021-01-31 15:25:15,620 |sse-nio-8443-exec-11 |UtilProperties |I| ResourceBundle ServiceErrorUiLabels (en_US) created in 0.047s with 40 properties
          2021-01-31 15:25:15,621 |sse-nio-8443-exec-11 |ModelService |E| [ModelService.validate] : {uploadPartyContentFile} : (IN) Required test error: org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId]
          2021-01-31 15:25:15,621 |sse-nio-8443-exec-11 |ServiceDispatcher |E| Incoming context (in runSync : uploadPartyContentFile) does not match expected requirements
          org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId]
          at org.apache.ofbiz.service.ModelService.validate(ModelService.java:1305) ~[main/:?]
          at org.apache.ofbiz.service.ModelService.validate(ModelService.java:1219) ~[main/:?]
          at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:403) [main/:?]
          at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240) [main/:?]
          at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:93) [main/:?]
          at org.apache.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:253) [main/:?]
          at org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:1013) [main/:?]
          at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:664) [main/:?]

          ...

          2021-01-31 15:25:15,651 |sse-nio-8443-exec-11 |ServerHitBin |I| Visit delegatorName=default, ServerHitBin delegatorName=default
          2021-01-31 15:25:15,676 |sse-nio-8443-exec-11 |ControlServlet |T| [[[partymgr::uploadPartyContent (Domain:https://localhost)] Request Done- total:0.286,since last([partymgr::upload...):0.286]]
          2021-01-31 15:25:16,426 |jsse-nio-8443-exec-4 |ControlServlet |T| [[[partymgr::getFileUploadProgressStatus (Domain:https://localhost)] Request Begun, encoding=[UTF-8]- total:0.0,since last(Begin):0.0]]
          2021-01-31 15:25:17,264 |jsse-nio-8443-exec-4 |ServiceDispatcher |T| Sync service [partymgr/getFileUploadProgressStatus] finished in [827] milliseconds
          2021-01-31 15:25:17,265 |jsse-nio-8443-exec-4 |RequestHandler |I| Ran Event service:#getFileUploadProgressStatus from [request], result is [success]
          2021-01-31 15:25:17,266 |jsse-nio-8443-exec-4 |RequestHandler |I| [RequestHandler.doRequest]: Response is a chained request. Hidden sessionId by default.
          2021-01-31 15:25:17,268 |jsse-nio-8443-exec-4 |RequestHandler |I| [RequestHandler]: Chain in place: requestUri=json overrideViewUri=null Hidden sessionId by default.
          2021-01-31 15:25:17,271 |jsse-nio-8443-exec-4 |CommonEvents |W| for security reason (OFBIZ-5409) the '//' prefix was added handling the JSON response. Normally you simply have to access the data you want, so should not be annoyed by the '//' prefix.You might need to remove it if you use Ajax GET responses (not recommended).In case, the util.js scrpt is there to help you.This can be customized in general.properties with the http.json.xssi.prefix property
          2021-01-31 15:25:17,279 |jsse-nio-8443-exec-4 |RequestHandler |I| Ran Event java:org.apache.ofbiz.common.CommonEvents#jsonResponseFromRequestAttributes from [request], result is [success]
          2021-01-31 15:25:17,281 |jsse-nio-8443-exec-4 |ServerHitBin |I| Visit delegatorName=default, ServerHitBin delegatorName=default

          wt Wai added a comment - - edited Image upload issue persists. Following the same steps to reproduce the issue. Notice that once this issue happens, the callback never stops. I notice that it happens with this particular image. I've uploaded the image v.jpeg   2021-01-31 15:25:15,572 |sse-nio-8443-exec-11 |UtilHttp |E| File upload errororg.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException 2021-01-31 15:25:15,573 |sse-nio-8443-exec-11 |ModelService |I| Set default value [DOCUMENT] for parameter [contentTypeId] 2021-01-31 15:25:15,620 |sse-nio-8443-exec-11 |UtilProperties |I| ResourceBundle ServiceErrorUiLabels (en_US) created in 0.047s with 40 properties 2021-01-31 15:25:15,621 |sse-nio-8443-exec-11 |ModelService |E| [ModelService.validate] : {uploadPartyContentFile} : (IN) Required test error: org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId] 2021-01-31 15:25:15,621 |sse-nio-8443-exec-11 |ServiceDispatcher |E| Incoming context (in runSync : uploadPartyContentFile) does not match expected requirements org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId] at org.apache.ofbiz.service.ModelService.validate(ModelService.java:1305) ~ [main/:?] at org.apache.ofbiz.service.ModelService.validate(ModelService.java:1219) ~ [main/:?] at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:403) [main/:?] at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240) [main/:?] at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:93) [main/:?] at org.apache.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:253) [main/:?] at org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:1013) [main/:?] at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:664) [main/:?] ... 2021-01-31 15:25:15,572 |sse-nio-8443-exec-11 |UtilHttp |E| File upload errororg.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. java.io.EOFException 2021-01-31 15:25:15,573 |sse-nio-8443-exec-11 |ModelService |I| Set default value [DOCUMENT] for parameter [contentTypeId] 2021-01-31 15:25:15,620 |sse-nio-8443-exec-11 |UtilProperties |I| ResourceBundle ServiceErrorUiLabels (en_US) created in 0.047s with 40 properties 2021-01-31 15:25:15,621 |sse-nio-8443-exec-11 |ModelService |E| [ModelService.validate] : {uploadPartyContentFile} : (IN) Required test error: org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId] 2021-01-31 15:25:15,621 |sse-nio-8443-exec-11 |ServiceDispatcher |E| Incoming context (in runSync : uploadPartyContentFile) does not match expected requirements org.apache.ofbiz.service.ServiceValidationException: The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId] at org.apache.ofbiz.service.ModelService.validate(ModelService.java:1305) ~ [main/:?] at org.apache.ofbiz.service.ModelService.validate(ModelService.java:1219) ~ [main/:?] at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:403) [main/:?] at org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240) [main/:?] at org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:93) [main/:?] at org.apache.ofbiz.webapp.event.ServiceEventHandler.invoke(ServiceEventHandler.java:253) [main/:?] at org.apache.ofbiz.webapp.control.RequestHandler.runEvent(RequestHandler.java:1013) [main/:?] at org.apache.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:664) [main/:?] ... 2021-01-31 15:25:15,651 |sse-nio-8443-exec-11 |ServerHitBin |I| Visit delegatorName=default, ServerHitBin delegatorName=default 2021-01-31 15:25:15,676 |sse-nio-8443-exec-11 |ControlServlet |T| [[ [partymgr::uploadPartyContent (Domain:https://localhost)] Request Done- total:0.286,since last( [partymgr::upload...):0.286] ] 2021-01-31 15:25:16,426 |jsse-nio-8443-exec-4 |ControlServlet |T| [[ [partymgr::getFileUploadProgressStatus (Domain:https://localhost)] Request Begun, encoding= [UTF-8] - total:0.0,since last(Begin):0.0]] 2021-01-31 15:25:17,264 |jsse-nio-8443-exec-4 |ServiceDispatcher |T| Sync service [partymgr/getFileUploadProgressStatus] finished in [827] milliseconds 2021-01-31 15:25:17,265 |jsse-nio-8443-exec-4 |RequestHandler |I| Ran Event service:#getFileUploadProgressStatus from [request] , result is [success] 2021-01-31 15:25:17,266 |jsse-nio-8443-exec-4 |RequestHandler |I| [RequestHandler.doRequest] : Response is a chained request. Hidden sessionId by default. 2021-01-31 15:25:17,268 |jsse-nio-8443-exec-4 |RequestHandler |I| [RequestHandler] : Chain in place: requestUri=json overrideViewUri=null Hidden sessionId by default. 2021-01-31 15:25:17,271 |jsse-nio-8443-exec-4 |CommonEvents |W| for security reason ( OFBIZ-5409 ) the '//' prefix was added handling the JSON response. Normally you simply have to access the data you want, so should not be annoyed by the '//' prefix.You might need to remove it if you use Ajax GET responses (not recommended).In case, the util.js scrpt is there to help you.This can be customized in general.properties with the http.json.xssi.prefix property 2021-01-31 15:25:17,279 |jsse-nio-8443-exec-4 |RequestHandler |I| Ran Event java:org.apache.ofbiz.common.CommonEvents#jsonResponseFromRequestAttributes from [request] , result is [success] 2021-01-31 15:25:17,281 |jsse-nio-8443-exec-4 |ServerHitBin |I| Visit delegatorName=default, ServerHitBin delegatorName=default

          Hi Deepak,

          Yes I think we can, done

          jleroux Jacques Le Roux added a comment - Hi Deepak, Yes I think we can, done
          deepak Deepak Dixit added a comment -

          Can we close this task?

          deepak Deepak Dixit added a comment - Can we close this task?

          Hi Wai,

          I tried to reproduce by removing my fix but I don't find the same error message than you. Could you please confirm than you can reproduce on the trunk demo? If you can still reproduce please give the exact steps you use, TIA.

          jleroux Jacques Le Roux added a comment - Hi Wai, I tried to reproduce by removing my fix but I don't find the same error message than you. Could you please confirm than you can reproduce on the trunk demo? If you can still reproduce please give the exact steps you use, TIA.

          Hi Wai,

          To release 17.12.05 we need to know if it's OK with you, TIA: https://markmail.org/message/b2bhgswyah75xyrx

          jleroux Jacques Le Roux added a comment - Hi Wai, To release 17.12.05 we need to know if it's OK with you, TIA: https://markmail.org/message/b2bhgswyah75xyrx
          ankit.joshi Ankit Joshi added a comment - - edited

          Hi jleroux,

          I've verified the reported issue where the partymgr fails to upload the image on the latest 'trunk' codebase and found the workflow working fine with the fix that had been provided in OFBIZ-12080. Hene, we could close this ticket if no other aspect remains to handle.

          wt, Please confirm.

          ankit.joshi Ankit Joshi added a comment - - edited Hi jleroux , I've verified the reported issue where the partymgr fails to upload the image on the latest 'trunk' codebase and found the workflow working fine with the fix that had been provided in OFBIZ-12080 . Hene, we could close this ticket if no other aspect remains to handle. wt , Please confirm.

          Hi Wai, ankit.joshi

          If there is nothing more to fix, please close, TIA.

          jleroux Jacques Le Roux added a comment - Hi Wai, ankit.joshi If there is nothing more to fix, please close, TIA.

          Commit c7e1114b744bf3a915021188bf6e699c413d1566 in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux
          [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=c7e1114 ]

          Fixed: partymgr fails to upload image (OFBIZ-12101)

          This is a bug due to OFBIZ-12080, fileToCheck is the complete name of the file
          with path not the filename

          Thanks: Wai for report

          jira-bot ASF subversion and git services added a comment - Commit c7e1114b744bf3a915021188bf6e699c413d1566 in ofbiz-framework's branch refs/heads/trunk from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=c7e1114 ] Fixed: partymgr fails to upload image ( OFBIZ-12101 ) This is a bug due to OFBIZ-12080 , fileToCheck is the complete name of the file with path not the filename Thanks: Wai for report

          Commit 80740645a6838a879533bf5ba167af73aaa4b975 in ofbiz-framework's branch refs/heads/release18.12 from Jacques Le Roux
          [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=8074064 ]

          Fixed: partymgr fails to upload image (OFBIZ-12101)

          This is a bug due to OFBIZ-12080, fileToCheck is the complete name of the file
          with path not the filename

          Thanks: Wai for report

          jira-bot ASF subversion and git services added a comment - Commit 80740645a6838a879533bf5ba167af73aaa4b975 in ofbiz-framework's branch refs/heads/release18.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=8074064 ] Fixed: partymgr fails to upload image ( OFBIZ-12101 ) This is a bug due to OFBIZ-12080 , fileToCheck is the complete name of the file with path not the filename Thanks: Wai for report

          Commit 2d15771d56ab1637efa5685799f86a7bb118cee4 in ofbiz-framework's branch refs/heads/release17.12 from Jacques Le Roux
          [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=2d15771 ]

          Fixed: partymgr fails to upload image (OFBIZ-12101)

          This is a bug due to OFBIZ-12080, fileToCheck is the complete name of the file
          with path not the filename

          Thanks: Wai for report

          jira-bot ASF subversion and git services added a comment - Commit 2d15771d56ab1637efa5685799f86a7bb118cee4 in ofbiz-framework's branch refs/heads/release17.12 from Jacques Le Roux [ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=2d15771 ] Fixed: partymgr fails to upload image ( OFBIZ-12101 ) This is a bug due to OFBIZ-12080 , fileToCheck is the complete name of the file with path not the filename Thanks: Wai for report

          Sorry Ankit, I assign to myself because this is a bug due to OFBIZ-12080 and I have a fix

          jleroux Jacques Le Roux added a comment - Sorry Ankit, I assign to myself because this is a bug due to OFBIZ-12080 and I have a fix

          People

            jleroux Jacques Le Roux
            wt Wai
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: