Tracing errors when Invoking an Enterprise Java Bean (EJB) from TIBCO IntegrationManager (IM).

Tracing errors when Invoking an Enterprise Java Bean (EJB) from TIBCO IntegrationManager (IM).

book

Article ID: KB0086605

calendar_today

Updated On:

Products Versions
TIBCO IntegrationManager -
Not Applicable -

Description

Description:
Description: 
============
When calling an Enterprise Java Bean (EJB) from TIBCO IntegrationManager (IM) EJB may throw the exception, "java.lang.reflect.InvocationTargetException". This is a general exception that the EJB method throws and it does not contain the actual stack trace or any detailed information. 

Issue/Introduction

Tracing errors when Invoking an Enterprise Java Bean (EJB) from TIBCO IntegrationManager (IM).

Resolution

Resolution:
==========
In order to get the actual exception in the error handler, the following code needs to be included.
***
var error = job.get("_error");

var rootException = error.getTargetException();
***

For example, IM as an EJB client needs to have the client interface JAR files and server JAR file included in the classpath of the imse/imed tra files. When the client interface is not present, IM obtains information from the server side and invokes the calls.

Under concurrent requests, it is seen that interface is not loaded properly on the server side (especially with Weblogic server 8.1SP2) resulting in incorrect objects being cached and showing the ClasscastException being wrapped inside the "InvokeTargetException" on the client side.

Additional Information

EJB