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

Last updated on NOVEMBER 04, 2016

Applies to:

Oracle Tuxedo Jolt / Jolt / unknown version
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,"//aglaia:7040");
JoltSession MySession;
MySession = new JoltSession(MyAttributes,null,null,null,null);
JoltRemoteService MyService;
MyService = new JoltRemoteService("TOUPPER",MySession);
MyService.setStringItem("STRING",00,"paris");
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] = "//aglaia:7040";

           // 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());
       }
    }


}

Solution

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms