cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

DB Thing not running - Configuration Table Update

Sathishkumar_C
17-Peridot

DB Thing not running - Configuration Table Update

I am trying to update DB thing configuration parameters using services (SetConfigurationTable). 

  • JDBD Driver Class name
  • Connection String
  • DB user name
  • DB password

 

Everything working fine.

 

But, if i am trying to give some random value to 'JDBD Driver Class name' (Ex. com.yourdatabase.yourDriver) and getting an error "ERROR starting: JDBC Driver Class Not Found: com.yourdatabase.yourDriver".

 

Also DB thing stopped running. It can be resolved by opening DB thing and Click Save.

 

  1. How to avoid this issue?
  2. How to start Thing programmatically if Thing is not running? - RestartThing() not working
  3. How to validate 'JDBD Driver Class name' in Thingworx?
1 ACCEPTED SOLUTION

Accepted Solutions

Thank you for the explanation.

When you configure Database Things you do that knowing which are the JDBC drivers available in ThingWorx.

You don't have a way to interrogate ThingWorx of what's the existing loaded JDBC drivers - there's just no such way and I would be happy if somebody advises of a way to do this.

 

The use-case to generate DB things from the existing drivers is a something I did not see until now.

 

Adding JDBC drivers to ThingWorx can be done in 2 ways: either dropping the JDBC driver in Tomcat's Thingworx webapp folder (not sure about the path, but the rough idea is correct) or packing the JDBC driver as a JAR file.

If you're packing the JDBC extension as a JAR file, you'll see in the list of files of that extension what JDBC drivers are available, then you can create a mapping between the JDBC driver class name and the file name. However, this mapping is really fragile, and will need to be updated constantly to pickup whatever file name structure database providers might change.

 

I don't think this is feasible to do, and would still advise to create the Database Things based on already what you have in that instance, since there's no reliable discovery method (not only in ThingWorx ). Probably packing and installing the JDBC drivers and then configuring the DB Thing is the best way to do this.

View solution in original post

3 REPLIES 3

It is normal for the Thing to stop working if you provide the wrong JDBC Class Name.

The JDBC Driver Class name depends on what JDBC drivers you have in your ThingWorx system.

What is the use case when you set random data for this field in ThingWorx? You should be very aware of what drivers you have in your ThingWorx instance and only set this field to existing classes.

 

Usecase: While deploying the solution, we have to configure multiple Database Things. so we have an mashup to configure the database thing "configuration table" with services.

 

At least can we validate JDBC Class Name with JDBC drivers  available in thingworx system?

Thank you for the explanation.

When you configure Database Things you do that knowing which are the JDBC drivers available in ThingWorx.

You don't have a way to interrogate ThingWorx of what's the existing loaded JDBC drivers - there's just no such way and I would be happy if somebody advises of a way to do this.

 

The use-case to generate DB things from the existing drivers is a something I did not see until now.

 

Adding JDBC drivers to ThingWorx can be done in 2 ways: either dropping the JDBC driver in Tomcat's Thingworx webapp folder (not sure about the path, but the rough idea is correct) or packing the JDBC driver as a JAR file.

If you're packing the JDBC extension as a JAR file, you'll see in the list of files of that extension what JDBC drivers are available, then you can create a mapping between the JDBC driver class name and the file name. However, this mapping is really fragile, and will need to be updated constantly to pickup whatever file name structure database providers might change.

 

I don't think this is feasible to do, and would still advise to create the Database Things based on already what you have in that instance, since there's no reliable discovery method (not only in ThingWorx ). Probably packing and installing the JDBC drivers and then configuring the DB Thing is the best way to do this.

Top Tags