[jira] [Commented] (OFBIZ-10673) Unable to add additional product images from catalog

2019-01-10 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16739222#comment-16739222
 ] 

Jacques Le Roux commented on OFBIZ-10673:
-

Thanks Deepak

> Unable to add additional product images from catalog
> 
>
> Key: OFBIZ-10673
> URL: https://issues.apache.org/jira/browse/OFBIZ-10673
> Project: OFBiz
>  Issue Type: Bug
>  Components: product
>Affects Versions: Trunk
>Reporter: Rohit Koushal
>Assignee: Deepak Dixit
>Priority: Major
> Fix For: 16.11.06
>
> Attachments: OFBIZ-10673.patch, screenshot-1.png
>
>
> Unable to add additional product images from screen: Catalog > Products > 
> Content
> below is the screen for reference.
>  !screenshot-1.png! 
> Server logs:
> {code:java}
> 2018-11-24 18:40:52,454 |sse-nio-8443-exec-11 |CallService   
> |E| ERROR: Could not complete the Method to upload multiple Additional View 
> images for product 
> [file:/home/rohit/sandbox/ofbiz-framework/applications/product/minilang/product/product/ProductContentServices.xml#uploadProductAdditionalViewImages]
>  process [problem invoking the [addAdditionalViewForProduct] service with the 
> map named [addAdditionalViewForProductMap] containing 
> [{userLogin=[GenericEntity:UserLogin][createdStamp,2018-11-24 
> 11:21:56.719(java.sql.Timestamp)][createdTxStamp,2018-11-24 
> 11:21:56.716(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledBy,null()][disabledDateTime,null()][enabled,Y(java.lang.String)][externalAuthId,null()][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,Asia/Calcutta(java.lang.String)][lastUpdatedStamp,2018-11-24
>  14:59:33.347(java.sql.Timestamp)][lastUpdatedTxStamp,2018-11-24 
> 14:59:33.291(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,0(java.lang.Long)][userLdapDn,null()][userLoginId,admin(java.lang.String)],
>  visualTheme=visual-theme-id:RAINBOWSTONE_SAPHIR, display-name: Rainbow Stone 
> - Sapphire, description: , screenshots: 
> [/rainbowstone/images/themeSaphir.png], productId=GZ-1000, 
> _uploadedFile_contentType=image/png, 
> timeZone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=1980,dstSavings=0,useDaylight=false,transitions=6,lastRule=null],
>  locale=en_US, productContentTypeId=ADDITIONAL_IMAGE_1, 
> uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=1174673 cap=1174673], 
> _uploadedFile_fileName=Screenshot from 2018-10-23 09:02:57.png}]: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)]
> org.apache.ofbiz.service.GenericServiceException: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:115)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:103)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.callops.CallService.exec(CallService.java:217)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.ifops.IfNotEmpty.exec(IfNotEmpty.java:61) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at org.apache.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:457) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:274) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:293)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:79)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:48)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:88)
>  [ofbiz.jar:?]

[jira] [Commented] (OFBIZ-10673) Unable to add additional product images from catalog

2019-01-09 Thread Deepak Dixit (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16739103#comment-16739103
 ] 

Deepak Dixit commented on OFBIZ-10673:
--

This has been fixed at 
ofbiz framework trunk at 1850918
R18.12 framework at 1850920
R17.12 framework at 1850919
R16.11  at 1850922

Thanks  Rohit Koushal and  Ingo Wolfmayr for your contribution. 


