Skip to main content
8-Gravel
November 5, 2024
Solved

Custom Thingworx extension is failing to import. Giving error message of JAR file

  • November 5, 2024
  • 1 reply
  • 1846 views

I have created Thingworx extension (Bar Code Generator) in eclipse. I have used external jar - https://mvnrepository.com/artifact/net.sf.barcode4j/barcode4j/2.1  I have added this jar in build path in eclipse. Also added this jar under the lib folder in eclipse. Then run the application as gradle build and created the build. After that while importing the extension in composer, extension is validating successfully but while importing, it is giving an error - Failed to install extension BarCodeGeneratorTwx:1.0.3 because org/krysalis/barcode4j/output/CanvasProvider. Can someone please help here, what exactly I am missing here or I am placing jar in wrong place. Thanks in advance. Attached screenshot of error. 

Best answer by Rocko

Well, that didn't add much information.

You can:

-Temporarily switch on stacktracing in LoggingSubsystem>Configuration and retry

-Check for the file ThingworxStorage\logs\ErrorLog.log

-Post the structure of your extension zip and your metadata.xml

 

It could be a missing class, a class loading conflict, a problem with the JVM version, or the jar file not property referenced in the metadata. Maybe also class initialization problem, i.e. static code being run on class loading and the proper config missing.

1 reply

Rocko
19-Tanzanite
November 5, 2024

Could be anything, have you looked into the Application Log?

8-Gravel
November 5, 2024

Hi @Rocko Attaching the snap of application logs post trying to import.

Rocko
Rocko19-TanzaniteAnswer
19-Tanzanite
November 5, 2024

Well, that didn't add much information.

You can:

-Temporarily switch on stacktracing in LoggingSubsystem>Configuration and retry

-Check for the file ThingworxStorage\logs\ErrorLog.log

-Post the structure of your extension zip and your metadata.xml

 

It could be a missing class, a class loading conflict, a problem with the JVM version, or the jar file not property referenced in the metadata. Maybe also class initialization problem, i.e. static code being run on class loading and the proper config missing.