You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacques Le Roux <ja...@les7arts.com> on 2010/02/18 00:21:29 UTC

Converter changes issue?

Hi,

I have a problem with the recent converter changes I guess. In a custom application where I use a <list-options  I get an error
saying it's not a Map.

This is woirking if I revert to r909312. I will try to reproduce on a local update instance, I'm quite sure it's reproductible in 
the trunk

Unfortunately I can't help much on this right now as I will be in vacation for 4 days begining tonigh and it's already rather late 
here.

Jacques



Re: Converter changes issue?

Posted by Jacques Le Roux <ja...@les7arts.com>.
I did not reproduce with the lists used in the trunk OOTB (I tried Party Roles and Invoice Items)
But I can reproduce at r911227

I create a states list using (for instance)
<set field="states" value="${groovy: postalAddress?.countryGeoId ? org.ofbiz.common.CommonWorkers.getAssociatedStateList(delegator,
postalAddress.countryGeoId) : org.ofbiz.common.CommonWorkers.getAssociatedStateList(delegator, null)}" type="List"/>

and I use it in (slightly changed for custom labels)

        <field use-when="states!=null" name="stateProvinceGeoId" title="${uiLabelMap.StateWithSpacesPrefix}"
tooltip="${uiLabelMap.Required}" widget-style="required">
            <drop-down allow-empty="false">
                <list-options list-name="states" key-name="geoId" description="${geoName}"/>
            </drop-down>
        </field>

I get

2010-02-18 00:58:04,734 (http-0.0.0.0-8443-4) [        ModelScreen.java:399:ERROR] Error rendering screen
[component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.ClassCastException: Not a map
. Rolling back transaction.
2010-02-18 00:58:04,734 (http-0.0.0.0-8443-4) [    TransactionUtil.java:372:WARN ]
---- exception report ----------------------------------------------------------
[TransactionUtil.setRollbackOnly] Calling transaction setRollbackOnly; this stack trace shows where this is happening:
Exception: java.lang.Exception
Message: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]: java.lang.ClassCastException: Not a
map
---- stack trace ---------------------------------------------------------------
java.lang.Exception: Error rendering screen [component://common/widget/CommonScreens.xml#GlobalDecorator]:
java.lang.ClassCastException: Not a map
org.ofbiz.entity.transaction.TransactionUtil.setRollbackOnly(TransactionUtil.java:372)
org.ofbiz.entity.transaction.TransactionUtil.rollback(TransactionUtil.java:319)
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:402)
org.ofbiz.widget.screen.ModelScreenWidget$IncludeScreen.renderWidgetString(ModelScreenWidget.java:576)
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:137)
org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:228)
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:394)
org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:672)
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:137)
org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:228)
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:394)
org.ofbiz.widget.screen.ModelScreenWidget$DecoratorScreen.renderWidgetString(ModelScreenWidget.java:672)
org.ofbiz.widget.screen.ModelScreenWidget.renderSubWidgetsString(ModelScreenWidget.java:137)
org.ofbiz.widget.screen.ModelScreenWidget$Section.renderWidgetString(ModelScreenWidget.java:228)
org.ofbiz.widget.screen.ModelScreen.renderScreenString(ModelScreen.java:394)
org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:135)
org.ofbiz.widget.screen.ScreenRenderer.render(ScreenRenderer.java:97)
org.ofbiz.widget.screen.MacroScreenViewHandler.render(MacroScreenViewHandler.java:104)
org.ofbiz.webapp.control.RequestHandler.renderView(RequestHandler.java:835)
org.ofbiz.webapp.control.RequestHandler.doRequest(RequestHandler.java:554)
org.ofbiz.webapp.control.ControlServlet.doGet(ControlServlet.java:223)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.ofbiz.webapp.control.ContextFilter.doFilter(ContextFilter.java:266)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)