> Unable to add additional product images from catalog
> 
>
> Key: OFBIZ-10673
> URL: https://issues.apache.org/jira/browse/OFBIZ-10673
> Project: OFBiz
>  Issue Type: Bug
>  Components: product
>Affects Versions: Trunk
>Reporter: Rohit Koushal
>Assignee: Deepak Dixit
>Priority: Major
> Attachments: OFBIZ-10673.patch, screenshot-1.png
>
>
> Unable to add additional product images from screen: Catalog > Products > 
> Content
> below is the screen for reference.
>  !screenshot-1.png! 
> Server logs:
> {code:java}
> 2018-11-24 18:40:52,454 |sse-nio-8443-exec-11 |CallService   
> |E| ERROR: Could not complete the Method to upload multiple Additional View 
> images for product 
> [file:/home/rohit/sandbox/ofbiz-framework/applications/product/minilang/product/product/ProductContentServices.xml#uploadProductAdditionalViewImages]
>  process [problem invoking the [addAdditionalViewForProduct] service with the 
> map named [addAdditionalViewForProductMap] containing 
> [{userLogin=[GenericEntity:UserLogin][createdStamp,2018-11-24 
> 11:21:56.719(java.sql.Timestamp)][createdTxStamp,2018-11-24 
> 11:21:56.716(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledBy,null()][disabledDateTime,null()][enabled,Y(java.lang.String)][externalAuthId,null()][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,Asia/Calcutta(java.lang.String)][lastUpdatedStamp,2018-11-24
>  14:59:33.347(java.sql.Timestamp)][lastUpdatedTxStamp,2018-11-24 
> 14:59:33.291(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,0(java.lang.Long)][userLdapDn,null()][userLoginId,admin(java.lang.String)],
>  visualTheme=visual-theme-id:RAINBOWSTONE_SAPHIR, display-name: Rainbow Stone 
> - Sapphire, description: , screenshots: 
> [/rainbowstone/images/themeSaphir.png], productId=GZ-1000, 
> _uploadedFile_contentType=image/png, 
> timeZone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=1980,dstSavings=0,useDaylight=false,transitions=6,lastRule=null],
>  locale=en_US, productContentTypeId=ADDITIONAL_IMAGE_1, 
> uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=1174673 cap=1174673], 
> _uploadedFile_fileName=Screenshot from 2018-10-23 09:02:57.png}]: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)]
> org.apache.ofbiz.service.GenericServiceException: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:115)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:103)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.callops.CallService.exec(CallService.java:217)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.ifops.IfNotEmpty.exec(IfNotEmpty.java:61) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at org.apache.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:457) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:274) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:293)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:79)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:48)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  

[jira] [Commented] (OFBIZ-10673) Unable to add additional product images from catalog

2019-01-09 Thread Deepak Dixit (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16738080#comment-16738080
 ] 

Deepak Dixit commented on OFBIZ-10673:
--

Hi Jacques, 

This is stale code block and not used since long and it does nothing at 
r1081272 fileLocation preparation logic was change so there is no need to do 
substring to get the fileLocation. 
I am sure it does not put in regression and safe to remove this code block. 

At r1081526 this code block should be removed but it was fixed as for now fix :)


> Unable to add additional product images from catalog
> 
>
> Key: OFBIZ-10673
> URL: https://issues.apache.org/jira/browse/OFBIZ-10673
> Project: OFBiz
>  Issue Type: Bug
>  Components: product
>Affects Versions: Trunk
>Reporter: Rohit Koushal
>Assignee: Deepak Dixit
>Priority: Major
> Attachments: OFBIZ-10673.patch, screenshot-1.png
>
>
> Unable to add additional product images from screen: Catalog > Products > 
> Content
> below is the screen for reference.
>  !screenshot-1.png! 
> Server logs:
> {code:java}
> 2018-11-24 18:40:52,454 |sse-nio-8443-exec-11 |CallService   
> |E| ERROR: Could not complete the Method to upload multiple Additional View 
> images for product 
> [file:/home/rohit/sandbox/ofbiz-framework/applications/product/minilang/product/product/ProductContentServices.xml#uploadProductAdditionalViewImages]
>  process [problem invoking the [addAdditionalViewForProduct] service with the 
> map named [addAdditionalViewForProductMap] containing 
> [{userLogin=[GenericEntity:UserLogin][createdStamp,2018-11-24 
> 11:21:56.719(java.sql.Timestamp)][createdTxStamp,2018-11-24 
> 11:21:56.716(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledBy,null()][disabledDateTime,null()][enabled,Y(java.lang.String)][externalAuthId,null()][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,Asia/Calcutta(java.lang.String)][lastUpdatedStamp,2018-11-24
>  14:59:33.347(java.sql.Timestamp)][lastUpdatedTxStamp,2018-11-24 
> 14:59:33.291(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,0(java.lang.Long)][userLdapDn,null()][userLoginId,admin(java.lang.String)],
>  visualTheme=visual-theme-id:RAINBOWSTONE_SAPHIR, display-name: Rainbow Stone 
> - Sapphire, description: , screenshots: 
> [/rainbowstone/images/themeSaphir.png], productId=GZ-1000, 
> _uploadedFile_contentType=image/png, 
> timeZone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=1980,dstSavings=0,useDaylight=false,transitions=6,lastRule=null],
>  locale=en_US, productContentTypeId=ADDITIONAL_IMAGE_1, 
> uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=1174673 cap=1174673], 
> _uploadedFile_fileName=Screenshot from 2018-10-23 09:02:57.png}]: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)]
> org.apache.ofbiz.service.GenericServiceException: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:115)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:103)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.callops.CallService.exec(CallService.java:217)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.ifops.IfNotEmpty.exec(IfNotEmpty.java:61) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at org.apache.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:457) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:274) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:293)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:79)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:48)
>  [ofbiz.jar:?]
> at 
> 

