Error occurred running Thingworx in Docker
I am trying to run Thingworx with Docker.
There is not one container, but Tomcat and Postgres.
■Enviroment
●Version
・Tomcat :8.0.41
・JDK :1.8.0_121
・Postgres :9.4
■Error
●Error occurrence procedure
1.Execute initdb in the container of Postgres.
2.Execute the following in the container of Postgres.
・thingworxPostgresDBSetup.sh
・thingworxPostgresSchemaSetup.sh
3.Excute tomcat in the container of tomcat.
4.Error occured.
●Error message
~~~
com.thingworx.common.exceptions.ModelAccessException: ERROR: null value in column "is_property_provider_supported" violates not-null constraint
Detail: Failing row contains (1, Server, 0, t, t, null, 809, 1, null, 6, 6, 0, b476, 2017-03-10 04:13:15.107).
~~~
Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "is_property_provider_supported" violates not-null constraint
Detail: Failing row contains (1, Server, 0, t, t, null, 809, 1, null, 6, 6, 0, b476, 2017-03-10 04:13:15.107).
~~~
java.lang.Exception: Unable to initialize and start system: ERROR: null value in column "is_property_provider_supported" violates not-null constraint
~~~
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
■Postscript
From the error message, it seems that the column "is_property_provider_supported" seems to be probleming, so I commented out the line that adds this column from the thingworx-model-schema.sql file.
Then, the following error message occurred.
"Null value in column "property_schema_version" violates not-null constraint"
So I also commented out the column "property_schema_version".
As a result, I confirmed that Thingworx works normally.
●The actual thingworx-model-schema.sql file.
CREATE TABLE IF NOT EXISTS system_version (
pid serial primary key,
server_name character varying(255) NOT NULL,
server_code integer NOT NULL,
is_data_provider_supported boolean NOT NULL,
is_model_provider_supported boolean NOT NULL,
-- is_property_provider_supported boolean NOT NULL,
model_schema_version integer NOT NULL,
data_schema_version integer NOT NULL,
-- property_schema_version integer NOT NULL,
major_version character varying(10) NOT NULL,
minor_version character varying(10),
revision character varying(45) NOT NULL,
build character varying(45) NOT NULL,
creationDate timestamp without time zone DEFAULT now()
);
●Concerns
If you modify this SQL file distributed from PTC like this,
Will not an error occur at other times?
