How to generate a deployable custom function that contains referenced *.jar files
book
Article ID: KB0080769
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks
All
Description
When you try to add a custom function that contains referenced *.jar files to the inbuilt function list that is provided with TIBCO BW 6.x. the following type of errors are noticed:
ERROR in C:\repBw6\testsuite63\testmyfucntion\src\testmyfucntion\CustomFunctions.java (at line 5) import org.json.*; The import org.json cannot be resolved
ERROR in C:\repBw6\testsuite63\testmyfucntion\src\testmyfucntion\CustomFunctions.java (at line 14) public String testjson(String xmlstring) throws JSONException { JSONException cannot be resolved to a type
ERROR in C:\repBw6\testsuite63\testmyfucntion\src\testmyfucntion\CustomFunctions.java (at line 15) return (org.json.XML.toJSONObject(xmlstring).toString());
Issue/Introduction
This article describes how to generate a deployable custom function that contains referenced *.jar files
Environment
Product : TIBCO ActiveMatrix BusinessWorks
Version : 6.x
Operating System : All
Resolution
In-order to resolve the issue please do the following:
- Create a lib folder and add the *.jar files to it.
- Now open the file META-INF/MANIFEST.MF
- Click the tab Runtime and you will notice the Classpath option.
- Click add and select the *.jar files in the lib folder.
Please find attached a file (cusomfunction-classpath.jpg) showing a screenshot of a test project.
Attachments
How to generate a deployable custom function that contains referenced *.jar files
get_app