[jira] [Commented] (OFBIZ-10673) Unable to add additional product images from catalog

2018-12-24 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16728416#comment-16728416
 ] 

Jacques Le Roux commented on OFBIZ-10673:
-

Thanks for your feedback Rohit,

What a mess, it almost gives me headache when I try to follow the path.

So you say it was 1st broken by OFBIZ-4212 (r1081272), somehow fixed by 
r1081526, then broken again by OFBIZ-9776 (r1817623). 

I have double checked all that. Because r1081526 concern only 
*scaleImageInAllSize()*  and your patch concerns it also. But *filePathPrefix* 
is only changed by OFBIZ-9776 (r1817623) in *scaleImageManageInAllSize()*. So 
why do you speak about OFBIZ-9776 (r1817623) and *filePathPrefix*?

Also the fix done by OFBIZ-9776 (r1817623) seems good to me, why do you want to 
remove it? Maybe it fixes your issue (did nto try) but are you sure it does not 
put in regressions?

> Unable to add additional product images from catalog
> 
>
> Key: OFBIZ-10673
> URL: https://issues.apache.org/jira/browse/OFBIZ-10673
> Project: OFBiz
>  Issue Type: Bug
>  Components: product
>Affects Versions: Trunk
>Reporter: Rohit Koushal
>Assignee: Rohit Koushal
>Priority: Major
> Attachments: OFBIZ-10673.patch, screenshot-1.png
>
>
> Unable to add additional product images from screen: Catalog > Products > 
> Content
> below is the screen for reference.
>  !screenshot-1.png! 
> Server logs:
> {code:java}
> 2018-11-24 18:40:52,454 |sse-nio-8443-exec-11 |CallService   
> |E| ERROR: Could not complete the Method to upload multiple Additional View 
> images for product 
> [file:/home/rohit/sandbox/ofbiz-framework/applications/product/minilang/product/product/ProductContentServices.xml#uploadProductAdditionalViewImages]
>  process [problem invoking the [addAdditionalViewForProduct] service with the 
> map named [addAdditionalViewForProductMap] containing 
> [{userLogin=[GenericEntity:UserLogin][createdStamp,2018-11-24 
> 11:21:56.719(java.sql.Timestamp)][createdTxStamp,2018-11-24 
> 11:21:56.716(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledBy,null()][disabledDateTime,null()][enabled,Y(java.lang.String)][externalAuthId,null()][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,Asia/Calcutta(java.lang.String)][lastUpdatedStamp,2018-11-24
>  14:59:33.347(java.sql.Timestamp)][lastUpdatedTxStamp,2018-11-24 
> 14:59:33.291(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,0(java.lang.Long)][userLdapDn,null()][userLoginId,admin(java.lang.String)],
>  visualTheme=visual-theme-id:RAINBOWSTONE_SAPHIR, display-name: Rainbow Stone 
> - Sapphire, description: , screenshots: 
> [/rainbowstone/images/themeSaphir.png], productId=GZ-1000, 
> _uploadedFile_contentType=image/png, 
> timeZone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=1980,dstSavings=0,useDaylight=false,transitions=6,lastRule=null],
>  locale=en_US, productContentTypeId=ADDITIONAL_IMAGE_1, 
> uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=1174673 cap=1174673], 
> _uploadedFile_fileName=Screenshot from 2018-10-23 09:02:57.png}]: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)]
> org.apache.ofbiz.service.GenericServiceException: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:115)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:103)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.callops.CallService.exec(CallService.java:217)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.ifops.IfNotEmpty.exec(IfNotEmpty.java:61) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at org.apache.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:457) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:274) 
> [ofbiz.jar:?]
> at 
> 

