webMethods

webMethods

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

Invoking Ibatis jar file from webmethods java service

  • 1.  Invoking Ibatis jar file from webmethods java service

    Posted Mon April 04, 2016 11:48 AM

    Hello,

    I have a requirement to invoke a jar file that implements spring + ibatis framework in Java .While invoking this jar file ,I am getting the below error .

    java.lang.reflect.InvocationTargetException:com/ibatis/sqlmap/client/SqlMapExecutor

    This error seems the bean initialization falure .

    I have included all jars files in the classpath .

    Please let me know if anyone had come cross this type of issue .

    Thanks,
    KrishnaPriya A


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


  • 2.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Mon April 04, 2016 12:14 PM

    Hi Krishna,

    please provide the following details:

    • wM Version with FixLevel
    • where exactly was the jar placed
    • was the package reloaded or the IS restarted after placing the jar
    • the complete StackTrace for the InvocationTargetException
    • screenshot of the java service

    Regards,
    Holger


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


  • 3.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Mon April 04, 2016 05:14 PM

    Hi Holger,
    Thanks for your response.Please find answers below.

    wM Version:9.9.0.0
    Fix:IS_9.9_SPM_Fix1
    IS_9.9_Core_Fix1

    Jars are placed in the below directory.
    /opt/mount1/wm/webMethods/IntegrationServer/instances/default/packages/Default/code/jars

    Package was reloaded after the jars places in the directory.

    It does not log any more stack trace of the error other than below .
    java.lang.reflect.InvocationTargetException:com/ibatis/sqlmap/client/SqlMapExecutor

    I have attached the screen shot of my java service .I am invoking an external jar and the jar uses spring + ibatis framework.

    Thanks,
    KrishnaPriya A


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


  • 4.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Tue April 05, 2016 08:31 AM

    Hi Krishna,

    in which package is your service located?
    Default?

    If this Jar should be visible instancewide it is better to place it under /opt/mount1/wm/webMethods/IntegrationServer/instances/default/lib/jars/custom.

    If this Jar should be visible only to certain packages than it should be placed in the first package under code/jars and all other packages need a Package Dependency to this package.

    Is there any thing related to this in the /opt/mount1/wm/webMethods/IntegrationServer/instances/default/logs/server.log?

    Regards,
    Holger


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


  • 5.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Tue April 05, 2016 10:32 AM

    Hi Holger,

    Yes the package where the service located is Default. This jar is specific to the package and so I have placed at the package level.

    There was no detailed error logged in the server log or error log .

    Thanks,
    KrishnaPriya A


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


  • 6.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Tue April 05, 2016 11:02 AM

    Hi Krishna,

    I did some research on the net.

    As Ibatis was retired in 2010, please consider if you can switch to its successor MyBatis instead.

    BTW:
    Which version of Ibatis are you using?

    Regards,
    Holger


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


  • 7.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Tue April 05, 2016 11:58 AM

    Hi Holger,

    I a using ibatis-2.3.0.677.jar.

    Do you have any idea if we have to do any other configurations like applicationcontext.xml for the spring framework .

    Thanks,
    KrishnaPriya A


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


  • 8.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Tue April 05, 2016 04:10 PM

    Hi Krishna,

    can you elaborate on the ibatis-jar if there is such class in it?
    The jar can be openend with zip-compatible program.

    A longer StackTrace might definitely help to determine where the mentioned class SqlMapExecutor is referenced.

    I have checked ibatis-3-core-3.0.0.220.jar and there is no class with this name.
    They all start with "org\apache\ibatis".

    Regards,
    Holger


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


  • 9.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Thu April 07, 2016 01:30 AM

    Hi Holger,

    I am using the old ibatis file .It has package com.ibatis .The package org\apache\ibatis\ is for myibatis.

    The detail stack trace is not logged .

    Do you have any idea if we have to do any other configurations like applicationcontext.xml for the spring framework .

    Thanks,
    Krishnapriya A


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


  • 10.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Thu April 07, 2016 01:55 AM

    Did you tried to place the jar in
    /opt/mount1/wm/webMethods/IntegrationServer/instances/default/lib/jars ?

    and restart the server and try agin


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


  • 11.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Thu April 07, 2016 09:13 AM

    Hi Venkata,

    more likely the path should be /opt/mount1/wm/webMethods/IntegrationServer/instances/default/lib/jars/custom in this case.

    Regards,
    Holger


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


  • 12.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Thu April 07, 2016 02:45 PM

    Hi Krishna,

    if you are not forced to use the version 2.3.0.677, can you try out ibatis-2.3.4.726 which is the latest version available form Apache Archives for the Ibatis 2-stream?

    Please increase the Log-Level for the IS to Debug and see if you get a StackTrace then.

    Having the StackTrace available might ease in narrowing down, why and where the InvocationTargetExcpetion is thrown.

    Regards,
    Holger


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


  • 13.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Thu April 07, 2016 02:56 PM

    Addendum:

    Eventually you might be hittting a bug here.

    From Release.txt for 2.3.4.726 (Listed for Version 2.3.1):
    o Fixed IBATIS-406 Bug in Ibatis sqlMap when one resultMap has multiple results that are resultMaps… then the groupby attribute only seems to work for the first embedded resultMap.
    o Fixed IBATIS-435 Bug Using iBATIS 2.3.0 And Spring Framework

    Regards,
    Holger


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


  • 14.  RE: Invoking Ibatis jar file from webmethods java service

    Posted Thu April 07, 2016 11:28 PM

    Hi Krishna Priya,

    Did the suggestions worked or U still facing same issue?

    Thanks,
    Venkata


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