故障诊断与支持

故障诊断技术和自助信息有助于您快速识别和解决问题。本主题为您可能遇到的 SAP 连接器问题提供可能的解决方案。

日期和时间字段值的受支持格式

下表描述了 SAP 连接器所有活动的日期和时间字段值的受支持格式:
表 1. 日期和时间字段值的格式
字段 输入参数(非启动方活动) 输出参数(启动方和非启动方活动)
日期 yyyy-mm-dd

或者

yyyymmdd

yyyymmdd
时间 hh:mm:ss

或者

hhmmss

hhmmss

SAP 连接器 V6.0.x 及更早版本中日期和时间字段值的输入和输出参数的受支持格式分别为:yyyy-mm-ddhh:mm:ss

使用相同 RFC 程序标识部署具有“接收 RFC”和“接收 IDOC”活动的编排时抛出异常

问题:使用相同 SAP RFC 程序标识部署具有“接收 RFC”和“接收 IDOC”活动的编排时,将抛出以下异常:

java.lang.RuntimeException: An attempt to start a JCoIDocServer failed. There might be an existing JCoServer with the same server configuration, else try restarting your server
at com.ibm.j2ca.sap.inbound.SapJCoServerBuilder.verfiyServerConfiguration(SapJCoServerBuilder.java:403)
at com.ibm.j2ca.sap.inbound.SapJCoServerBuilder.createServer(SapJCoServerBuilder.java:96)
at com.ibm.j2ca.sap.inbound.SAPEventListenerManager.buildEventListener(SAPEventListenerManager.java:149)
at com.ibm.j2ca.sap.inbound.SAPEventListenerManager.startEventListeners(SAPEventListenerManager.java:132)
at com.ibm.j2ca.sap.inbound.EndpointManager.addEndpoint(EndpointManager.java:68)
at com.ibm.j2ca.sap.SAPResourceAdapter.endpointActivation(SAPResourceAdapter.java:266)
at com.approuter.module.sap.activity.ReceiveIDOCActivity.activate(ReceiveIDOCActivity.java:222)
at com.approuter.maestro.activities.BaseModule.activate(BaseModule.java:296)
at com.approuter.maestro.vm.Program.start(Program.java:796)
at com.approuter.maestro.vm.Kernel.startOrchestration(Kernel.java:704)
at com.approuter.maestro.management.Loader$1.run(Loader.java:461)
at java.lang.Thread.run(Thread.java:736)

原因:SAP JCo 仅允许一个具有给定服务器配置集的 JCoServer 实例在 Java 虚拟机 (JVM) 中运行;具有相同服务器配置的另一 JCoServer 不能在同一 JVM 中运行。 JCo 抛出指示服务器无法重新启动的错误。 “接收 IDOC”活动和“接收 RFC”活动不支持在编排期间使用相同 SAP 程序标识。

解决方案: 确保使用不同的 SAP 程序标识,部署具有“接收 RFC”和“接收 IDOC”活动的编排,并为 IDOC/RFC 创建不同的端点。

避免“超过最大会话数 202”错误的建议配置

在使用 SAP 连接器时,如果显示错误“超过最大会话数 202”,建议采取以下配置:

错误

LOCATION   CPIC (TCP/IP) on local host with Unicode
ERROR      max no of 202 conversations exceeded
TIME       <Day> <Date> <Time> <Year>
RELEASE    720
COMPONENT  CPIC (TCP/IP) with Unicode

以下建议依赖于负载和并行请求数:

  1. 减小端点配置中的超时值以使未使用的连接自动终止。
  2. 配置 Cast Iron 运行时和 SAP 网关以支持更多的 RFC 连接。
    1. 在 Cast Iron 运行时上将环境值 CPIC_MAX_CONV 设置为 >100。更新 maestro.sh 以设置环境变量。“计划 A”中描述了相关步骤。
    2. 在 SAP 网关上增加概要文件值 gw/max_conngw/max_sys 以支持多个并行连接。此外,如果遇到内存瓶颈问题,那么还需增加 gw/max_overflow_sizegw/max_shm_req 的值。
    3. 将 SAP 端点中的“最大连接数”值设置为实际值。 根据负载和并行请求数,设备将执行生成或接收操作。
    4. 将 SAP 端点中的“服务器实例数”值设置为 10。
  3. 示例值:
    SAP-Gateway
    
    gw/max_conn=2000, gw/max_sys=1200
    
    gw/max_overflow_size =40000000, gw/max_shm_req = 200 (this is to adjust the memory allocation)
    
    CPIC_MAX_CONV=5000