[jira] [Commented] (OFBIZ-10673) Unable to add additional product images from catalog

2018-12-21 Thread Rohit Koushal (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16727260#comment-16727260
 ] 

Rohit Koushal commented on OFBIZ-10673:
---

Thanks [~jacques.le.roux] for looking into this.

Initially, that code segment is like
{code}
String filePathPrefix = "";
if (fileLocation.lastIndexOf("/") != -1) {
filePathPrefix = fileLocation.substring(0, 
fileLocation.lastIndexOf("/") + 1); // adding 1 to include the trailing slash
}

if (context.get("contentId") != null){

resultBufImgMap.putAll(ImageTransform.getBufferedImage(imageServerPath + "/" + 
context.get("productId") + "/" + context.get("clientFileName"), locale));
} else {
/* get original BUFFERED IMAGE */

resultBufImgMap.putAll(ImageTransform.getBufferedImage(imageServerPath + "/" + 
filePathPrefix + filenameToUse, locale));
}
{code}

But after the r1081272 *filePathPrefix* variable become unused hence this is 
removed on r1081526. But after the changes on r1817623 *filePathPrefix* is 
assigned to *fileLocation* variable which is causing the problem now.



> Unable to add additional product images from catalog
> 
>
> Key: OFBIZ-10673
> URL: https://issues.apache.org/jira/browse/OFBIZ-10673
> Project: OFBiz
>  Issue Type: Bug
>  Components: product
>Affects Versions: Trunk
>Reporter: Rohit Koushal
>Assignee: Rohit Koushal
>Priority: Major
> Attachments: OFBIZ-10673.patch, screenshot-1.png
>
>
> Unable to add additional product images from screen: Catalog > Products > 
> Content
> below is the screen for reference.
>  !screenshot-1.png! 
> Server logs:
> {code:java}
> 2018-11-24 18:40:52,454 |sse-nio-8443-exec-11 |CallService   
> |E| ERROR: Could not complete the Method to upload multiple Additional View 
> images for product 
> [file:/home/rohit/sandbox/ofbiz-framework/applications/product/minilang/product/product/ProductContentServices.xml#uploadProductAdditionalViewImages]
>  process [problem invoking the [addAdditionalViewForProduct] service with the 
> map named [addAdditionalViewForProductMap] containing 
> [{userLogin=[GenericEntity:UserLogin][createdStamp,2018-11-24 
> 11:21:56.719(java.sql.Timestamp)][createdTxStamp,2018-11-24 
> 11:21:56.716(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledBy,null()][disabledDateTime,null()][enabled,Y(java.lang.String)][externalAuthId,null()][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,Asia/Calcutta(java.lang.String)][lastUpdatedStamp,2018-11-24
>  14:59:33.347(java.sql.Timestamp)][lastUpdatedTxStamp,2018-11-24 
> 14:59:33.291(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,0(java.lang.Long)][userLdapDn,null()][userLoginId,admin(java.lang.String)],
>  visualTheme=visual-theme-id:RAINBOWSTONE_SAPHIR, display-name: Rainbow Stone 
> - Sapphire, description: , screenshots: 
> [/rainbowstone/images/themeSaphir.png], productId=GZ-1000, 
> _uploadedFile_contentType=image/png, 
> timeZone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=1980,dstSavings=0,useDaylight=false,transitions=6,lastRule=null],
>  locale=en_US, productContentTypeId=ADDITIONAL_IMAGE_1, 
> uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=1174673 cap=1174673], 
> _uploadedFile_fileName=Screenshot from 2018-10-23 09:02:57.png}]: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)]
> org.apache.ofbiz.service.GenericServiceException: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:115)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:103)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.callops.CallService.exec(CallService.java:217)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.ifops.IfNotEmpty.exec(IfNotEmpty.java:61) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> 

