My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 189: Unable to convert string "${presidents}" to class "java.util.Collection" for attribute "items": Property Editor not registered with the PropertyEditorManager
1 person starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Apr 2009


 
Reported by drdmd...@gmail.com, Apr 16, 2009
I am working on a Struts+Spring+Hibernate project.

I am trying to use the 'JSP Tag' for 'Jmesa' but I have a great problem:
I receive this message when trying to display the JSP page that contain the
Jmesa Table:
<Unable to convert string "${presidents}" to class "java.util.Collection"
for attribute "items": Property Editor not registered with the
PropertyEditorManager>.

When returning a Collection named 'presidents' into 'request' from the
Action class, I can see the collection while doing
System.out.print(request.getAttribute("presidents") into the JSP page.

I have spent more than 3 days trying to resolve this but without any solution.
Please help me to overcome this problem.


Apr 16, 2009
Project Member #1 jeff.johnston.mn@gmail.com
What servlet container are you using (tomcat, websphere, etc...)?

Are you able to run the examples war file?
Apr 17, 2009
#2 drdmd...@gmail.com
I am using Tomcat 5.5 as a servlet container and the examples war file are working
very well.
Apr 17, 2009
Project Member #3 jeff.johnston.mn@gmail.com
I have not encountered that error before. Are you just using a plain POJO or Map for
your item (bean)? Are you using something called Property Editor? I did a quick
google but I couldn't really glean anything without really knowing what your using.

The tags are a super light wrapper over the API. Don't forget that you can get the
source and run locally to debug. I tried to make checking out the project to be as
simple as possible. If you have any problems I can help you out.

https://code.google.com/p/jmesa/wiki/ProjectBuild

Also don't forget that you can use the API directly too if that suits your needs. I
tend to use both the API and tags depending on what I am doing.

Lastly, make sure that you do not have the jmesa-retro jar in your classpath if you
are not running in a JDK1.4 environment.

Apr 21, 2009
#4 drdmd...@gmail.com
For all who have this problem. Here is the solution.

You have to download the "slf4j-log4j12.jar" and the problem will deseapear
Apr 21, 2009
Project Member #5 jeff.johnston.mn@gmail.com
Wow, how frustrating! I posted this solution on the wiki...

https://code.google.com/p/jmesa/wiki/MiscRecipes?ts=1240362217&updated=MiscRecipes
Status: Fixed
Apr 22, 2009
#6 drdmd...@gmail.com
No, the problem doesn't consist only on the omission of the "slf4j-log4j12.jar" but
also, you have to to modify your DTD in the WEB.XML to another that can resolve the
${expression} in the JSP.
If the problem doesn't disapear, you can contact me at this adress : drdmdisi@gmail.com
Jun 3, 2009
#7 kche...@gmail.com
I'm also facing the same problem ${expression} - Unable to convert string
"${catalog}" to class "java.util.Collection" for attribute "items": Property Editor
not registered with the PropertyEditorManager.

Can you pls help me out.

--Srini

Jul 27, 2009
#8 koolko...@gmail.com
I fixed this issue by doing this 
<jmesa:struts2TableFacade 
    id="actions"
    items="<%= (java.util.List<java.util.Map>)request.getAttribute(\"actions\") %>"
...
</jmesa:struts2TableFacade>

Don't like the \"actions\" ?
Use this
<%
java.util.List<java.util.Map> actionList = (java.util.List<java.util.Map>) 
request.getAttribute("actions");
%>
...
<jmesa:tableFacade 
    id="actions" 
    items="<%= actionList %>"
...
</jmesa:tableFacade>

It still work even if I use the <jmesa:tableFacade> tag

Nov 30, 2010
#9 smiley.p...@gmail.com
The issue is most likely caused by having your web.xml set to pre 2.5.
Should be at least 2.5 (possibly 2.4, didn't test that) so that EL (Expression Language) is interpreted correctly
Jun 21, 2011
#10 desmonda...@gmail.com
nope and nope....neither of these work.

Powered by Google Project Hosting