My Oracle Support Banner

JOLT 1.2 - Jolt SessionPool does not seem to throw any exceptions - CR 020824 (Doc ID 766179.1)

Last updated on MAY 10, 2021

Applies to:

Oracle Tuxedo Jolt - Version 1.2 and later
Information in this document applies to any platform.
Information in this document applies to any platform

Goal

DESCRIPTION:

Jolt SessionPool does not seem to throw any exceptions.

For example this code:

import          bea.jolt.*;
import          java.awt.*;

public class simpclmain
{
public static void main (String argv[])
{
JoltSessionAttributes MyAttributes;
MyAttributes = new JoltSessionAttributes();
MyAttributes.setString(MyAttributes.APPADDRESS,"//hostname.domain:port#");
JoltSession MySession;
MySession = new JoltSession(MyAttributes,null,null,null,null);
JoltRemoteService MyService;
MyService = new JoltRemoteService("TOUPPER",MySession);
MyService.setStringItem("STRING",00,"samplestring");
MyService.call(null);
MySession.endSession();
System.out.println("Question : TOUPPER?");
System.out.println("Answer: "+MyService.getStringItemDef("TRING",0,"it did not
work"));
System.exit(0);
}
}                                         

gives me this reply:

java.lang.NoSuchFieldError: TRING
        at bea.jolt.JoltDefinition.getParam(JoltDefinition.java:230)
        at bea.jolt.JoltDefinition.name2p(JoltDefinition.java:165)
        at bea.jolt.JoltMessage.setItem(JoltMessage.java:879)
        at bea.jolt.JoltMessage.setStringItem(JoltMessage.java:428)
        at bea.jolt.JoltRemoteService.setStringItem(JoltRemoteService.java:712)
        at simpclmain.main(simpclmain.java:15)                                 


The repository defines a TOUPPER service with one parameter called STRING , which is a string.

but this code will not raise any exception:

import bea.jolt.*;
import bea.jolt.pool.*;

public class Pho2 {
    public static void main(String argv[])
    {
        try
        {
           String[] adresses = new String[1];
           adresses[0] = "//hostname.domain:port#";

           // creation du manager et du pool par defaut
           SessionPoolManager sessionPoolManager = new SessionPoolManager();
           int i = sessionPoolManager.createSessionPool(adresses, null, 1, 3, new UserInfo(), null);

           SessionPool sessionPool = sessionPoolManager.getSessionPool(null);
           DataSet dataset = new DataSet();
           Result result=null;
           dataset.setValue("rhaine","coucou");
           try
           {
           result = sessionPool.call("TOUPPER", dataset, null);   

           }
       catch(Exception Ex)
       {
           System.out.println("session");
           Ex.printStackTrace();
       }
           System.out.println("dataset="+dataset);
           System.out.println("result ="+result);
           System.out.println("ApplicationCode="+(new Integer(result.getApplicationCode())).toString());
       }
       catch(Exception Ex)
       {
           System.out.println(Ex.getMessage());
       }
    }
}

NOTE: The attribute values used in this article represent fictitious sample names that are made up as example. Any similarity to actual code, is purely coincidental and not intended in any other manner.

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.