[jira] [Commented] (OFBIZ-10673) Unable to add additional product images from catalog

2018-11-26 Thread Jacques Le Roux (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16698688#comment-16698688
 ] 

Jacques Le Roux commented on OFBIZ-10673:
-

Hi Rohit,

It was not broken by 
[r1817623|http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/product/src/main/java/org/apache/ofbiz/product/image/ScaleImage.java?r1=1817623=1817622=1817623]
 for OFBIZ-9776 which actually fixed this line. So it was broken before (the 
history is hard to trace but it was at 
[r1081526|http://svn.apache.org/viewvc?view=revision=1081526]) and we 
should be sure that this line should be removed.

> Unable to add additional product images from catalog
> 
>
> Key: OFBIZ-10673
> URL: https://issues.apache.org/jira/browse/OFBIZ-10673
> Project: OFBiz
>  Issue Type: Bug
>  Components: product
>Affects Versions: Trunk
>Reporter: Rohit Koushal
>Assignee: Rohit Koushal
>Priority: Major
> Attachments: OFBIZ-10673.patch, screenshot-1.png
>
>
> Unable to add additional product images from screen: Catalog > Products > 
> Content
> below is the screen for reference.
>  !screenshot-1.png! 
> Server logs:
> {code:java}
> 2018-11-24 18:40:52,454 |sse-nio-8443-exec-11 |CallService   
> |E| ERROR: Could not complete the Method to upload multiple Additional View 
> images for product 
> [file:/home/rohit/sandbox/ofbiz-framework/applications/product/minilang/product/product/ProductContentServices.xml#uploadProductAdditionalViewImages]
>  process [problem invoking the [addAdditionalViewForProduct] service with the 
> map named [addAdditionalViewForProductMap] containing 
> [{userLogin=[GenericEntity:UserLogin][createdStamp,2018-11-24 
> 11:21:56.719(java.sql.Timestamp)][createdTxStamp,2018-11-24 
> 11:21:56.716(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledBy,null()][disabledDateTime,null()][enabled,Y(java.lang.String)][externalAuthId,null()][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,Asia/Calcutta(java.lang.String)][lastUpdatedStamp,2018-11-24
>  14:59:33.347(java.sql.Timestamp)][lastUpdatedTxStamp,2018-11-24 
> 14:59:33.291(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,0(java.lang.Long)][userLdapDn,null()][userLoginId,admin(java.lang.String)],
>  visualTheme=visual-theme-id:RAINBOWSTONE_SAPHIR, display-name: Rainbow Stone 
> - Sapphire, description: , screenshots: 
> [/rainbowstone/images/themeSaphir.png], productId=GZ-1000, 
> _uploadedFile_contentType=image/png, 
> timeZone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=1980,dstSavings=0,useDaylight=false,transitions=6,lastRule=null],
>  locale=en_US, productContentTypeId=ADDITIONAL_IMAGE_1, 
> uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=1174673 cap=1174673], 
> _uploadedFile_fileName=Screenshot from 2018-10-23 09:02:57.png}]: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)]
> org.apache.ofbiz.service.GenericServiceException: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:115)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:103)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.callops.CallService.exec(CallService.java:217)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.ifops.IfNotEmpty.exec(IfNotEmpty.java:61) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at org.apache.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:457) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:274) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:293)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:79)
>  [ofbiz.jar:?]
> at 
> 

[jira] [Commented] (OFBIZ-10673) Unable to add additional product images from catalog

2018-11-24 Thread Rohit Koushal (JIRA)


[ 
https://issues.apache.org/jira/browse/OFBIZ-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16697811#comment-16697811
 ] 

Rohit Koushal commented on OFBIZ-10673:
---

