Hi,
I've just updated my PWM install from pwm-1.8.0-SNAPSHOT-2016-09-16T23:55:51Z, to pwm-1.8.0-SNAPSHOT-2017-04-13T17:41:45Z.
Everything was going great until I looked at the audit logs and got an error which corresponds to this error in the tomcat logs:
May 04, 2017 4:41:32 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [Jersey REST Service] in context with path [/pwm] threw exception [javax.servlet.ServletException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $] with root cause
java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:183)
at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
at com.google.gson.Gson.fromJson(Gson.java:887)
at com.google.gson.Gson.fromJson(Gson.java:852)
at com.google.gson.Gson.fromJson(Gson.java:801)
at password.pwm.util.java.JsonUtil.deserializeStringMap(JsonUtil.java:100)
at password.pwm.svc.event.LocalDbAuditVault.deSerializeRecord(LocalDbAuditVault.java:145)
at password.pwm.svc.event.LocalDbAuditVault.access$200(LocalDbAuditVault.java:46)
at password.pwm.svc.event.LocalDbAuditVault$IteratorWrapper.next(LocalDbAuditVault.java:126)
at password.pwm.svc.event.LocalDbAuditVault$IteratorWrapper.next(LocalDbAuditVault.java:111)
at password.pwm.ws.server.rest.RestAppDataServer.doGetAppAuditData(RestAppDataServer.java:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
(lots more of stuff here)
Now after a restart, the application doesn't start up, giving this error:
5082 ERROR_STARTUP_ERROR (unexpected error instantiating service class 'password.pwm.svc.event.AuditService', cannot load, error: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $, cause: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $)
I'm guessing that something in the audit log in the LocalDB has changed or been broken.
Any way to fix this? I'm guessing that wiping out the LocalDB would fix it, but I'm hoping there's a better way.
(Is there a safe way to backup this database, or browse its contents?)
Cheers,
Duncan.