2024-01-23 22:37:23,995 [http-nio-127.0.0.1-8080-exec-8] ERROR org.openbravo.mobile.core.process.ProcessHQLQuery - org.openbravo.pos2.product.label.printing.master.ProductExtension: Error when generating query: -- (org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: , near line 1, column 331 [select coalesce((select sum(sd.quantityOnHand - sd.reservedQty) from Organization o join o.organizationWarehouseList ow join ow.warehouse w join w.locatorList l join l.inventoryStatus ls left join l.materialMgmtStorageDetailList sd with sd.product.id = product.id where o.id = :orgId and ls.available = true ), 0) as storeStock, , coalesce(pppe.pos2plpPrintpriceoptions, ppp.pos2plpPrintpriceoptions) as pos2plpPrintpriceoptions, ppp.standardPrice as nonCommercialPrice, COALESCE((SELECT opt1.taxCategory.id FROM OBFMTC_Product_TaxCategory opt1 WHERE opt1.active is true and opt1.product.id = product.id AND ad_isorgincluded(:orgId, opt1.organization.id, product.client.id) = (SELECT MIN(ad_isorgincluded(:orgId, opt2.organization.id, product.client.id)) FROM OBFMTC_Product_TaxCategory opt2 WHERE opt2.active is true and opt2.product.id = product.id AND ad_isorgincluded(:orgId, opt2.organization.id, product.client.id) >= 0) ), product.taxCategory.id) as taxCategory, product.obpos2NoStandardSale as obpos2NoStandardSale, product.productCategory.name as obpos2ProductCategoryName, case when product.obpos2Color is null then null else (select hexColor from Color where id = product.obpos2Color.id) end as color, product.obpos2Imageclass as obpos2Image, product.obpos2Pickupptype.id as obpos2PickuppointType, product.obpos2Deliveryctype.id as obpos2DeliverycontrolType, product.obpos2Notificationptype.id as obpos2NotificationpointType, coalesce(pppe.obpos2Printpriceoptions, ppp.obpos2Printpriceoptions) as obpos2Printpriceoptions, coalesce(pppe.obpos2Printpriceoptionsui, ppp.obpos2Printpriceoptionsui) as obpos2Printpriceoptionsui, product.obrdmDeliveryMode as obrdmDeliveryMode, product.obrdmDeliveryModeLyw as obrdmDeliveryModeLyw, product.obrdmIsdeliveryservice as obrdmIsdeliveryservice, product.id as id, product.organization.id as organization, product.searchKey as searchkey, product.name as _identifier, product.productCategory.id as productCategory, product.obposScale as obposScale, product.uOM.id as uOM, product.uOM.symbol as uOMsymbol, coalesce(product.uOM.standardPrecision) as uOMstandardPrecision, upper(product.uPCEAN) as uPCEAN, product.description as description, product.obposGroupedproduct as groupProduct, product.stocked as stocked, product.obposShowstock as showstock, product.isGeneric as isGeneric, product.productStatus.id as productStatus, product.genericProduct.id as generic_product_id, product.characteristicDescription as characteristicDescription, product.characteristicDescription||',' as characteristicDescriptionSearch, product.obposShowChDesc as showchdesc, product.productType as productType, product.includedProductCategories as includeProductCategories, product.includedProducts as includeProducts, product.printDescription as printDescription, product.oBPOSAllowAnonymousSale as oBPOSAllowAnonymousSale, product.returnable as returnable, product.overdueReturnDays as overdueReturnDays, product.ispricerulebased as isPriceRuleBased, product.obposProposalType as proposalType, product.obposIsmultiselectable as availableForMultiline, product.linkedToProduct as isLinkedToProduct, product.modifyTax as modifyTax, product.allowDeferredSell as allowDeferredSell, product.deferredSellMaxDays as deferredSellMaxDays, product.quantityRule as quantityRule, product.obposPrintservices as isPrintServices, product.weight as weight, false as crossStore, product.obposMaxpriceassocprod as obposMaxpriceassocprod, product.obposMinpriceassocprod as obposMinpriceassocprod, product.productCategory.obposMandatoryIssuance as isMandatoryIssuance, img.bindaryData as img, img.id as imgId, img.mimetype as mimetype, pli.bestseller as bestseller, pli.productStatus.id as productAssortmentStatus, coalesce(pppe.listPrice,ppp.listPrice) as listPrice, coalesce(pppe.standardPrice,ppp.standardPrice) as standardPrice, ppp.priceLimit as priceLimit, ppp.obposMaxPrice as maxPrice, ppp.cost as cost, coalesce(pppe.obposUseExtpromotions, ppp.obposUseextpromotions) as useExtPromotions, case when product.oBPOSSkipApplyPromotions = 'Y' or ppp.oBPOSSkipApplyPromotions = 'Y' then true else false end as skipApplyPromotions, ppp.algorithm as algorithm, case when product.active = 'Y' and coalesce(pli.active, 'Y') = 'Y' and coalesce(ppp.active, 'Y') = 'Y' and coalesce(pppe.active, 'Y') = 'Y' then true else false end as active, product.obposEditablePrice as obposEditablePrice, 'false' as ispack, case when product.attributeSet is not null then true else false end as hasAttributes, case when attrset.serialNo = 'Y' then true else false end as isSerialNo, product.obmupcMultiupcDesc as obmupcMultiupcDesc, (select template.templatePath from OBPOS_Print_Template template where product.obpgcPrinttemplate.id=template.id) as printTemplate, (select template.templatePath from OBPOS_Print_Template template where product.obpgcPrinttempemail.id=template.id) as printTemplateEmail, product.obpgcPrintcard as printCard, (select template.ispdf from OBPOS_Print_Template template where product.obpgcPrinttemplate.id=template.id) as templateIsPdf, (select template.printer from OBPOS_Print_Template template where product.obpgcPrinttemplate.id=template.id) as templatePrinter, product.obpgcUseautomaticseq as useAutomaticSequence, product.obgcneExpirationdays as expirationDays, product.gcnvGiftcardtype as gcnvGiftcardtype, product.gcnvAmount as gcnvInitialAmount, product.gcnvAspaymentmethod as gcnvAsPaymentMethod, product.gcnvRedemptiontype as gcnvRedemptionType, product.gcnvTaxablegiftcard as gcnvTaxablegiftcard, product.gcnvDiscountsrestricted as gcnvDiscountsrestricted FROM OBRETCO_Prol_Product as pli inner join pli.product as product left outer join product.image img left join product.attributeSet as attrset inner join product.pricingProductPriceList ppp left join ppp.pricingProductPriceExceptionList pppe with (( pppe.organization.id in (:valueEqArray5 )) and pppe.validFromDate <= :terminalDate AND pppe.validToDate >= :terminalDate and pppe.orgdepth = ( select max(pre.orgdepth) from PricingProductPriceException pre where pre.productPrice.id = ppp.id and pre.validFromDate <= :terminalDate AND pre.validToDate >= :terminalDate and ( pre.organization.id in (:valueEqArray4 )) and (pre.active = 'Y') )) WHERE 1=1 AND ( (upper(product.searchKey) like upper(:valueCon0 ) OR upper(upper(product.uPCEAN)) like upper(:valueCon1 ) OR upper(product.name) like upper(:valueCon2 )) AND ('false'='false') ) AND 1=1 AND (pli.obretcoProductlist.id = :productListId) AND (ppp.priceListVersion.id = :priceListVersionId) AND (( (product.active = 'Y') ) AND ( (pli.active = 'Y') ) AND ( (product.uOM.active = 'Y') ) AND ( (ppp.active = 'Y') )) and 1=1 order by product.id]) java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: , near line 1, column 331 [select coalesce((select sum(sd.quantityOnHand - sd.reservedQty) from Organization o join o.organizationWarehouseList ow join ow.warehouse w join w.locatorList l join l.inventoryStatus ls left join l.materialMgmtStorageDetailList sd with sd.product.id = product.id where o.id = :orgId and ls.available = true ), 0) as storeStock, , coalesce(pppe.pos2plpPrintpriceoptions, ppp.pos2plpPrintpriceoptions) as pos2plpPrintpriceoptions, ppp.standardPrice as nonCommercialPrice, COALESCE((SELECT opt1.taxCategory.id FROM OBFMTC_Product_TaxCategory opt1 WHERE opt1.active is true and opt1.product.id = product.id AND ad_isorgincluded(:orgId, opt1.organization.id, product.client.id) = (SELECT MIN(ad_isorgincluded(:orgId, opt2.organization.id, product.client.id)) FROM OBFMTC_Product_TaxCategory opt2 WHERE opt2.active is true and opt2.product.id = product.id AND ad_isorgincluded(:orgId, opt2.organization.id, product.client.id) >= 0) ), product.taxCategory.id) as taxCategory, product.obpos2NoStandardSale as obpos2NoStandardSale, product.productCategory.name as obpos2ProductCategoryName, case when product.obpos2Color is null then null else (select hexColor from Color where id = product.obpos2Color.id) end as color, product.obpos2Imageclass as obpos2Image, product.obpos2Pickupptype.id as obpos2PickuppointType, product.obpos2Deliveryctype.id as obpos2DeliverycontrolType, product.obpos2Notificationptype.id as obpos2NotificationpointType, coalesce(pppe.obpos2Printpriceoptions, ppp.obpos2Printpriceoptions) as obpos2Printpriceoptions, coalesce(pppe.obpos2Printpriceoptionsui, ppp.obpos2Printpriceoptionsui) as obpos2Printpriceoptionsui, product.obrdmDeliveryMode as obrdmDeliveryMode, product.obrdmDeliveryModeLyw as obrdmDeliveryModeLyw, product.obrdmIsdeliveryservice as obrdmIsdeliveryservice, product.id as id, product.organization.id as organization, product.searchKey as searchkey, product.name as _identifier, product.productCategory.id as productCategory, product.obposScale as obposScale, product.uOM.id as uOM, product.uOM.symbol as uOMsymbol, coalesce(product.uOM.standardPrecision) as uOMstandardPrecision, upper(product.uPCEAN) as uPCEAN, product.description as description, product.obposGroupedproduct as groupProduct, product.stocked as stocked, product.obposShowstock as showstock, product.isGeneric as isGeneric, product.productStatus.id as productStatus, product.genericProduct.id as generic_product_id, product.characteristicDescription as characteristicDescription, product.characteristicDescription||',' as characteristicDescriptionSearch, product.obposShowChDesc as showchdesc, product.productType as productType, product.includedProductCategories as includeProductCategories, product.includedProducts as includeProducts, product.printDescription as printDescription, product.oBPOSAllowAnonymousSale as oBPOSAllowAnonymousSale, product.returnable as returnable, product.overdueReturnDays as overdueReturnDays, product.ispricerulebased as isPriceRuleBased, product.obposProposalType as proposalType, product.obposIsmultiselectable as availableForMultiline, product.linkedToProduct as isLinkedToProduct, product.modifyTax as modifyTax, product.allowDeferredSell as allowDeferredSell, product.deferredSellMaxDays as deferredSellMaxDays, product.quantityRule as quantityRule, product.obposPrintservices as isPrintServices, product.weight as weight, false as crossStore, product.obposMaxpriceassocprod as obposMaxpriceassocprod, product.obposMinpriceassocprod as obposMinpriceassocprod, product.productCategory.obposMandatoryIssuance as isMandatoryIssuance, img.bindaryData as img, img.id as imgId, img.mimetype as mimetype, pli.bestseller as bestseller, pli.productStatus.id as productAssortmentStatus, coalesce(pppe.listPrice,ppp.listPrice) as listPrice, coalesce(pppe.standardPrice,ppp.standardPrice) as standardPrice, ppp.priceLimit as priceLimit, ppp.obposMaxPrice as maxPrice, ppp.cost as cost, coalesce(pppe.obposUseExtpromotions, ppp.obposUseextpromotions) as useExtPromotions, case when product.oBPOSSkipApplyPromotions = 'Y' or ppp.oBPOSSkipApplyPromotions = 'Y' then true else false end as skipApplyPromotions, ppp.algorithm as algorithm, case when product.active = 'Y' and coalesce(pli.active, 'Y') = 'Y' and coalesce(ppp.active, 'Y') = 'Y' and coalesce(pppe.active, 'Y') = 'Y' then true else false end as active, product.obposEditablePrice as obposEditablePrice, 'false' as ispack, case when product.attributeSet is not null then true else false end as hasAttributes, case when attrset.serialNo = 'Y' then true else false end as isSerialNo, product.obmupcMultiupcDesc as obmupcMultiupcDesc, (select template.templatePath from OBPOS_Print_Template template where product.obpgcPrinttemplate.id=template.id) as printTemplate, (select template.templatePath from OBPOS_Print_Template template where product.obpgcPrinttempemail.id=template.id) as printTemplateEmail, product.obpgcPrintcard as printCard, (select template.ispdf from OBPOS_Print_Template template where product.obpgcPrinttemplate.id=template.id) as templateIsPdf, (select template.printer from OBPOS_Print_Template template where product.obpgcPrinttemplate.id=template.id) as templatePrinter, product.obpgcUseautomaticseq as useAutomaticSequence, product.obgcneExpirationdays as expirationDays, product.gcnvGiftcardtype as gcnvGiftcardtype, product.gcnvAmount as gcnvInitialAmount, product.gcnvAspaymentmethod as gcnvAsPaymentMethod, product.gcnvRedemptiontype as gcnvRedemptionType, product.gcnvTaxablegiftcard as gcnvTaxablegiftcard, product.gcnvDiscountsrestricted as gcnvDiscountsrestricted FROM OBRETCO_Prol_Product as pli inner join pli.product as product left outer join product.image img left join product.attributeSet as attrset inner join product.pricingProductPriceList ppp left join ppp.pricingProductPriceExceptionList pppe with (( pppe.organization.id in (:valueEqArray5 )) and pppe.validFromDate <= :terminalDate AND pppe.validToDate >= :terminalDate and pppe.orgdepth = ( select max(pre.orgdepth) from PricingProductPriceException pre where pre.productPrice.id = ppp.id and pre.validFromDate <= :terminalDate AND pre.validToDate >= :terminalDate and ( pre.organization.id in (:valueEqArray4 )) and (pre.active = 'Y') )) WHERE 1=1 AND ( (upper(product.searchKey) like upper(:valueCon0 ) OR upper(upper(product.uPCEAN)) like upper(:valueCon1 ) OR upper(product.name) like upper(:valueCon2 )) AND ('false'='false') ) AND 1=1 AND (pli.obretcoProductlist.id = :productListId) AND (ppp.priceListVersion.id = :priceListVersionId) AND (( (product.active = 'Y') ) AND ( (pli.active = 'Y') ) AND ( (product.uOM.active = 'Y') ) AND ( (ppp.active = 'Y') )) and 1=1 order by product.id] at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:138) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:181) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:188) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:757) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:114) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.openbravo.mobile.core.process.SimpleQueryBuilder.getDalQuery(SimpleQueryBuilder.java:786) ~[classes/:?] at org.openbravo.mobile.core.process.ProcessHQLQuery.exec(ProcessHQLQuery.java:213) [classes/:?] at org.openbravo.mobile.core.process.SecuredJSONProcess.secureExec(SecuredJSONProcess.java:66) [classes/:?] at org.openbravo.mobile.core.process.MobileServiceProcessor.execProcess(MobileServiceProcessor.java:141) [classes/:?] at org.openbravo.mobile.core.process.MobileServiceProcessor.execServiceName(MobileServiceProcessor.java:116) [classes/:?] at org.openbravo.mobile.core.process.MobileService.doGetOrPost(MobileService.java:199) [classes/:?] at org.openbravo.mobile.core.process.MobileService.doPost(MobileService.java:76) [classes/:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:660) [tomcat9-servlet-api-9.0.31.jar:?] at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:200) [openbravo-core.jar:?] at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:461) [classes/:?] at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:89) [classes/:?] at org.openbravo.mobile.core.process.WebServiceAuthenticatedServlet.service(WebServiceAuthenticatedServlet.java:67) [classes/:?] at org.openbravo.mobile.core.process.MobileService.service(MobileService.java:135) [classes/:?] at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) [tomcat9-servlet-api-9.0.31.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) [tomcat9-websocket-9.0.31.jar:9.0.31] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66) [openbravo-core.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:38) [openbravo-core.jar:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:65) [classes/:?] at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:47) [classes/:?] at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:74) [classes/:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:96) [classes/:?] at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:47) [classes/:?] at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:118) [classes/:?] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.logging.log4j.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:71) [log4j-web-2.17.1.jar:2.17.1] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:747) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343) [tomcat9-catalina-9.0.31.jar:9.0.31] at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:375) [tomcat9-coyote-9.0.31.jar:9.0.31] at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) [tomcat9-coyote-9.0.31.jar:9.0.31] at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:868) [tomcat9-coyote-9.0.31.jar:9.0.31] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1594) [tomcat9-coyote-9.0.31.jar:9.0.31] at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) [tomcat9-coyote-9.0.31.jar:9.0.31] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat9-util-9.0.31.jar:9.0.31] at java.lang.Thread.run(Thread.java:829) [?:?] Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: unexpected token: , near line 1, column 331 [select coalesce((select sum(sd.quantityOnHand - sd.reservedQty) from Organization o join o.organizationWarehouseList ow join ow.warehouse w join w.locatorList l join l.inventoryStatus ls left join l.materialMgmtStorageDetailList sd with sd.product.id = product.id where o.id = :orgId and ls.available = true ), 0) as storeStock, , coalesce(pppe.pos2plpPrintpriceoptions, ppp.pos2plpPrintpriceoptions) as pos2plpPrintpriceoptions, ppp.standardPrice as nonCommercialPrice, COALESCE((SELECT opt1.taxCategory.id FROM OBFMTC_Product_TaxCategory opt1 WHERE opt1.active is true and opt1.product.id = product.id AND ad_isorgincluded(:orgId, opt1.organization.id, product.client.id) = (SELECT MIN(ad_isorgincluded(:orgId, opt2.organization.id, product.client.id)) FROM OBFMTC_Product_TaxCategory opt2 WHERE opt2.active is true and opt2.product.id = product.id AND ad_isorgincluded(:orgId, opt2.organization.id, product.client.id) >= 0) ), product.taxCategory.id) as taxCategory, product.obpos2NoStandardSale as obpos2NoStandardSale, product.productCategory.name as obpos2ProductCategoryName, case when product.obpos2Color is null then null else (select hexColor from Color where id = product.obpos2Color.id) end as color, product.obpos2Imageclass as obpos2Image, product.obpos2Pickupptype.id as obpos2PickuppointType, product.obpos2Deliveryctype.id as obpos2DeliverycontrolType, product.obpos2Notificationptype.id as obpos2NotificationpointType, coalesce(pppe.obpos2Printpriceoptions, ppp.obpos2Printpriceoptions) as obpos2Printpriceoptions, coalesce(pppe.obpos2Printpriceoptionsui, ppp.obpos2Printpriceoptionsui) as obpos2Printpriceoptionsui, product.obrdmDeliveryMode as obrdmDeliveryMode, product.obrdmDeliveryModeLyw as obrdmDeliveryModeLyw, product.obrdmIsdeliveryservice as obrdmIsdeliveryservice, product.id as id, product.organization.id as organization, product.searchKey as searchkey, product.name as _identifier, product.productCategory.id as productCategory, product.obposScale as obposScale, product.uOM.id as uOM, product.uOM.symbol as uOMsymbol, coalesce(product.uOM.standardPrecision) as uOMstandardPrecision, upper(product.uPCEAN) as uPCEAN, product.description as description, product.obposGroupedproduct as groupProduct, product.stocked as stocked, product.obposShowstock as showstock, product.isGeneric as isGeneric, product.productStatus.id as productStatus, product.genericProduct.id as generic_product_id, product.characteristicDescription as characteristicDescription, product.characteristicDescription||',' as characteristicDescriptionSearch, product.obposShowChDesc as showchdesc, product.productType as productType, product.includedProductCategories as includeProductCategories, product.includedProducts as includeProducts, product.printDescription as printDescription, product.oBPOSAllowAnonymousSale as oBPOSAllowAnonymousSale, product.returnable as returnable, product.overdueReturnDays as overdueReturnDays, product.ispricerulebased as isPriceRuleBased, product.obposProposalType as proposalType, product.obposIsmultiselectable as availableForMultiline, product.linkedToProduct as isLinkedToProduct, product.modifyTax as modifyTax, product.allowDeferredSell as allowDeferredSell, product.deferredSellMaxDays as deferredSellMaxDays, product.quantityRule as quantityRule, product.obposPrintservices as isPrintServices, product.weight as weight, false as crossStore, product.obposMaxpriceassocprod as obposMaxpriceassocprod, product.obposMinpriceassocprod as obposMinpriceassocprod, product.productCategory.obposMandatoryIssuance as isMandatoryIssuance, img.bindaryData as img, img.id as imgId, img.mimetype as mimetype, pli.bestseller as bestseller, pli.productStatus.id as productAssortmentStatus, coalesce(pppe.listPrice,ppp.listPrice) as listPrice, coalesce(pppe.standardPrice,ppp.standardPrice) as standardPrice, ppp.priceLimit as priceLimit, ppp.obposMaxPrice as maxPrice, ppp.cost as cost, coalesce(pppe.obposUseExtpromotions, ppp.obposUseextpromotions) as useExtPromotions, case when product.oBPOSSkipApplyPromotions = 'Y' or ppp.oBPOSSkipApplyPromotions = 'Y' then true else false end as skipApplyPromotions, ppp.algorithm as algorithm, case when product.active = 'Y' and coalesce(pli.active, 'Y') = 'Y' and coalesce(ppp.active, 'Y') = 'Y' and coalesce(pppe.active, 'Y') = 'Y' then true else false end as active, product.obposEditablePrice as obposEditablePrice, 'false' as ispack, case when product.attributeSet is not null then true else false end as hasAttributes, case when attrset.serialNo = 'Y' then true else false end as isSerialNo, product.obmupcMultiupcDesc as obmupcMultiupcDesc, (select template.templatePath from OBPOS_Print_Template template where product.obpgcPrinttemplate.id=template.id) as printTemplate, (select template.templatePath from OBPOS_Print_Template template where product.obpgcPrinttempemail.id=template.id) as printTemplateEmail, product.obpgcPrintcard as printCard, (select template.ispdf from OBPOS_Print_Template template where product.obpgcPrinttemplate.id=template.id) as templateIsPdf, (select template.printer from OBPOS_Print_Template template where product.obpgcPrinttemplate.id=template.id) as templatePrinter, product.obpgcUseautomaticseq as useAutomaticSequence, product.obgcneExpirationdays as expirationDays, product.gcnvGiftcardtype as gcnvGiftcardtype, product.gcnvAmount as gcnvInitialAmount, product.gcnvAspaymentmethod as gcnvAsPaymentMethod, product.gcnvRedemptiontype as gcnvRedemptionType, product.gcnvTaxablegiftcard as gcnvTaxablegiftcard, product.gcnvDiscountsrestricted as gcnvDiscountsrestricted FROM OBRETCO_Prol_Product as pli inner join pli.product as product left outer join product.image img left join product.attributeSet as attrset inner join product.pricingProductPriceList ppp left join ppp.pricingProductPriceExceptionList pppe with (( pppe.organization.id in (:valueEqArray5 )) and pppe.validFromDate <= :terminalDate AND pppe.validToDate >= :terminalDate and pppe.orgdepth = ( select max(pre.orgdepth) from PricingProductPriceException pre where pre.productPrice.id = ppp.id and pre.validFromDate <= :terminalDate AND pre.validToDate >= :terminalDate and ( pre.organization.id in (:valueEqArray4 )) and (pre.active = 'Y') )) WHERE 1=1 AND ( (upper(product.searchKey) like upper(:valueCon0 ) OR upper(upper(product.uPCEAN)) like upper(:valueCon1 ) OR upper(product.name) like upper(:valueCon2 )) AND ('false'='false') ) AND 1=1 AND (pli.obretcoProductlist.id = :productListId) AND (ppp.priceListVersion.id = :priceListVersionId) AND (( (product.active = 'Y') ) AND ( (pli.active = 'Y') ) AND ( (product.uOM.active = 'Y') ) AND ( (ppp.active = 'Y') )) and 1=1 order by product.id] at org.hibernate.hql.internal.ast.QuerySyntaxException.convert(QuerySyntaxException.java:74) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.hql.internal.ast.ErrorTracker.throwQueryException(ErrorTracker.java:93) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.parse(QueryTranslatorImpl.java:301) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:189) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:144) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.engine.query.spi.HQLQueryPlan.(HQLQueryPlan.java:112) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.engine.query.spi.HQLQueryPlan.(HQLQueryPlan.java:73) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:162) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:636) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:748) ~[hibernate-core-5.6.15.Final.jar:5.6.15.Final] ... 56 more