| 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 |
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
Apr 17, 2009
I am using Tomcat 5.5 as a servlet container and the examples war file are working very well.
Apr 17, 2009
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
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
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
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
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
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
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
nope and nope....neither of these work. |