[
https://issues.apache.org/jira/browse/TAP5-1777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13170085#comment-13170085
]
Lukas Ruetz edited comment on TAP5-1777 at 12/15/11 10:22 AM:
--------------------------------------------------------------
This is reporduceable in Goolge Chrome 14 (under linux), but DOES NOT show up
with Firefox 8
I'm seeing this when I
- fill out a form but forget to fill out a required field
- submit
- the validation-error bubble shows up on the empty field
- enter a value into the empty field
- submit and the get this exception
Caused by: java.lang.RuntimeException: A JSONArray text must start with '[' at
character 0 of
at
org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384)
at org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:126)
at org.apache.tapestry5.json.JSONArray.<init>(JSONArray.java:95)
at
org.apache.tapestry5.corelib.components.Form.isFormCancelled(Form.java:590)
at
org.apache.tapestry5.corelib.components.Form.advised$onAction_4beffc6b6b8(Form.java:511)
at
org.apache.tapestry5.corelib.components.Form$Invocation_onAction_4beffc6b6b7.proceedToAdvisedMethod(Unknown
Source)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
at
org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
at org.apache.tapestry5.corelib.components.Form.onAction(Form.java)
at
org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:923)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1106)
was (Author: luukes):
I'm seeing this when I
- fill out a form but forget to fill out a required field
- submit
- the validation-error bubble shows up on the empty field
- enter a value into the empty field
- submit and the get this exception
Caused by: java.lang.RuntimeException: A JSONArray text must start with '[' at
character 0 of
at
org.apache.tapestry5.json.JSONTokener.syntaxError(JSONTokener.java:384)
at org.apache.tapestry5.json.JSONArray.parse(JSONArray.java:126)
at org.apache.tapestry5.json.JSONArray.<init>(JSONArray.java:95)
at
org.apache.tapestry5.corelib.components.Form.isFormCancelled(Form.java:590)
at
org.apache.tapestry5.corelib.components.Form.advised$onAction_4beffc6b6b8(Form.java:511)
at
org.apache.tapestry5.corelib.components.Form$Invocation_onAction_4beffc6b6b7.proceedToAdvisedMethod(Unknown
Source)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
at
org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37)
at
org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
at org.apache.tapestry5.corelib.components.Form.onAction(Form.java)
at
org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:923)
at
org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1106)
> JSONArray Error while submitting forms
> ---------------------------------------
>
> Key: TAP5-1777
> URL: https://issues.apache.org/jira/browse/TAP5-1777
> Project: Tapestry 5
> Issue Type: Bug
> Components: tapestry-core
> Affects Versions: 5.3
> Reporter: Gunnar Eketrapp
>
> There is a thread in Tapestry mailing list describing this issue.
> The bottom line is that there are users that experience stack traces when
> submitting forms after upgrading to T 5.3
> ----------------------------------------------------
> if (raw != null && !raw.isEmpty() &&
> new JSONArray(raw).getString(1).equals
> This seems to have solved the problem.
> I made this fix in Form.java, Submit.java and LinkSubmit.java. Built and
> installed my own 5.3.1 in my local maven repo.
> Rebuilt my project and now I can login and run the app again.
> ----------------------------------------------------------------------------------------------------------------------------------
> Copy of problem from Chrome
> Request URL:
> http://localhost:8080/index.utskicketlayout.loginform;jsessionid=1gg3akfavo976gp2becnahbhv
> Request Method:
> POST
> Status Code:
> 500 Internal Server Error
> Request Headersview source
> Accept:
> text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> Accept-Charset:
> ISO-8859-1,utf-8;q=0.7,*;q=0.3
> Accept-Encoding:
> gzip,deflate,sdch
> Accept-Language:
> sv-SE,sv;q=0.8,en-US;q=0.6,en;q=0.4
> Cache-Control:
> max-age=0
> Connection:
> keep-alive
> Content-Length:
> 596
> Content-Type:
> application/x-www-form-urlencoded
> Cookie:
> JSESSIONID=1gg3akfavo976gp2becnahbhv
> Host:
> localhost:8080
> Origin:
> http://localhost:8080
> Referer:
> http://localhost:8080/
> User-Agent:
> Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.2 (KHTML, like Gecko)
> Chrome/15.0.874.121 Safari/535.2
> Form Dataview URL encoded
> t:formdata:
> H4sIAAAAAAAAAJWRvUoDQRSFrwuBSDrBQsSfoLYbBdNoYxCEQBBhsZbZ2Zt1zOzMOnPX3TSpfAkbn0Cs9AlS2PkOPoCNhZWFuyuRBUOI1Qzf3MM5Z
> 7DO9TSLWh2VYDZQUJ2IPgASbKhTsglzKgvUAYXu9ZAW5vQZTHjl gSi9GSGbZdrg1K4bs s
> h2/BwyTieFaNtDSuKd83Hjbfnly4GFHjS4VmS0PGUREiz1rtgNa0mmwpZHRqjwMIsJGhXbebN1/pvtzGiO1nqJHwlrhVbjx2C//3n/6gBkcdqEjem2MbM21SbYs9cwAiBY/CVziApNLV2D1elzUodC5W2OZrbhOoq1QkXWLePT3zJ33sfK89PtsQNOD
> pciny6GxTuxRJQYpSDYgklKj69VnpPznQT1qdHNBgKS2jK nWC gRUrrPUkcgfquofULl
> A8xRqk2TAgAA
> t:submit:
> textfield_0:
> [email protected]
> password1: xxxxxxx
> pass_temp:
> Ditt lösenord
> Response Headersview source
> Content-Length:
> 19867
> Content-Type:
> text/html; charset=utf-8
> Server:
> Jetty(6.1.26)
> X-Tapestry-ErrorMessage:
> A%20JSONArray%20text%20must%20start%20with%20%27%5B%27%20at%20character%200%20of%20
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira