Postgres Persistence Provider problems
Hi all,
I am trying to set up a Persistence Provider that uses a PostgresDB (on another server which is not the TWX server). Steps that I took:
1) created a new Persistence Provider using the PostgresPersistenceProviderPackage (Name: "MyPostgresPersistenceProvider", I'm sure the Postgres JDBC connection string and credentials are correct)
2) created a new Value Stream using MyPostgresPersistenceProvider
3) created a new Thing using the new Value Stream
4) activated "Logging" for a handful of properties of that Thing.
So far so good, no error messages or anything.
Only when I try to access historical values of any property using, e.g., the service QueryNumberPropertyHistory(), I get the following error message:
Unable to Invoke Service QueryNumberPropertyHistory on <Thing>: com.thingworx.common.exceptions.DataAccessException: [1.018] Data store unknown error: [Error occurred while accessing the data provider.]
Moreover, I can see in the Postgres DB that no table or anything has been created.
(I would expect TWX to create the necessary tables etc. in the Persistence Provider database automatically, right?)
So I guess the DB connection of the Persistence Provider is somehow not working (although it doesn't give me any negative feedback!).
Questions:
- Is there any way to test the DB connectoin of the Persistence Provider? (I have seen a service called "TestConnectivity", but that doesn't seem to do anything expect issueing the connection string again...)
- anything I missed or did wrong in the above steps?
By the way:
I have successfully connected to that same PostgresDB from a "normal Thing" (using the Database Thing template). So it's neither a credentials nor connection string nor firewall or similar issue. For some reason it just doesn't work with the Persistence Provider... Any ideas?
