Skip to main content
Aug 25, 2020 2:47 PM UTC
Solved

Extension development - database thing template

Hello all,

I'm trying to create thing template based on database thing template in my custom extension. Using creator I've created thing template named MSSQLThingTemplate which is extending database thing template:

 

@ThingworxBaseTemplateDefinition(name = "Database")

public class MSSQLThingTemplate extends Thing {
	public MSSQLThingTemplate() {
		// TODO Auto-generated constructor stub
	}
}

 

The problem is that after creating thing template using this method i'm not able to add SQL Query or Command service to thing created from MSSQLThingTemplate, only Local (JavaScript) is visible. Do you know how to fix this? Should this thing template extend different class? Thanks in advance for help.

    Aug 27, 2020 10:29 AM UTC

    No, but if you're aiming to create a JDBC connector that allows you to access a database, there's another process that does not involve going into Java to do that (it's much more simpler).

    It is available here: http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FExtensibility%2Fjdbc_extension.html

    Would you be interested in that, or do you really need to process some code in Java and this is why you went the Java extension route?

    3 replies

    Aug 27, 2020 10:29 AM UTC

    No, but if you're aiming to create a JDBC connector that allows you to access a database, there's another process that does not involve going into Java to do that (it's much more simpler).

    It is available here: http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FExtensibility%2Fjdbc_extension.html

    Would you be interested in that, or do you really need to process some code in Java and this is why you went the Java extension route?

    Sep 14, 2020 8:37 PM UTC

    Hi @KG_9261951.

     

    If the previous response allowed you to find a solution, please mark it as the Accepted Solution for the benefit of others with the same issue.

     

    Thank you for your participation in our community!

     

    Regards.

     

    --Sharon

    Sep 21, 2020 8:51 PM UTC

    Hi @KG_9261951.

     

    I have marked the Accepted Solution for this post.  If you disagree that it is the solution, please let me know.

     

    Thank you for your participation in our community!

     

    Regards.

     

    --Sharon