Skip to main content
1-Visitor
July 18, 2016
Solved

PostgreSQL extension import on Thingworx 7.1 with Postgres problem

  • July 18, 2016
  • 3 replies
  • 5160 views

I am trying to import PostgreSQL extension (http://marketplace.thingworx.com/Items/Relational-databases-connectors) to my freshly installed Thingworx 7.1 (Postgres version) and I am facing such problem:

error.png

In the logs I can see errors:

[message: Checking ThingWorx system JARS conflict(s) detected [package: PostgreSQL_ExtensionPackage].  Check application log for details!]

JAR conflict Checking ThingWorx system JARS [existing: postgresql-9.4-1201-jdbc4.jar, package: postgresql-9.4-1204-jdbc41.jar]

I believe that extension management tries to deploy jar with postgres connector classes, such jar already exists and that is causing the problem.

How to solve this properly?

Best answer by oaslan

Hi Jacek,

I faced the same problem and found a solution in PTC Support in this link. I hope it helps.

Also copied the solution below:

  • The extension package is not needed to connect to a Postgres database when using the Postgres version of Thingworx
  • The drivers already exist in Thingworx

How to connect

  1. Create a new thing using the database template
  2. In configuration, set the JDBC Driver Class Name to org.postgresql.Driver
  3. Enter the connection string in the JDBC Connection String Field
    • e.g. jdbc:postgresql://localhost:5432/thingworx
  4. Enter the database username and password

3 replies

1-Visitor
July 18, 2016

Hi Jacek,

If you are familiar with the Extension development, you can get the extension and remove the included Postgresql jar file from the extesion.

Should be as easy as:

  • Uncompress
  • Remove the lib/common/postgress-9.4-1204-jdbc41.jar file
  • Edit metadata.xml and remove the reference to the .jar file
  • Compress again

Carles.

jacekgra1-VisitorAuthor
1-Visitor
July 18, 2016

Yeah Carlos, this is what I've done already.

However I am not sure whether this is correct approach (to modify existing extensions) - don't you think we should inform vendor of the extension (Thingworx in this case) that their extension is not working "as-is" with PostgreSQL version of Thingworx?

1-Visitor
July 18, 2016

You can for sure, open a support case on the e-support portal.

oaslan14-AlexandriteAnswer
14-Alexandrite
July 18, 2016

Hi Jacek,

I faced the same problem and found a solution in PTC Support in this link. I hope it helps.

Also copied the solution below:

  • The extension package is not needed to connect to a Postgres database when using the Postgres version of Thingworx
  • The drivers already exist in Thingworx

How to connect

  1. Create a new thing using the database template
  2. In configuration, set the JDBC Driver Class Name to org.postgresql.Driver
  3. Enter the connection string in the JDBC Connection String Field
    • e.g. jdbc:postgresql://localhost:5432/thingworx
  4. Enter the database username and password
5-Regular Member
July 18, 2016

It looks like that extension is meant for ThingWorx 7.2 PostgreSQL and later. If you look at the overview there is a bullet item stating this.

Regards

Meghan

1-Visitor
July 18, 2016

Meghan sure? This 7.2 refers to PostgreSQL not to TW, TW 7.2 it's not yet released

5-Regular Member
July 18, 2016

I quickly googled supported jar versions, PostgreSQL JDBC Download, and 7.2 can use this jar version, so I'll make the Marketplace team aware of what's happening with this extension in PostgreSQL.

Thanks!

Meghan