HTH (I can't do more right now)

Jacques

From: "Jacques Le Roux" <ja...@les7arts.com>
> I'm workin on it :/
>
> Just a little annoying as it's past midnight here and my wife will be waiting me tomorrow morning for our 4 vacation days she is
> waiting for so long... Life...
>
> Jacques
>
> From: "Adam Heath" <do...@brainfood.com>
>> Jacques Le Roux wrote:
>>> Hi,
>>>
>>> I have a problem with the recent converter changes I guess. In a custom
>>> application where I use a <list-options  I get an error
>>> saying it's not a Map.
>>>
>>> This is woirking if I revert to r909312. I will try to reproduce on a
>>> local update instance, I'm quite sure it's reproductible in the trunk
>>>
>>> Unfortunately I can't help much on this right now as I will be in
>>> vacation for 4 days begining tonigh and it's already rather late here.
>>
>> It would be nice to have more info on this, like at the very least
>> what actual version you were running, not just one that happened to
>> work for you.
>>
>> For reference, there was a point where I changed how the converters
>> worked, to be different than what Adrian initially designed.  Last
>> week, I ended up undoing most of those modifications, and implemented
>> my features in a different way, that shouldn't affect anyone else.
>>
>
>



Re: Converter changes issue?

Posted by Jacques Le Roux <ja...@les7arts.com>.
I'm workin on it :/

Just a little annoying as it's past midnight here and my wife will be waiting me tomorrow morning for our 4 vacation days she is 
waiting for so long... Life...

Jacques

From: "Adam Heath" <do...@brainfood.com>
> Jacques Le Roux wrote:
>> Hi,
>>
>> I have a problem with the recent converter changes I guess. In a custom
>> application where I use a <list-options  I get an error
>> saying it's not a Map.
>>
>> This is woirking if I revert to r909312. I will try to reproduce on a
>> local update instance, I'm quite sure it's reproductible in the trunk
>>
>> Unfortunately I can't help much on this right now as I will be in
>> vacation for 4 days begining tonigh and it's already rather late here.
>
> It would be nice to have more info on this, like at the very least
> what actual version you were running, not just one that happened to
> work for you.
>
> For reference, there was a point where I changed how the converters
> worked, to be different than what Adrian initially designed.  Last
> week, I ended up undoing most of those modifications, and implemented
> my features in a different way, that shouldn't affect anyone else.
> 



Re: Converter changes issue?

Posted by Adam Heath <do...@brainfood.com>.
Jacques Le Roux wrote:
> Hi,
> 
> I have a problem with the recent converter changes I guess. In a custom
> application where I use a <list-options  I get an error
> saying it's not a Map.
> 
> This is woirking if I revert to r909312. I will try to reproduce on a
> local update instance, I'm quite sure it's reproductible in the trunk
> 
> Unfortunately I can't help much on this right now as I will be in
> vacation for 4 days begining tonigh and it's already rather late here.

It would be nice to have more info on this, like at the very least
what actual version you were running, not just one that happened to
work for you.

For reference, there was a point where I changed how the converters
worked, to be different than what Adrian initially designed.  Last
week, I ended up undoing most of those modifications, and implemented
my features in a different way, that shouldn't affect anyone else.


Re: Converter changes issue?

Posted by Jacques Le Roux <ja...@les7arts.com>.
Thanks Adrian,

I did not change anything in the trunk but the theme and locales.available in general.properties, also I use Postgres, that's all.
This is for sure reproductible with the last info I sent

Jacques

From: "Adrian Crum" <ad...@hlmksw.com>
>I am unable to reproduce that problem in the trunk.
> 
> -Adrian
> 
> Jacques Le Roux wrote:
>> Hi,
>> 
>> I have a problem with the recent converter changes I guess. In a custom 
>> application where I use a <list-options  I get an error
>> saying it's not a Map.
>> 
>> This is woirking if I revert to r909312. I will try to reproduce on a 
>> local update instance, I'm quite sure it's reproductible in the trunk
>> 
>> Unfortunately I can't help much on this right now as I will be in 
>> vacation for 4 days begining tonigh and it's already rather late here.
>> 
>> Jacques
>> 
>> 
>> 
>


Re: Converter changes issue?

Posted by Adrian Crum <ad...@hlmksw.com>.
I am unable to reproduce that problem in the trunk.

-Adrian

Jacques Le Roux wrote:
> Hi,
> 
> I have a problem with the recent converter changes I guess. In a custom 
> application where I use a <list-options  I get an error
> saying it's not a Map.
> 
> This is woirking if I revert to r909312. I will try to reproduce on a 
> local update instance, I'm quite sure it's reproductible in the trunk
> 
> Unfortunately I can't help much on this right now as I will be in 
> vacation for 4 days begining tonigh and it's already rather late here.
> 
> Jacques
> 
> 
>