计划 A

  1. 登录到设备 shell(联系 IBM 支持人员,获取设备 shell 密钥以便登录到系统 shell)。
  2. 转至 /usr/ironhide/bin 文件夹。备份 maestro.sh(将 maestro.sh 复制到 maestro.sh.old)。
  3. 编辑 maestro.sh
    move to line 
    #  Version of java currently in use.
    if [ -z $JAVA_HOME ]; then
      JAVA_HOME=/usr/java/default
    fi
    
    JAVA="${JAVA_HOME}/bin/java"
  4. 添加以下行:
    ## maximum SAP conversations allowed
    export CPIC_MAX_CONV=500
  5. 保存并退出。
  6. 退出系统 shell 并运行命令 system restart 以重新启动设备运行时。

将 JRE 从 32 位升级到 64 位

问题:如果您的 SAP 项目运行在较低版本的设备上,那么在将设备升级到 V7.0 或更高版本时,SAP 项目将不启动,并发生以下错误:

  • WMC 中抛出的错误示例:
    Start of Orchestration config-
    url://SAP_BAPI/1.0/Default/Orchestrations/Orchestration failed:
    java.lang.ExceptionInInitializerError: Error
    getting the version of the native layer:
    java.lang.UnsatisfiedLinkError: sapjco3
    (/usr/ironhide/lib/thirdparty/libsapjco3.so:
    wrong ELF class: ELFCLASS32).
    Required SAP JCO library is not found.
    Install version 3.x SAP JCO library (.dll or .so based on platform)
  • maestro.out 日志中记录的异常示例:
    java.lang.UnsatisfiedLinkError: sapjco3 (/usr/ironhide/lib/thirdparty/libsapjco3.so: wrong ELF class: ELFCLASS32)
    	at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1030)
    	at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:994)
    	at java.lang.System.loadLibrary(System.java:507)
    	at com.sap.conn.jco.rt.DefaultJCoRuntime.loadLibrary(DefaultJCoRuntime.java:481)
    	at com.sap.conn.jco.rt.DefaultJCoRuntime.registerNativeMethods(DefaultJCoRuntime.java:347)
    	at com.sap.conn.jco.rt.JCoRuntime.registerNatives(JCoRuntime.java:1108)
    	at com.sap.conn.rfc.driver.CpicDriver.<clinit>(CpicDriver.java:954)
    	at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at com.sap.conn.rfc.engine.DefaultRfcRuntime.getVersion(DefaultRfcRuntime.java:43)
    	at com.sap.conn.rfc.api.RfcApi.RfcGetVersion(RfcApi.java:237)
    	at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:215)
    	at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:77)
    	at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)
    	at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at java.lang.Class.forNameImpl(Native Method)
    	at java.lang.Class.forName(Class.java:182)
    	at com.sap.conn.jco.JCo.createJCo(JCo.java:52)
    	at com.sap.conn.jco.JCo.<clinit>(JCo.java:26)
     at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at java.lang.Class.forNameImpl(Native Method)
    	at java.lang.Class.forName(Class.java:182)
    	at com.approuter.module.sap.SAPActivator.checkSAPInstalled(SAPActivator.java:101)
    	at com.approuter.module.sap.activity.SAPBaseActivity.checkSapSetup(SAPBaseActivity.java:498)
    	at com.approuter.module.sap.activity.SAPBaseActivity.generateSchemas(SAPBaseActivity.java:172)
    	at com.approuter.module.sap.activity.SapSendRfcData.activate(SapSendRfcData.java:112)
    	at com.approuter.maestro.activities.BaseModule.activate(BaseModule.java:301)
    	at com.approuter.maestro.vm.Program.start(Program.java:768)
    	at com.approuter.maestro.vm.Kernel.startOrchestration(Kernel.java:739)
    	at com.approuter.maestro.management.Loader$1.run(Loader.java:455)
    	at java.lang.Thread.run(Thread.java:738)
    java.lang.ExceptionInInitializerError: Error getting the version of the native layer: java.lang.UnsatisfiedLinkError: sapjco3 (/usr/ironhide/lib/thirdparty/libsapjco3.so: wrong ELF class: ELFCLASS32)
     at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:227)
     at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:77)
     at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)
     at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at java.lang.Class.forNameImpl(Native Method)
    	at java.lang.Class.forName(Class.java:182)
    	at com.sap.conn.jco.JCo.createJCo(JCo.java:52)
     at com.sap.conn.jco.JCo.<clinit>(JCo.java:26)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at java.lang.Class.forNameImpl(Native Method)
    	at java.lang.Class.forName(Class.java:182)
    	at com.approuter.module.sap.SAPActivator.checkSAPInstalled(SAPActivator.java:101)
    	at com.approuter.module.sap.activity.SAPBaseActivity.checkSapSetup(SAPBaseActivity.java:498)
    	at com.approuter.module.sap.activity.SAPBaseActivity.generateSchemas(SAPBaseActivity.java:172)
    	at com.approuter.module.sap.activity.SapSendRfcData.activate(SapSendRfcData.java:112)
    	at com.approuter.maestro.activities.BaseModule.activate(BaseModule.java:301)
    	at com.approuter.maestro.vm.Program.start(Program.java:768)
    	at com.approuter.maestro.vm.Kernel.startOrchestration(Kernel.java:739)
    	at com.approuter.maestro.management.Loader$1.run(Loader.java:455)
    	at java.lang.Thread.run(Thread.java:738)
    2013-08-22 09:18:25.013 SEVERE [T-10] [orc:SAP_BAPI/1.0/Default/Orchestrations/Orchestration] [com.approuter.module.common.util.LogHelper] Required SAP JCO native library is not found. Install version 3.x SAP JCO native library(.dll or .so based on platform).
    java.lang.RuntimeException: java.lang.ExceptionInInitializerError: Error getting the version of the native layer: java.lang.UnsatisfiedLinkError: sapjco3 (/usr/ironhide/lib/thirdparty/libsapjco3.so: wrong ELF class: ELFCLASS32)
    	at com.approuter.module.sap.activity.SAPBaseActivity.checkSapSetup(SAPBaseActivity.java:509)
    	at com.approuter.module.sap.activity.SAPBaseActivity.generateSchemas(SAPBaseActivity.java:172)
    	at com.approuter.module.sap.activity.SapSendRfcData.activate(SapSendRfcData.java:112)
    	at com.approuter.maestro.activities.BaseModule.activate(BaseModule.java:301)
    	at com.approuter.maestro.vm.Program.start(Program.java:768)
    	at com.approuter.maestro.vm.Kernel.startOrchestration(Kernel.java:739)
    	at com.approuter.maestro.management.Loader$1.run(Loader.java:455)
    	at java.lang.Thread.run(Thread.java:738)
    Caused by: java.lang.ExceptionInInitializerError: Error getting the version of the native layer: java.lang.UnsatisfiedLinkError: sapjco3 (/usr/ironhide/lib/thirdparty/libsapjco3.so: wrong ELF class: ELFCLASS32)
     at com.sap.conn.jco.rt.MiddlewareJavaRfc.<clinit>(MiddlewareJavaRfc.java:227)
     at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at com.sap.conn.jco.rt.DefaultJCoRuntime.initialize(DefaultJCoRuntime.java:77)
     at com.sap.conn.jco.rt.JCoRuntimeFactory.<clinit>(JCoRuntimeFactory.java:23)
     at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at java.lang.Class.forNameImpl(Native Method)
    	at java.lang.Class.forName(Class.java:182)
    	at com.sap.conn.jco.JCo.createJCo(JCo.java:52)
    	at com.sap.conn.jco.JCo.<clinit>(JCo.java:26)
    	at java.lang.J9VMInternals.initializeImpl(Native Method)
    	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
    	at java.lang.Class.forNameImpl(Native Method)
    	at java.lang.Class.forName(Class.java:182)
    	at com.approuter.module.sap.SAPActivator.checkSAPInstalled(SAPActivator.java:101)
    	at com.approuter.module.sap.activity.SAPBaseActivity.checkSapSetup(SAPBaseActivity.java:498)

