首页 > 解决方案 > 将应用程序部署到 IBM Liberty Profile 时执行 CICS 请求时出错

问题描述

如果我将它(在我的本地)部署到 WAS 中,我有一个可以完美运行的应用程序。但是,如果将其部署到 IBM J9 VM 版本 pwa6470_27sr2fp10-20141218_02(SR2 FP10 ) :

com.ibm.connector2.cics.CICSUserInputException@a71e6144
[invalidProperties=<null>,errorCode=<null>,linkedException=<null>,
detailMessage=CTG9628E  InteractionSpec passed to execute() not of type ECIInteractionSpec,
cause=com.ibm.connector2.cics.CICSUserInputException@a71e6144,stackTrace=<null>,
suppressedExceptions=[]]

然而,IteractionSpec 是 ECIInteractionSpec 的一个实例: 异常调试 这是我的 server.xml,值得:

        <server description="new server">
        <featureManager>
            <feature>jsp-2.2</feature>
            <feature>jpa-2.0</feature>
            <feature>jaxrs-1.1</feature>
            <feature>cdi-1.0</feature>
            <feature>beanValidation-1.0</feature>
            <feature>ejbLite-3.1</feature>
            <feature>json-1.0</feature>
            <feature>apiDiscovery-1.0</feature>
            <feature>managedBeans-1.0</feature>
            <feature>jca-1.6</feature>
            <feature>jndi-1.0</feature>
            <feature>javaMail-1.5</feature>
            <feature>jaxws-2.2</feature>
            <feature>localConnector-1.0</feature>
            <feature>jms-1.1</feature>
            <feature>servlet-3.1</feature>
        </featureManager>

        <variable name="SHARED_LIB_ROOT" value="C:\IBM\\IBM\liberty_jars"/>
        <variable name="SHARED_LIB_CONFLU" value="C:\IBM\SHARED_LIB"/>

         <resourceAdapter autoStart="true" id="eciResourceAdapter" location="${SHARED_LIB_CONFLU}/cicseci-9.1.rar">
          <classloader apiTypeVisibility="spec, ibm-api, third-party"/>
       </resourceAdapter>

       <library apiTypeVisibility="spec, ibm-api, third-party" id="gneislibrary">
          <folder dir="${SHARED_LIB_CONFLU}"/>
       </library>
        <!-- drivers lib -->
        <!-- ORACLE -->
        <library id="oracle-lib">
            <fileset dir="${SHARED_LIB_ROOT}\drivers\oracle" includes="oracle-ojdbc6-11.2.0.3.0.jar"/>
        </library>
        <!-- DB2 -->
        <library id="db2-lib">
            <fileset dir="${SHARED_LIB_ROOT}\drivers\db2" includes="db2jcc.jar db2jcc_license_cisuz.jar"/>
        </library>

        <!-- To access this server from a remote client add a host attribute to 
            the following element, e.g. host="*" -->
        <httpEndpoint httpPort="9080" httpsPort="9443" id="defaultHttpEndpoint"/>

        <!-- Automatically expand WAR files and EAR files -->
        <applicationManager autoExpand="true"/>

        <applicationMonitor updateTrigger="mbean"/>

       <connectionFactory id="eciTest" jndiName="eis/CICSPWAS">
          <properties.eciResourceAdapter TPNName="SCTG" connectionUrl="my_hostname" portNumber="my_port_number" tracelevel="3" userName="my_user_name"/>
       </connectionFactory>

        <!-- external libs -->
        <library id="external-lib">
            <fileset dir="${SHARED_LIB_ROOT}\external-lib" includes="*"/>
            <folder dir="${SHARED_LIB_ROOT}\external-lib"/>
        </library>
            <quickStartSecurity userName="wasadmin" userPassword="123456"/> 




        <webApplication contextRoot="/myapp" id="oauth" location="myapp.war" name="myapp">
              <classloader apiTypeVisibility="spec, ibm-api, third-party" classProviderRef="eciResourceAdapter" commonLibraryRef="gneislibrary" delegation="parentFirst"/>
       </webApplication>
        <keyStore location="${server.output.dir}/resources/security/key.jks"></keyStore>
    </server>

标签: websphere-liberty

解决方案


当 CICS TG RAR 代码检查交互规范是否传递了ECIInteractionSpec来自应用程序的预期实例时,会发出“CTG9628E InteractionSpec 传递给 execute() 而不是 ECIInteractionSpec 类型”消息。这表明应用程序没有通过预期的ECIInteractionSpec. 一种可能是用于编译应用程序的 CICS TG RAR 文件与定义 WebSphere Liberty 服务器配置文件的 CICS TG RAR 文件版本不同。

您可以尝试从以下位置下载最新版本的 CICS TG RAR 文件:

https://developer.ibm.com/cics/2016/03/11/cics-tg-sdks

将 CICS TG RAR 文件从(提取后)复制/cicstgsdk/api/jee/runtime/managed/cicseci.rar到您的应用程序并重新编译该应用程序。还在您的自由配置文件中使用相同的 CICS TG RAR 并验证场景。


推荐阅读