David,

Thank you for reporting this. I will look into it.

-Adrian


--- On Mon, 12/15/08, David E Jones <[email protected]> wrote:

> From: David E Jones <[email protected]>
> Subject: Issue with expression evaluation (possibly UEL related?)
> To: [email protected]
> Date: Monday, December 15, 2008, 1:24 AM
> To reproduce, from latest OFBiz revision and fresh database
> with it:
> 
> 1. in ecommerce (or Order Manager) place a sales order for
> 10 (anything more than 5) of product "GZ-2644";
> this will cause an inventory reservation against a bulk
> facility location, therefore needing a stock move before
> picking the order
> 2. place another order for "GZ-2644" so that
> there are at least 2 reservations against the bulk location
> 3. go to the Facility -> Stock Moves tab for the
> facility WebStoreWarehouse
> (https://localhost:8443/facility/control/PickMoveStock?facilityId=WebStoreWarehouse)
> 
> When the page renders you'll get an error, the main
> exception is (just first couple of lines):
> 
> 2008-12-15 02:12:58,331 (http-0.0.0.0-8443-1) [      
> SimpleMethod.java:926:ERROR]
> ---- runtime exception report
> --------------------------------------------------
> Error in simple-method operation [<field-to-list
> list-name="oiirailByProdMap.${orderItemShipGrpInvResAndItemLocation.productId}"
> field-name="orderItemShipGrpInvResAndItemLocation"
> map-name=""/>]: java.lang.ClassCastException:
> java.lang.Long
> Exception: java.lang.ClassCastException
> Message: java.lang.Long
> ---- stack trace
> ---------------------------------------------------------------
> java.lang.ClassCastException: java.lang.Long
> org.ofbiz.minilang.method.envops.FieldToList.exec(FieldToList.java:79)
> org.ofbiz.minilang.SimpleMethod.runSubOps(SimpleMethod.java:921)
> 
> This is happening in the StockMoveServices.xml file on line
> 65.
> 
> Somehow the expression
> "${oiirailByProdMap.${orderItemShipGrpInvResAndItemLocation.productId}"
> is evaluation to "-2,644" as evidenced by adding
> this log statement just before line the line 65 mentioned
> above:
> 
> <log level="info"
> message="orderItemShipGrpInvResAndItemLocation.productId=${orderItemShipGrpInvResAndItemLocation.productId}
>  oiirailByProdMap
> value=${oiirailByProdMap.${orderItemShipGrpInvResAndItemLocation.productId}"/>
> 
> The log shows:
> 
> 2008-12-15 02:18:46,896 (http-0.0.0.0-8443-1) [            
>    Log.java:110:INFO ]
> [StockMoveServices.xml#findStockMovesNeeded]
> orderItemShipGrpInvResAndItemLocation.productId=GZ-2644 
> oiirailByProdMap value=
> 2008-12-15 02:18:46,897 (http-0.0.0.0-8443-1) [            
>    Log.java:110:INFO ]
> [StockMoveServices.xml#findStockMovesNeeded]
> orderItemShipGrpInvResAndItemLocation.productId=GZ-2644 
> oiirailByProdMap value=-2,644
> 
> In other words, on the second line you can see where the
> expression that should return a List object instead returns
> a Long object with the value of "-2,644" which
> appears to be the productId GZ-2644 parsed as an integer...
> 
> Any ideas as to how this might be happening? I suspect it
> is an issue with the UEL stuff Adrian recently added, since
> this was working just a few days ago.
> 
> I'm guessing this is happening in other places too...
> 
> -David


      

Reply via email to