Well done!

Maurizio Cucchiara

Il giorno 17/set/2011 00.36, "JOSE L MARTINEZ-AVIAL" <jlm...@gmail.com> ha
scritto:
> Well, I opened a ticket with Oracle, and send them a testcase. They
> determined that it is a bug with the parsing of EL expression on WebLogic
> 10.3.0 for Windows. Later versions are not affected.
>
> Thank you for your help!
>
> 2011/8/31 Maurizio Cucchiara <mcucchi...@apache.org>
>
>> IIRC some application server provide their "custom" implementation of
>> the taglib library.
>> Looks like a WebLogic issue, after all there is no reason it works on
>> Linux (and also as you noticed, there is only one function declaration
>> inside JsonPlugin.tld).
>>
>> Maurizio Cucchiara
>>
>>
>>
>> On 31 August 2011 06:04, JOSE L MARTINEZ-AVIAL <jlm...@gmail.com> wrote:
>> > BTW, I just upgraded to Strus-2.2.3, and it fails too, but this time
the
>> > errors says Function 'json:serialize' specifies 6 params, but 1 were
>> > declared.
>> >
>> > 2011/8/30 JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>
>> >
>> >> It's strange. I remove the c:put, deploy the war, and it failed again.
>> When
>> >> I took a look at the java code generated by the JSP, and it has the
>> >> following declaration
>> >>
>> >> static private weblogic.jsp.internal.jsp.JspFunctionMapper _jspx_fnmap
=
>> >> weblogic.jsp.internal.jsp.JspFunctionMapper.getInstance();
>> >> static {_jspx_fnmap.mapFunction("json:serialize",
>> >> org.apache.struts2.json.JSONUtil.class, "serialize", new Class[]{
>> >> java.lang.Object .class , java.util.Collection .class ,
>> java.util.Collection
>> >> .class , boolean .class , boolean .class });
>> >> }
>> >>
>> >> So it is creating a Function Mapper for json:serialize that receives 5
>> >> arguments (Object, Collection, Collection, boolean, boolean). If one
>> takes a
>> >> look at the API(
>> >>
>>
http://struts.apache.org/2.1.8/struts2-plugins/struts2-json-plugin/apidocs/org/apache/struts2/json/JSONUtil.html#method_summary
>> ),
>> >> the method serialize is overloaded, so there is a method that receives
>> only
>> >> an object(The one that is declared on the TLD), and another one that
>> >> receives the same arguments defined on the JSP. It seems that the
>> WebLogic
>> >> is ignoring the TLD, and it is just using another method instead of
the
>> one
>> >> indicated on the TLD, which is defined as follows
>> >>
>> >> [...]
>> >> <function>
>> >> <name>serialize</name>
>> >>
>> <function-class>org.apache.struts2.json.JSONUtil</function-class>
>> >> <function-signature>
>> >> java.lang.String serialize(java.lang.Object)
>> >> </function-signature>
>> >> </function>
>> >> [...]
>> >>
>> >> Any idea of why it can behave that way? It's curious that on Linux it
>> works
>> >> fine, it only fails on Windows.
>> >>
>> >>
>> >>
>> >>
>> >> 2011/8/30 Maurizio Cucchiara <mcucchi...@apache.org>
>> >>
>> >>> Also, you should verify against the latest version (2.2.3).
>> >>> Again, IIRC there should be some similar trouble with the version you
>> are
>> >>> using.
>> >>>
>> >>> Maurizio Cucchiara
>> >>>
>> >>>
>> >>>
>> >>> On 30 August 2011 21:51, JOSE L MARTINEZ-AVIAL <jlm...@gmail.com>
>> wrote:
>> >>> > Hi,
>> >>> >
>> >>> > I'm using Struts 2.1.8, with plugin struts2-json-plugin-2.1.8.1.jar
>> in
>> >>> an
>> >>> > application deployed on WebLogic 10.3 ovver RedHat. We've been
using
>> the
>> >>> tag
>> >>> > json:serialize without issue for months. But today we installed the
>> same
>> >>> > version of WebLogic over Windowx 7, and every time that tag is
used,
>> we
>> >>> got
>> >>> > that error:
>> >>> >
>> >>> > Function 'json:serialize' specifies 5 params, but 1 were declared
>> >>> >
>> >>> > The tag is used as follows:
>> >>> >
>> >>> > var boxContent = <c:out value="${json:serialize(myDataStore)}"
>> >>> > escapeXml='false'/>;
>> >>> >
>> >>> > It is the same war we deployed (and it works) on our RedHat
>> environment,
>> >>> so
>> >>> > I don't understand why is giving such error message. Any ideas?
>> >>> >
>> >>> > Thanks
>> >>> >
>> >>> > JL
>> >>> >
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> >>> For additional commands, e-mail: user-h...@struts.apache.org
>> >>>
>> >>>
>> >>
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
>> For additional commands, e-mail: user-h...@struts.apache.org
>>
>>

Reply via email to