crhume / pwm

Automatically exported from code.google.com/p/pwm
0 stars 0 forks source link

Error on changing New User Form #42

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Install/configure PWM revision 111
2. Go to Configuration Editor
3. Save configuration
4. Wait for application to restart
5. Go to Configuration Editor --> New User Registration
6. Add a locale to the list of attributes, or try to remove a string

What is the expected output? What do you see instead?

Expected: changes to form reflected (new locale or removed attribute)
Observed: Error message: error writing setting newUser.form, reason: 
SyntaxError: syntax error

What version of the product are you using? On what operating system?

Revision 111, Tomcat 6, Mac OS X

Please provide any additional information below.

2011-03-04 09:18:26, TRACE, pwm.SessionFilter, {k~} POST request for: 
/pwm/config/ConfigManager [127.0.0.1/localhost]
  key='newUser.form'
  pwmFormID='xnaZboJDFpaKHSYb6Q0u6KIexVRHilfzb5a0420612e7fe170a1'
  processAction='writeSetting'
2011-03-04 09:18:26, WARN , servlet.TopServlet, {k~} unexpected exception 
during page generation: The JsonDeserializer 
com.google.gson.DefaultTypeAdapters$CollectionTypeAdapter@13f002ee failed to 
deserialized json object 
{"0":"cn:Username:text:2:10:true:false","1":"givenName:First 
name:text:4:40:true:false","2":"sn:Last 
name:text:4:40:true:false","3":"mail:Email 
Address:email:3:50:true:true","4":"telephoneNumber:Telephone 
Number:text:7:10:true:false"} given the type java.util.List<java.lang.String> 
[127.0.0.1/localhost]
com.google.gson.JsonParseException: The JsonDeserializer 
com.google.gson.DefaultTypeAdapters$CollectionTypeAdapter@13f002ee failed to 
deserialized json object 
{"0":"cn:Username:text:2:10:true:false","1":"givenName:First 
name:text:4:40:true:false","2":"sn:Last 
name:text:4:40:true:false","3":"mail:Email 
Address:email:3:50:true:true","4":"telephoneNumber:Telephone 
Number:text:7:10:true:false"} given the type java.util.List<java.lang.String>
        at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:63)
        at com.google.gson.JsonDeserializationVisitor.invokeCustomDeserializer(JsonDeserializationVisitor.java:88)
        at com.google.gson.JsonDeserializationVisitor.visitUsingCustomHandler(JsonDeserializationVisitor.java:76)
        at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:106)
        at com.google.gson.JsonDeserializationContextDefault.fromJsonObject(JsonDeserializationContextDefault.java:73)
        at com.google.gson.JsonDeserializationContextDefault.deserialize(JsonDeserializationContextDefault.java:51)
        at com.google.gson.DefaultTypeAdapters$MapTypeAdapter.deserialize(DefaultTypeAdapters.java:608)
        at com.google.gson.DefaultTypeAdapters$MapTypeAdapter.deserialize(DefaultTypeAdapters.java:573)
        at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:50)
        at com.google.gson.JsonDeserializationVisitor.invokeCustomDeserializer(JsonDeserializationVisitor.java:88)
        at com.google.gson.JsonDeserializationVisitor.visitUsingCustomHandler(JsonDeserializationVisitor.java:76)
        at com.google.gson.ObjectNavigator.accept(ObjectNavigator.java:106)
        at com.google.gson.JsonDeserializationContextDefault.fromJsonObject(JsonDeserializationContextDefault.java:73)
        at com.google.gson.JsonDeserializationContextDefault.deserialize(JsonDeserializationContextDefault.java:51)
        at com.google.gson.Gson.fromJson(Gson.java:568)
        at com.google.gson.Gson.fromJson(Gson.java:515)
        at com.google.gson.Gson.fromJson(Gson.java:484)
        at com.google.gson.Gson.fromJson(Gson.java:434)
        at password.pwm.servlet.ConfigManagerServlet.writeSetting(ConfigManagerServlet.java:271)
        at password.pwm.servlet.ConfigManagerServlet.processRequest(ConfigManagerServlet.java:84)
        at password.pwm.servlet.TopServlet.handleRequest(TopServlet.java:75)
        at password.pwm.servlet.TopServlet.doPost(TopServlet.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at password.pwm.SessionFilter.doFilter(SessionFilter.java:232)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:680)
Caused by: java.lang.IllegalStateException: This is not a JSON Array.
        at com.google.gson.JsonElement.getAsJsonArray(JsonElement.java:99)
        at com.google.gson.DefaultTypeAdapters$CollectionTypeAdapter.deserialize(DefaultTypeAdapters.java:544)
        at com.google.gson.DefaultTypeAdapters$CollectionTypeAdapter.deserialize(DefaultTypeAdapters.java:510)
        at com.google.gson.JsonDeserializerExceptionWrapper.deserialize(JsonDeserializerExceptionWrapper.java:50)
        ... 38 more
2011-03-04 09:18:27, TRACE, pwm.SessionFilter, {k~} GET request for: 
/pwm/config/ConfigManager [127.0.0.1/localhost]
  key='newUser.form'
  pwmFormID='xnaZboJDFpaKHSYb6Q0u6KIexVRHilfzb5a0420612e7fe170a1'
  processAction='readSetting'

On a new configuration, the error also exists, but says the value is null, and 
does not create a large stack trace.

Original issue reported on code.google.com by menno.pi...@gmail.com on 4 Mar 2011 at 8:33

GoogleCodeExporter commented 9 years ago
Should be fixed as of svn 113.

Original comment by jrivard on 6 Mar 2011 at 7:41

GoogleCodeExporter commented 9 years ago

Original comment by jrivard on 6 Mar 2011 at 7:41