Application starts fine in Studio but fails withClassNotFoundExceptionerror when deploying to appnode.

Application starts fine in Studio but fails withClassNotFoundExceptionerror when deploying to appnode.

book

Article ID: KB0093769

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:
Application starts fine in Studio but fails with ClassNotFoundException errors when deploying to appnode.
Symptoms:

The following exception is seen in the log.


+++++++++


2015-05-15 01:07:17.526 ERROR [bwEngThread:In-Memory Process Worker-2] com.tibco.bw.core - TIBCO-BW-CORE-500050: The BW process [WF_LG_SN] instance faulted, JobId [bw0a101], ProcessInstanceId [bw0a101], ParentProcessInstanceId [-], Module .

.

.

.

   <CausedBy> java.lang.ClassNotFoundException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be found by com.tibco.bx.core_1.12.100.006

 +++++++++



Cause:
Issue with classloading in OSGi environment

Issue/Introduction

Application starts fine in Studio but fails withClassNotFoundExceptionerror when deploying to appnode.

Resolution

There are a couple of options to resolve this issue.


Option 1:


Add the following line to the Appnode TRA file and restart the Appnode.


java.extended.properties=-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl -Djavax.xml.transform.TransformerFactory=com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl 


Option2:


Add the missing packages (javax.xml.*) in the Dependencies Tab for the application module's Module Descriptor in Business Studio as shown in the attached screenshot (Filename: Dependencies.png). Recreate the EAR and redeploy the application. Refer to KB 40980 for more details.



Attachments

Application starts fine in Studio but fails withClassNotFoundExceptionerror when deploying to appnode. get_app