[
http://www.stripesframework.org/jira/browse/STS-888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12780#comment-12780
]
Michael Pridemore commented on STS-888:
---------------------------------------
Ok I may have jumped the gun here.
The ultimate problem was the Java EL spec doesn't like it when you use Java
identifiers in an expression. So the use of "this" is the problem. I had
actually run into this problem earlier in development and worked around it by
adding the flag -Dorg.apache.el.parser.SKIP_IDENTIFIER_CHECK=true to the Tomcat
startup script. Somehow this got turned off in my IDE coinciding with the
upgrade to Stripes 1.5.7 which is why I thought that was the problem.
But I am puzzled as to why the exception I'm getting isn't the usual one. I'd
expect to see something like:
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /WEB-INF/jsp/xxx.jsp(100,0) “${this ==
user.password}”
contains invalid expression(s): javax.el.ELException: [this] is not a valid
Java identifier
But instead I'm seeing:
java.lang.IllegalArgumentException: can't parse argument number this ==
user.password
Any ideas?
> It appears @Validate(expression) functionality is broken
> --------------------------------------------------------
>
> Key: STS-888
> URL: http://www.stripesframework.org/jira/browse/STS-888
> Project: Stripes
> Issue Type: Bug
> Components: Validation
> Affects Versions: Release 1.5.7
> Environment: Stripes 1.5.7 running under Tomcat 7.0.29, Java
> 1.6.0_33-b03-424-11M3720 on Mac OS X (10.8).
> Reporter: Michael Pridemore
>
> I am testing the upgrade to 1.5.7 on an existing (working) project.
> Everywhere I use @Validate(expression) I am now getting errors/stacktraces.
> For example, I have an ActionBean with this:
> @ValidateNestedPropertes({
> @Validate(field = "password", required = true, minlength = 8)
> })
> MDUser user;
> @Validate(required = true, expression = "this == user.password")
> String passwordConfirm;
> And when I submit the form I get this error in Tomcat:
> SEVERE: Servlet.service() for servlet jsp threw exception
> java.lang.IllegalArgumentException: can't parse argument number this ==
> user.password
> at java.text.MessageFormat.makeFormat(MessageFormat.java:1339)
> at java.text.MessageFormat.applyPattern(MessageFormat.java:458)
> at java.text.MessageFormat.<init>(MessageFormat.java:368)
> at
> net.sourceforge.stripes.action.SimpleMessage.getMessage(SimpleMessage.java:95)
> at
> net.sourceforge.stripes.validation.SimpleError.getMessage(SimpleError.java:102)
> at net.sourceforge.stripes.tag.ErrorsTag.doEndTag(ErrorsTag.java:349)
> at
> org.apache.jsp.WEB_002dINF.layout.admin.default_002dadmin_jsp._jspService(default_002dadmin_jsp.java:293)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> at
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
> at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development