java.lang.NoClassDefFoundError: com/tibco/xml/tns/parse/TnsNamespaceKind error while importing, validating and generating decision table classes using studio-tools command from bwengine.

java.lang.NoClassDefFoundError: com/tibco/xml/tns/parse/TnsNamespaceKind error while importing, validating and generating decision table classes using studio-tools command from bwengine.

book

Article ID: KB0085500

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition -
Not Applicable -

Description

Description:
When running a TIBCO ActiveMatrix BusinessWorks(BW) process that imports an Excel spreadsheet, it is validated and generates the Decision table (DT) classes as three different calls to .bat files (which will execute the TIBCO BusinessEvents studio-tools command). This process works fine from TIBCO Designer Tester, but when run from the bwengine command prompt, it throws following error:  java.lang.NoClassDefFoundError: com/tibco/xml/tns/parse/TnsNamespaceKind
Symptoms:
Error:  java.lang.NoClassDefFoundError: com/tibco/xml/tns/parse/TnsNamespaceKind
Cause:
This issue is caused by a conflict between some BW and BE classes.

When you run the process from Designer, designer.tra does not set CUSTOM_EXT_PREPEND_CP (Designer sets CUSTOM_CP_EXT). But bwengine.tra sets CUSTOM_EXT_PREPEND_CP and has BW JARs defined in this property. In studio-tools.tra, it includes the CUSTOM_EXT_PREPEND_CP in the class path:

tibco.class.path.extended %CUSTOM_EXT_PREPEND_CP%%PSP%%STD_EXT_CP%%PSP%%CUSTOM_EXT_APPEND_CP%%PSP%

When the studio-tools is invoked from BW, it takes the CUSTOM_EXT_PREPEND_CP from BW  resulting in the exception.

Resolution

1). Include only the required JARs in CUSTOM_EXT_PREPEND_CP.

2). As the studio-tools.tra itself does not have a definition of CUSTOM_EXT_PREPEND_CP,  remove the reference to CUSTOM_EXT_PREPEND_CP, e.g., modify the tibco.class.path.extended in studio-tools.tra and remove the referent to CUSTOM_EXT_PREPEND_CP:
tibco.class.path.extended %STD_EXT_CP%%PSP%%CUSTOM_EXT_APPEND_CP%%PSP%

Issue/Introduction

java.lang.NoClassDefFoundError: com/tibco/xml/tns/parse/TnsNamespaceKind error while importing, validating and generating decision table classes using studio-tools command from bwengine.