原因

在较低版本的 Cast Iron 设备(V6.3 及更低版本)中,使用的是 32 位的 SAP JCO 库。自 Cast Iron 设备 V7.0 开始,必须使用 64 位的 SAP JCO 库。

解决方案

请完成以下步骤以删除 32 位的 SAP JCO 库 sapjco3.jarlibsapjco3.so,并装入 64 位的 SAP JCO 库:

升级 SAP JCO 库

  1. 联系 SAP 技术支持人员以获取下列 SAP 组件的压缩文件:
    • 针对 Linux AMD 64 位平台的 SAP JCO R3.0.6 或更高版本。 例如,sapjco3-linuxx86_64-3.0.10.tgz
  2. 在 WMC 中,转至系统 > 升级 > 更新连接器库
  3. 在“更新连接器库”窗口中,从“连接器”列表中选择 SAP 连接器。
  4. 删除“已安装文件”列表中显示的现有 SAP JCO 库并重新启动设备。
  5. 重新启动设备后,转至系统 > 升级 > 更新连接器库
  6. 上载新下载的 SAP JCO 64 位库。库上载完成后,将提示您重新启动设备。
  7. 重新启动设备并启动 SAP 项目。所有 SAP 编排都正常启动而不产生任何错误。



反馈 | 声明


http://pic.dhe.ibm.com/infocenter/wci/v7r0m0/topic/com.ibm.wci.doc/SAP_troubleshooting.html