Article - CS292986

Error "JdbcSQLException: The database is read only" is reported in result microservices when executing an anomaly alert in ThingWorx Analytics

Modified: 17-Sep-2018   

Applies To

  • ThingWorx Analytics 8.3.1

Description

  • Anomaly Alert is set to Failed state
  • Following error is reported in result microservice when executing an anomaly alert in ThingWorx Analytics
org.h2.jdbc.JdbcSQLException: The database is read only; SQL statement:
/* insert com.thingworx.analytics.results.db.ResultsModel */ insert into results (description, lastModified, location, name, resultType, id) values (?, ?, ?, ?, ?, ?) [90097-192]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.message.DbException.get(DbException.java:144)
at org.h2.engine.Database.checkWritingAllowed(Database.java:1924)
at org.h2.table.Table.checkWritingAllowed(Table.java:1159)
at org.h2.engine.User.hasRight(User.java:114)
at org.h2.engine.User.checkRight(User.java:100)
at org.h2.command.dml.Insert.insertRows(Insert.java:123)
at org.h2.command.dml.Insert.update(Insert.java:114)
at org.h2.command.CommandContainer.update(CommandContainer.java:98)
at org.h2.command.Command.executeUpdate(Command.java:258)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:160)
at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:146)
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
... 76 common frames omitted
Causing: org.hibernate.exception.GenericJDBCException: could not execute statement
  • Training microservice reports the below error
com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "code" (class com.thingworx.analytics.results.api.ResultResponse), not marked as ignorable (7 known properties: "status", "tags", "id", "description", "lastModified", "name", "resultUri"])
  at [Source: org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$UnCloseableInputStream@56219ffd; line: 1, column: 12] (through reference chain: com.thingworx.analytics.results.api.ResultResponse["code"])
 at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:62)
 at com.fasterxml.jackson.databind.DeserializationContext.reportUnknownProperty(DeserializationContext.java:851)
 at com.fasterxml.jackson.databind.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:1085)
 at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownProperty(BeanDeserializerBase.java:1388)
 at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.handleUnknownVanilla(BeanDeserializerBase.java:1366)
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:266)
 at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)
 at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1536)
 at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:944)
 at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:811)
 at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.invokeReadFrom(ReaderInterceptorExecutor.java:256)
 at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor$TerminalReaderInterceptor.aroundReadFrom(ReaderInterceptorExecutor.java:235)
 at org.glassfish.jersey.message.internal.ReaderInterceptorExecutor.proceed(ReaderInterceptorExecutor.java:155)
 at org.glassfish.jersey.message.internal.MessageBodyFactory.readFrom(MessageBodyFactory.java:1085)
 at org.glassfish.jersey.message.internal.InboundMessageContext.readEntity(InboundMessageContext.java:874)
 ... 24 common frames omitted
 Causing: javax.ws.rs.ProcessingException: Error reading entity from input stream.
This is a PDF version of Article CS292986 and may be out of date. For the latest version click https://www.ptc.com/en/support/article/CS292986