When running a Java Activity on BW version 5.9, it fails to run as expected though it worked without error on BW version 5.6.

When running a Java Activity on BW version 5.9, it fails to run as expected though it worked without error on BW version 5.6.

book

Article ID: KB0088150

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:
Description:
============

Java Activityworks fine on BW version 5.6. Fails on BW 5.9.

Environment:
===========

BW ALL

Symptoms:
========

The following exception stack trace will be reported.

<?xml version = "1.0" encoding = "UTF-8"?>
<ns0:ErrorReport xmlns:ns0 = "http://www.tibco.com/pe/EngineTypes">
    <StackTrace>Job-5000 Error in [Process/Steps/01_sendAttachementsToVIM.process/forEach File/errorGroup/sendAttachmentsToContentServerJava]
While executing [invoke] encountered [java.lang.VerifyError] : [Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method)]
    at com.tibco.plugin.java.JavaActivity.eval(Unknown Source)
    at com.tibco.pe.plugin.Activity.eval(Unknown Source)
    at com.tibco.pe.core.TaskImpl.eval(Unknown Source)
    at com.tibco.pe.core.Job.a(Unknown Source)
    at com.tibco.pe.core.Job.k(Unknown Source)
    at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)
    at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)
    </StackTrace>
    <Msg>While executing [invoke] encountered [java.lang.VerifyError] : [Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method)]</Msg>
    <FullClass>com.tibco.plugin.java.InvocationException</FullClass>
    <Class>InvocationException</Class>
    <ProcessStack>Process/receiveFlowControlMessage.process/exceptionHandling/stepProcessing>Process/StepProcessing/stepProcessing.process/performStep>Process/Steps/01_sendAttachementsToVIM.process/forEach File/errorGroup/sendAttachmentsToContentServerJava</ProcessStack>
    <MsgCode>BW-JAVA-100001</MsgCode>
    <Data>
        <ns1:InvocationException xmlns:ns1 = "http://schemas.tibco.com/bw/plugins/java/5.0/javaExceptions">
            <msg>While executing [invoke] encountered [java.lang.VerifyError] : [Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method)]</msg>
            <msgCode>BW-JAVA-100001</msgCode>
            <methodName>invoke</methodName>
            <exceptionClassName>java.lang.VerifyError</exceptionClassName>
            <exceptionMessage>Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method)</exceptionMessage>
        </ns1:InvocationException>
    </Data>
</ns0:ErrorReport>

Cause:
=====
Caused by jar file “httpcore-4.0-beta2.jar”. It is shipped with BW 5.9 and that is incompatible with latest Apache HTTP component libraries. User written custom HTTP code could run into this issue if using the latest Apache HTTP libraries.



Resolution:
=======
The following could be a workaround for this issue. There is no permanent solution until we ship a BW product with the latest Apache libraries.

1). Create a separate folder(“c:/customerjars”) and copy the Jar files to that location. 

2). Open up the Engine TRA file and add the above entry in “tibco.env.CUSTOM_EXT_PREPEND_CP”. It will load these jar files prior to loading the bwengine jar files. This change will be applicable to all deployed applications.

3). Individual applications can be changed by adding the above entry in the application TRA file after deploying it. It is required to include this change manually for each deployment.

Issue/Introduction

When running a Java Activity on BW version 5.9, it fails to run as expected though it worked without error on BW version 5.6.