Error "getElement(mango.share.users, data.userId) is null"
-
I have been using Mango for several months with no serious problems; until now.
I attempted to update a user's password, and received the following error message when I clicked on the save icon:PreparedStatementCallback; SQL [update users set username=?, password=?, email=?, phone=?, admin=?, disabled=?, homeUrl=?, receiveAlarmEmails=?, receiveOwnAuditEvents=? where id=?]; An attempt was made to get a data value of type 'VARCHAR' from a data value of type 'null'.; nested exception is java.sql.SQLDataException: An attempt was made to get a data value of type 'VARCHAR' from a data value of type 'null'.
After that I went to the "Watch list" page, and immediately receive this error:
getElement(mango.share.users, data.userId) is null
Consequently, I cannot share the watch list with other users because no users are shown; not even admin.
If I attempt to edit a "Graphical view" I also receive the null error message because the share menu is displayed on the "Graphical view" edit page.
I can create new users without seeing this message, and edit the settings for existing users. However, I cannot save any of the changes as the Callback error is displayed instead. I restarted Tomcat in the hopes that it would fix the problem, but it made no difference.To summarize: I can't edit users, and I can't share views.
Any help is appreciated. I don't know where to turn from here short of a database restore, which would cause me to lose the all the new configuration work and data points since the last backup / version update.
-
Please refer to http://mango.serotoninsoftware.com/forum/posts/list/878.page#3948 .
-
Thanks for the link. I had searched for the other error message before posting, so I had not seen your helpful link.
I backed up MangoDB when troubleshooting, and got the same error when running the backed up database under older Mango versions. For some reason, lately I could no longer get Mango to initialize when using the originally backed up MangoDB, so I had to start Mango with an empty database and import the json files to recreate my setup, and re-upload the graphical background images. Consequently, I lost all my historical data points. Actually, they're still in the backup MangoDB, but since Mango won't load when that database is used, I don't know how to retrieve that historical data, let alone import it into the new database. That data is not critical at the moment, but when historical data becomes important, it concerns me that I may not be able to retrieve it.
I created new usernames and set their home pages, and this time I was able to update passwords of users with homepages and save without seeing the null error. However, I just got that error again when updating the admin password:
ERROR 2011-06-01 20:57:54,121 (com.serotonin.mango.web.filter.ExceptionDetectionFilter.doFilter:52) - DWR invocation exception java.lang.NullPointerException at com.serotonin.mango.web.dwr.DataPointDetailsDwr.getPointData(DataPointDetailsDwr.java:66) at com.serotonin.mango.web.dwr.MiscDwr.doLongPoll(MiscDwr.java:343) at sun.reflect.GeneratedMethodAccessor1306.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.directwebremoting.impl.ExecuteAjaxFilter.doFilter(ExecuteAjaxFilter.java:34) at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) at com.serotonin.mango.web.dwr.util.LoggedInAjaxMethodFilter.doFilter(LoggedInAjaxMethodFilter.java:52) at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) at com.serotonin.web.dwr.LocalizationFilter.doFilter(LocalizationFilter.java:42) at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) at com.serotonin.mango.web.filter.ExceptionDetectionFilter.doFilter(ExceptionDetectionFilter.java:40) at org.directwebremoting.impl.DefaultRemoter$1.doFilter(DefaultRemoter.java:428) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:431) at org.directwebremoting.impl.DefaultRemoter.execute(DefaultRemoter.java:283) at org.directwebremoting.servlet.PlainCallHandler.handle(PlainCallHandler.java:52) at org.directwebremoting.servlet.UrlProcessor.handle(UrlProcessor.java:101) at org.directwebremoting.servlet.DwrServlet.doPost(DwrServlet.java:146) 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 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:859) 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:636)
This error occurred even though I had previously set a homepage for user admin.