IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

InvocationTargetException

  • 1.  InvocationTargetException

    Posted Fri March 20, 2009 12:51 PM

    Hello,

    I have a Java service which user XSLT transformer, and one of our servers (not the 3 others) has the
    InvocationTargetException:org/apache/xalan/xsltc/trax/TransformerFactoryImpl

    Do you have any ideas for that?
    Thanks,
    The source code of the Java service is :
    String vMessage;
    XSLTransformer vTrans;
    String vDonneesMetier;

    // pipeline
    IDataCursor pipelineCursorInput = pipeline.getCursor();
    InputStream pStreamFileXML = (InputStream)IDataUtil.get( pipelineCursorInput, “pStreamFileXML” );
    String pPathFileXSLT = IDataUtil.getString( pipelineCursorInput, “pPathFileXSLT” );
    String pParametersName = IDataUtil.getStringArray( pipelineCursorInput, “pParametersName” );
    String pParametersValue = IDataUtil.getStringArray( pipelineCursorInput, “pParametersValue” );

    pipelineCursorInput.destroy();

    if(pStreamFileXML == null) {
    vMessage = new String(“Le champ pStreamFileXML ne peut être null”);
    throw new ServiceException (vMessage);
    }
    if(pPathFileXSLT == null) {
    vMessage = new String(“Le champ pPathFileXSLT ne peut être null”);
    throw new ServiceException (vMessage);
    }

    if(pParametersName == null || pParametersValue == null){
    vTrans = new XSLTransformer(pPathFileXSLT);
    }
    else{
    vTrans = new XSLTransformer(pPathFileXSLT, pParametersName, pParametersValue);
    }

    try{
    vDonneesMetier = vTrans.transform(pStreamFileXML);
    }
    catch(TransformerConfigurationException e){
    throw new ServiceException (e);
    }
    catch(TransformerException e){
    throw new ServiceException (e);
    }
    catch(IOException e){
    throw new ServiceException (e);
    }

    // pipeline
    IDataCursor pipelineCursorOutput = pipeline.getCursor();
    IDataUtil.put( pipelineCursorOutput, “vDonneesMetier”, vDonneesMetier );
    pipelineCursorOutput.destroy();


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 2.  RE: InvocationTargetException

    Posted Thu March 26, 2009 03:22 PM

    Hi,
    This may or may not solve your problem. We struggled with this error in another scenario- EJB adapter usage. The solution seemed to be putting the custom jar files in the IS\lib\jars instead of \code\jars.

    SRB


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services