On r1817623 this bug get introduced and causing additional image upload 
problem.  Attaching the patch to resolve the problem.

> Unable to add additional product images from catalog
> 
>
> Key: OFBIZ-10673
> URL: https://issues.apache.org/jira/browse/OFBIZ-10673
> Project: OFBiz
>  Issue Type: Bug
>  Components: product
>Affects Versions: Trunk
>Reporter: Rohit Koushal
>Assignee: Rohit Koushal
>Priority: Major
> Attachments: screenshot-1.png
>
>
> Unable to add additional product images from screen: Catalog > Products > 
> Content
> below is the screen for reference.
>  !screenshot-1.png! 
> Server logs:
> {code:java}
> 2018-11-24 18:40:52,454 |sse-nio-8443-exec-11 |CallService   
> |E| ERROR: Could not complete the Method to upload multiple Additional View 
> images for product 
> [file:/home/rohit/sandbox/ofbiz-framework/applications/product/minilang/product/product/ProductContentServices.xml#uploadProductAdditionalViewImages]
>  process [problem invoking the [addAdditionalViewForProduct] service with the 
> map named [addAdditionalViewForProductMap] containing 
> [{userLogin=[GenericEntity:UserLogin][createdStamp,2018-11-24 
> 11:21:56.719(java.sql.Timestamp)][createdTxStamp,2018-11-24 
> 11:21:56.716(java.sql.Timestamp)][currentPassword,{SHA}47b56994cbc2b6d10aa1be30f70165adb305a41a(java.lang.String)][disabledBy,null()][disabledDateTime,null()][enabled,Y(java.lang.String)][externalAuthId,null()][hasLoggedOut,N(java.lang.String)][isSystem,null()][lastCurrencyUom,null()][lastLocale,null()][lastTimeZone,Asia/Calcutta(java.lang.String)][lastUpdatedStamp,2018-11-24
>  14:59:33.347(java.sql.Timestamp)][lastUpdatedTxStamp,2018-11-24 
> 14:59:33.291(java.sql.Timestamp)][partyId,admin(java.lang.String)][passwordHint,null()][requirePasswordChange,null()][successiveFailedLogins,0(java.lang.Long)][userLdapDn,null()][userLoginId,admin(java.lang.String)],
>  visualTheme=visual-theme-id:RAINBOWSTONE_SAPHIR, display-name: Rainbow Stone 
> - Sapphire, description: , screenshots: 
> [/rainbowstone/images/themeSaphir.png], productId=GZ-1000, 
> _uploadedFile_contentType=image/png, 
> timeZone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=1980,dstSavings=0,useDaylight=false,transitions=6,lastRule=null],
>  locale=en_US, productContentTypeId=ADDITIONAL_IMAGE_1, 
> uploadedFile=java.nio.HeapByteBuffer[pos=0 lim=1174673 cap=1174673], 
> _uploadedFile_fileName=Screenshot from 2018-10-23 09:02:57.png}]: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)]
> org.apache.ofbiz.service.GenericServiceException: Service 
> [addAdditionalViewForProduct] target threw an unexpected exception (null)
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.serviceInvoker(StandardJavaEngine.java:115)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.engine.StandardJavaEngine.runSync(StandardJavaEngine.java:57)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.GenericDispatcherFactory$GenericDispatcher.runSync(GenericDispatcherFactory.java:103)
>  ~[ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.callops.CallService.exec(CallService.java:217)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.method.ifops.IfNotEmpty.exec(IfNotEmpty.java:61) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:310) 
> [ofbiz.jar:?]
> at org.apache.ofbiz.minilang.SimpleMethod.exec(SimpleMethod.java:457) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleMethod(SimpleMethod.java:274) 
> [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleMethod.runSimpleService(SimpleMethod.java:293)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleServiceEngine.serviceInvoker(SimpleServiceEngine.java:79)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.minilang.SimpleServiceEngine.runSync(SimpleServiceEngine.java:48)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:415)
>  [ofbiz.jar:?]
> at 
> org.apache.ofbiz.service.ServiceDispatcher.runSync(ServiceDispatcher.java:240)
>  [ofbiz.jar:?]
> at 
>