This lab guide shows how to extend the Employee Service by adding operations that will load the data from the SAMPLE database to computer memory and allow it to be retrieved from there for improved performance.

Featuring:

  • Add operations to an Integration Service
  • Use JAXB classes to load database records to the embedded Global Cache and access data from the Global Cache

Related tutorial in the IIB V10 Integration Toolkit:

Transformation using Java (JAXB) in a message flow
Learn how to use a JavaCompute node to transform data using Java (JAXB) in an IBM Integration Bus message flow by exploring this simple example.

Related information:

Set up the embedded global cache for high availability in IBM Integration Bus V10 (IBM developerWorks)
This developerWorks article describes how to design a fault-tolerant topology for the embedded global cache. It shows how CDATA XML and tagged formatting can be used to load data into a cache and it provides sample ESQL functions for complex queries.
Embedded global cache (IIB V10 product documentation in IBM Knowledge Center)
An overview of the use of the global cache that is supplied with IBM Integration Bus to store data that you want to reuse.
Configuring the embedded global cache (IIB V10 product documentation in IBM Knowledge Center)
How to configure properties of the embedded global cache by using commands, an XML cache policy file, or the IBM Integration API.

12 comments on"[iib10] Lab 4: Using IIB Embedded Global Cache"

  1. I cannot import project. Error message ‘Selected zip file contains no projects to import’. How to fix it?

    • @lazzuardi Hi,
      You first have to extract the files from the ZIP file. That creates the directories that contain the project interchange files to import into the toolkit (for example, as described in the Lab instructions, section “2.1 Import Employee Service”).
      You might want to get the updated archive file for all the labs, which you can find a link for on the page Self-study labs.

      Regards,
      Ian

  2. Manish Joshi March 28, 2017

    Hello Team,

    I am getting the below error, Could you please help me finding the cause.

    I have created an EMPLOYEE table in Oracle database.
    I don’t understand how we are passing a ROW type as parameter to evaluate function which is throwing exception.

    Error sending request to http “http://localhost:7800/EmployeeService”

    soapenv:Server
    BIP3113E: Exception detected in message flow gen.EmployeeService.SOAP Input (integration node TESTNODE_manis)

    BIP2230E: Error detected whilst processing a message in node ‘gen.EmployeeService.loadCache_Request_Response.loadData’.

    The integration node detected an error whilst processing a message in node ‘gen.EmployeeService.loadCache_Request_Response.loadData’. An exception has been thrown to cut short the processing of the message.

    See the following messages for details of the error. : F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\SQLNodeLibrary\ImbComputeNode.cpp: 515: ImbComputeNode::evaluate: ComIbmComputeNode: gen/EmployeeService#FCMComposite_1_8.gen/loadCache_Request_Response#FCMComposite_1_1

    BIP2488E: (‘.loadCache_Compute.Main’, ‘35.3’) Error detected whilst executing the SQL statement ”CALL PutJAXB2CACHE(dbResultSetRef.row[I]);”.

    The integration node detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.

    See the following messages for details of the error. : F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\ImbRdl\ImbRdlStatementGroup.cpp: 792: SqlStatementGroup::execute: :

    BIP2934E: Error detected whilst executing the function or procedure ”PutJAXB2CACHE”.

    The integration node detected an error whilst executing the function or procedure ”PutJAXB2CACHE”. An exception has been thrown to cut short the processing of the message.

    See the following messages for details of the error. : F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\ImbRdl\ImbRdlRoutine.cpp: 1550: SqlRoutine::invoke: :

    BIP2919E: (‘.loadCache_Compute.PutJAXB2CACHE’, ‘1.2’) : An error occuirred when invoking the Java method ”com.ibm.betaworks.PutEmployee2Cache.evaluate”. The parameters passed to the method were ”REFERENCE”.

    Other messages give an indication of context of this error. : F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\ImbRdl\ImbRdlExternalJava.cpp: 1530: SqlExternalJavaMethod::executeJavaMethod: :

    BIP2917E: A call to the Java method ”com.ibm.betaworks.PutEmployee2Cache.evaluate” with parameters ”” failed because a Java Exception occurred. The Java Exception information is ”java.lang.NullPointerException”.

    An attempt was made to invoke the Java method ”com.ibm.betaworks.PutEmployee2Cache.evaluate”, but the method threw an exception. Typically the exception occurs because of a coding error in the Java method or an error in the JVM (such as Out of Memory). The Java exception information was ”java.lang.NullPointerException”. The parameters passed into the method were ””.

    Examine and correct the Java method. : F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\ImbRdl\ImbRdlExternalJava.cpp: 1411: SqlExternalJavaMethod::executeJavaMethod: :

  3. I am getting the below error. Can any one help me out?

    Error sending request to http “http://localhost:7800/EmployeeService”
    soapenv:ServerBIP3113E: Exception detected in message flow gen.EmployeeService.SOAP Input (integration node TESTNODE_Ravi) BIP2230E: Error detected whilst processing a message in node ‘gen.EmployeeService.loadCache_Request_Response.loadData’.

    The integration node detected an error whilst processing a message in node ‘gen.EmployeeService.loadCache_Request_Response.loadData’. An exception has been thrown to cut short the processing of the message.

    See the following messages for details of the error. : F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\SQLNodeLibrary\ImbComputeNode.cpp: 515: ImbComputeNode::evaluate: ComIbmComputeNode: gen/EmployeeService#FCMComposite_1_8.gen/loadCache_Request_Response#FCMComposite_1_1

    BIP2348E: Error detected while attempting to obtain a connection to data source ”SAMPLE” of type ”ODBC” using userid ”LocalSystem”.

    The integration node detected an error while attempting to obtain a connection to data source ”SAMPLE” of type ”ODBC” with userid ”LocalSystem”. If your integration node is running on z/OS, it is possible for the userid to be blank, which results in a connection attempt using the userid of the started task.

    See the following messages for details of the error, or use the mqsicvp command to verify the database configuration. : F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\MessageServices\ImbDatabaseManager.cpp: 1270: ImbDatabaseManager::getConnection #4: :

    BIP2393E: Database error: ODBC return code ‘-1’ from data source ”SAMPLE” using ODBC driver manager ”odbc32.dll”.

    The integration node received an error when processing a database operation. The ODBC return code was ‘-1’. See the following messages for information obtained from the database about this error.

    Use the following messages to determine the cause of the error. Typical problems are an incorrect data source, or table names. Correct either the database or the integration node configuration. Use the mqsicvp command to test connectivity to this database. : F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\MessageServices\ImbOdbc.cpp: 2508: ImbOdbcConnection::checkRcInner: :

    BIP2322E: Database error: SQL State ”08001”; Native Error Code ‘-30082’; Error Text ”[IBM][CLI Driver] SQL30082N Security processing failed with reason “3” (“PASSWORD MISSING”). SQLSTATE=08001 ”.

    The error has the following diagnostic information: SQL State ”08001” SQL Native Error Code ‘-30082’ SQL Error Text ”[IBM][CLI Driver] SQL30082N Security processing failed with reason “3” (“PASSWORD MISSING”). SQLSTATE=08001 ”

    This message may be accompanied by other messages describing the effect on the integration node itself. Use the reason identified in this message with the accompanying messages to determine the cause of the error. Use the mqsicvp command to test connectivity to this database. : F:\build\S1000_slot1\S1000_P\src\DataFlowEngine\MessageServices\ImbOdbc.cpp: 2696: ImbOdbcConnection::checkRcInner: :

    • ILIYA Dimitrov February 17, 2017

      Hi Ravi,

      The error points out that a connection to the database SAMPLE can not be established…

      Please ensure you have run ‘mqsisetdbparms’ command to set security credentials for a specific user ID and password for database connections for your system. More detailed information is available in Knowledge Centre:
      https://www.ibm.com/support/knowledgecenter/en/SSMKHH_9.0.0/com.ibm.etools.mft.doc/an09155_.htm

      I hope this helps.

      Thank you

      • Cathy Cinciatta May 09, 2017

        Hello, Iliya:

        I am having the same exact problem detailed by raviibm28 at
        September 24, 2016 at 12:44 am, which you replied to at
        February 17, 2017 at 10:13 am.

        Just to be clear,
        It is at the point in the instructions (page 37 of 53):

        ————————–
        8.1 Test the loadCache operation

        3. Give the message a meaningful name, e.g. “Load Cache”.

        Select loadCache under Soap operation and click Send. This will send a SOAP message to the loadCache operation.
        ————————–

        Lab 4’s zip file did not come with a ‘create DB’ folder,
        like Lab 1 did (Create_HRDB_database), so I re-purposed the
        modules in that folder, to deal with the SAMPLE DB.
        I am not sure if this was a viable concept, at least (being
        that in the end it did not work).

        So, I made two files for the SAMPLE DB:

        3_Create_JDBC_for_SAMPLE

        4_Create_SAMPLE_SecurityId

        And executed them in the IIB Console.

        From the messages, the commands seemed to have worked correctly.

        I believe I used the correct user and password (same one I used
        for Lab 1, and I did complete Lab 1 successfully).

        Then,
        When it didn’t work, I wasn’t sure I should have to do the following,
        but… I thought I would try.

        I changed all references to HRDB to SAMPLE in all of the files in
        the CREATE_HRDB-database folder, from Lab 1.

        Then,
        I executed the commands in DB2 to create the SAMPLE database and tables
        (I was not sure if that was already done in the files that were
        included in the zip for Lab 4).

        I still got those same error messages that raviibm28 outlined.

        Then,
        I tried right-clicking on the data source in the Integration Node section
        of the toolkit, and choosing ‘connect’, before I sent a message to the
        message flow.

        I am afraid I have looked at this long and hard, and tried various
        approaches, and reading in the knowledge center, and I still can’t get it.

        Any help would be very appreciated !

        Thank you,
        Cathy

        • ILIYA Dimitrov May 16, 2017

          Hi Cathy,

          Thank you for your e-mail.

          Could you please confirm what database you are using in your scenario (including version number)?

          With regards to HRDB and Sample DB – these databases have the same data, so you should be able to use either one.
          If you have completed successfully Lab 1, this would mean that the database (HRDB) was already created and you can use that instead of SAMPLE.

          However, as you have mentioned you will have to run the appropriate MQSI commands to set up the credentials. Running the commands successfully means that the syntax and all flags are correct and the command has been recognised by the IIB runtime. However, running the commands does not check the connectivity to the DB, for example.

          The errors seen in raviibm28’s comments point to no connection to the SAMPLE database. Have you tried connecting from the IIB Toolkit to your database with your credentials? It was not very clear to me when you mention in your comment “choosing ‘connect’, before I sent a message to the message flow”. Are you connecting your Integration Node (has it not been connected before that)?

          Please let me know if you have any further questions.

          Thank you

        • Miguel Ramirez April 11, 2018

          The HRDB database created with the Lab01 files, is for JDBC. The Compute Node only works with ODBC connections, so You need to set up the DNS ODBC Data Source in Windows with SAMPLE name referencing your HRDB Database, and ejecute (I’m using MySQL):

          mqsisetdbparms TESTNODE_name -n ODBC::SAMPLE -u user -p password

          in the Integration Console, You can test the connection with :

          mqsicvp TESTNODE_name -n SAMPLE

          And then restart the Integration Node and all is ready. I think the PDF Lab file needs more explanation about this.

          Regards!

  4. Hi Nathan –
    Nice article. I am trying to set up an active/active(MIBRK1(Passive- MIBRK1′) and MIBRK2(Passive-MIBRK2′)) multi-instance broker to use the embedded global cache. The IBM< KC tells me that a catalog server cannot be hosted on a multi-instance broker. So , my point is, if I configure MIBRK1 as a catalog server and if there is a fail over to MIBRK1' – would I be losing the catalog server which is necessary for the cache to be functional ? If yes , what is the ideal topology for a fail over to exist for catalog servers for multi-instance brokers ?

Join The Discussion

Your email address will not be published. Required fields are marked *