Adam, all,

this is interesting, thanks for the research.

I would suggest the following approach:

1) identify which one of the recent changes we did caused this error to happen
2) if possible, commit a temporary workaround for this to let the system work 
as before
3) file a bug in the Freemarker issue tracker
4) contact the Freemarker community to discuss the issue and try to schedule 
with them a new release date for the new release (2.3.20); ideally this will 
also contain my fixes for the deadlock condition affecting Freemarker
5) when the new Freemarker release will be issued, we upgrade OFBiz to it and 
we revert #2

I can help with #4 as I recently have been in touch with them.
Did you get a chance to figure out how many screens could are affected? If 
there are just a few then, instead of #2,we could commit a temporaray fix for 
the screens rather than a global one.

Kind regards,

Jacopo

On May 16, 2012, at 9:55 PM, Adam Heath wrote:

> On 05/16/2012 11:30 AM, Adam Heath wrote:
>> On 05/16/2012 11:18 AM, Adam Heath wrote:
>>> On 05/16/2012 11:05 AM, Adam Heath wrote:
>>>> On 05/16/2012 06:41 AM, Jacopo Cappellato wrote:
>>>>> https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderview?orderId=Demo1002
>>>> 
>>>> This may be a stupid question, but why doesn't "admin/ofbiz" work as a
>>>> login?  (right now, the admin account is disabled for 5 minutes,
>>>> that's my fault).
>>>> 
>>>> I can't yet see this error.  I'm updating to trunk, and will attempt
>>>> the same thing locally.
>>> 
>>> Is freemarker really this stupid?  Really?  That line is:
>>> 
>>> shipmentRouteSegments=delegator.findByAnd("ShipmentRouteSegment",
>>> {"shipmentId" : shipment.shipmentId}, null, false) [on line 581,
>>> column 25 in
>>> component://order/webapp/ordermgr/order/ordershippinginfo.ftl]
>>> 
>>> And there *is* a findByAnd in Delegator that has (String, Map, List,
>>> boolean).  Why is thinking that findByAnd(String, Object...) is the
>>> correct one to use?  I'm leaning towards this being a freemarker bug.
>>> 
>>> If one other person agrees with me, then I'll attempt to simulate it
>>> as a real freemark bug(new freemarker template, new object that
>>> implements similiar interfaces, isolated from any/all ofbiz code), to
>>> make reporting a freemark bug simpler.  And then fix freemarker myself.
>> 
>> Gah.  As a test, I tried placing the Object... variant last in both
>> the interface and the class.  No change, it still picks the wrong method.
>> 
>> Velocity, Freemarker, Groovy, Asm, and other similiar tools all go
>> from free-form text, to eventually call a method.  Every single tool
>> needs to be the most correct method to call.  And they all implement
>> their own way of figuring that out.  Does anyone know of something
>> that does that correctly in a simple library?  There is nothing in the
>> default java spec that does this(which is an oversite, imho).
> 
> Yes, absolute bug in freemarker.
> 
> s/null/[]/ in the ftl, and it picks the correct method.  I read the
> freemarker code to come to a workaround.  But I do not want to commit
> the workaround into ofbiz.
> 

Reply via email to