Skip Headers
Oracle® Fusion Middleware Application Adapter for SAP R/3 (SAP JCo 3.0) User's Guide for Oracle WebLogic Server
11g Release 1 (11.1.1.4.0)

Part Number E17656-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

11 Troubleshooting and Error Messages

This chapter explains the limitations and workarounds when connecting to SAP R/3. It contains the following topics:

The adapter-specific errors listed in this chapter can arise whether using the adapter with an Oracle Adapter J2CA or with an Oracle Adapter Business Services Engine (BSE) configuration.

Troubleshooting

This topic provides troubleshooting information for SAP R/3, separated into four categories:

Log file information that can be relevant in troubleshooting can be found in the following locations based on your adapter installation:

Application Explorer

This topic discusses the different types of errors that can occur when using Application Explorer.

Error Solution
SAP R/3 does not appear in the Application Explorer Adapter node list. Ensure that the sapjco3.jar and sapjco3.dll files are added to the lib directory.
Cannot connect to Oracle Application Adapter for SAP R/3 from Application Explorer.

Problem activating adapter

Ensure that:
  • SAP R/3 is running.

  • The Application Server name, System Number, and Client Number are correct.

  • The SAP R/3 user ID and password are correct.

Cannot connect to the SAP R/3 target through Application Explorer. The following error message appears:

Error getting target [SAP] - java.lang.Exception: Error Logon to SAP System

Ensure that you enter the correct connection parameters when connecting to the SAP R/3 target.
Cannot connect to your SAP R/3 system through Application Explorer. The following error message appears:

Problem activating adapter. (com.ibi.sapr3.SapAdapterException: com.sap.mw.jco.JCO$Exception: (102) RFC_ERROR_COMMUNICATION: Connect to SAP gateway failed Connect_PM GWHOST=isdsrv8, GWSERV=sapgw00, ASHOST=isdsrv8, SYSNR=00 LOCATION CPIC (TCP/IP) on local host ERROR partner not reached (host isdsrv8, service 3300) TIME Fri Aug 27 11:49:14 2004 RELEASE 620 COMPONENT NI (network interface) VERSION 36 RC -10 MODULE ninti.c LINE 979 DETAIL NiPConnect2 SYSTEM CALL SO_ERROR ERRNO 10061 ERRNO TEXT WSAECONNREFUSED: Connection refused COUNTER 1). Check logs for more information

Ensure that SAP R/3 is running and that you are using the correct parameter values to connect to your application server.
Cannot connect to your SAP R/3 system through Application Explorer even though SAP R/3 is running. The following error message appears:

Problem activating adapter. (com.ibi.sapr3.SapAdapterException: java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC' JCO.nativeInit(): Could not initialize dynamic link library sapjco3 [no sapjco3 in java.library.path]. java.library.path

Ensure that the sapjco3.dll file is added to the lib directory and to the Windows system32 folder.
The dll is loaded in another classloader (BSE and J2CA are installed on the same server). The following error message appears:

com.ibi.sapr3.SapAdapterException: java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'JCO.nativeInit(): Could not initialize dynamic link library sapjco3 [Native Library F:\iWay55.008.0628\lib\sapjco3.dll loaded in another classloader]. java.library.path

Add sapjco3.jar to the server classpath.
Unable to start Application Explorer in a Solaris environment. The following exception is thrown in the console:

javax.resource.ResourceException: IWAFManagedConnectionFactory: License violation.at com.ibi.afjca.spi.IWAFManagedConnectionFactory.createConnectionFactory(IWAFManagedConnectionFactory.java:98)at com.iwaysoftware.iwae.common.JCATransport.getConnectionFactory(JCATransport.java:133) at com.iwaysoftware.iwae.common.JCATransport.initJCA(JCATransport.java:69)at com.iwaysoftware.iwae.common.JCATransport.<init>(JCATransport.java:62)at com.iwaysoftware.iwae.common.AdapterClient.<init>(AdapterClient.java:85)at com.ibi.bse.ConfigWorker.run(ConfigWorker.java:41)at java.lang.Thread.run(Thread.java:534)

Could not create the connection factory.

JAVACMD is not set on the user system. Before starting Application Explorer, export JAVACMD as follows:

JAVACMD=/<jdk_home>/bin/java, where <jdk_home> is the directory where JDK is installed on your system.

Logon failure error at run-time If the password for connecting to your SAP R/3 system is not specified when creating a target or with the Edit option in Application Explorer, then you are unable to connect to SAP R/3. The connection password is not saved in repository.xml. Update the password using the Edit option in Application Explorer, then restart the application server.
The following exception occurs when you start Application Explorer by activating ae.bat (not iaexplorer.bat):

java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider

This is a benign exception. It does not affect adapter functionality. Download BouncyCastle files from:

ftp://ftp.bouncycastle.org/pub


SAP R/3

Error Solution
When executing a request, the following error message appears:

AdapterException: java.lang.Exception: Function module CUSTOMER_GETDETAIL2 does NOT exist.

Check the syntax of your input XML document and make sure the name of the Remote Function module is correct, available in SAP R/3, and activated.
When executing a request, the following error message appears:

AdapterException: java.lang.Exception: Object type unknown for business object: CUST

Check the syntax of your input XML document and verify that the Business Object type exists in SAP R/3 and is correct and activated. Also verify that the name of your document is correct.
When executing a request, the following error message appears:

AdapterException: java.lang.Exception: Unable to retrieve BAPI name for: CUSTOMER.DETAIL2

Check the syntax of your input XML document and verify that the name of the BAPI is correct, available in SAP R/3, and activated.
When executing a request, the following error message appears:

java.lang.RuntimeException: com.sap.mw.jco.JCO$AbapException: (126) OBJECT_UNKNOWN: Basic type or extension does not exist.

Check the syntax of your input XML document and verify that the IDoc type or extension type is correct, available in SAP R/3, and activated.
When executing a request, the following error message appears:

AdapterException: java.lang.Exception: BapiError/BapiAbort: You are not authorized to display customers.

Verify that your user ID has the correct permissions configured in SAP R/3. Consult your SAP R/3 administrator for more information.

Note:

Activation is an important SAP concept. If an object does not exist in an activated state, it may appear as present on the system, but is not available for use. This is especially important for IDOCs and SAP Business Objects. Consult your SAP documentation for further information.

Oracle Adapter J2CA

Error Solution
In Application Explorer, the following error message appears when you attempt to connect to an Oracle Adapter J2CA configuration:

Could not initialize JCA

In the Details tab in the right pane, ensure that the directory specified in the Home field points to the correct directory, for example:
<ADAPTER_HOME>\soa\thirdparty\ApplicationAdapters\tools\iwae\bin\..\..\..\

BSE Error Messages

This topic discusses the different types of errors that can occur when processing Web services through BSE.

General Error Handling in BSE

BSE serves as both a SOAP gateway into the adapter framework and as the engine for the adapters. In both design-time and run-time, various conditions can cause errors in BSE when Web services that use adapters run. These conditions and resulting errors are exposed the same way, regardless of the specific adapter; others are exposed differently, based on the adapter being used. This topic explains what you can expect if you encounter the more common error conditions on an adapter-specific basis.Usually the SOAP gateway (agent) inside BSE passes a SOAP request message to the adapter required for the Web service. If an error occurs, then how it is exposed depends on the adapter and the API or interfaces that the adapter uses. A few scenarios cause the SOAP gateway to generate a SOAP fault. In general, anytime the SOAP agent inside BSE receives an invalid SOAP request, a SOAP fault element is generated in the SOAP response. The SOAP fault element contains fault string and fault code elements. The fault code contains a description of the SOAP agent error.

The following SOAP response document results when BSE receives an invalid SOAP request:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">  
 <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultcode>SOAP-ENV:Client</faultcode>
         <faultstring>Parameter node is missing</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

In this example, BSE did not receive an element in the SOAP request message that is mandatory for the WSDL for this Web service.

Adapter-Specific Error Handling

When an adapter raises an exception during run-time, the SOAP agent in BSE produces a SOAP fault element in the generated SOAP response. The SOAP fault element contains fault code and fault string elements. The fault string contains the native error description from the adapter target system. Since adapters use the target system interfaces and APIs, whether an exception is raised depends on how the target systems interface or API treats the error condition. If a SOAP request message is passed to an adapter by the SOAP agent in BSE and that request is invalid based on the WSDL for that service, then the adapter may raise an exception yielding a SOAP fault. While it is almost impossible to anticipate every error condition that an adapter may encounter, the following is a description of how adapters handle common error conditions and how they are then exposed to the Web services consumer application.

Oracle Application Adapter for SAP R/3 Invalid SOAP Request

If Oracle Application Adapter for SAP R/3 receives a SOAP request message that does not conform to the WSDL for the Web services being carried out, then the following SOAP response is generated.

<?xml version="1.0" encoding="ISO-8859-1" ?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
  <faultcode>SOAP-ENV:Server</faultcode> 
  <faultstring>Error processing agent [XDSapIfrAgent] - XD[FAIL] SapIFRException: java.sql.SQLException:  
com.ibi.sapjco3.SapCallableStatement: execute() j java.util.NoSuchElementException</faultstring>
  </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Empty Result From SOAP Request

If Oracle Application Adapter for SAP R/3 carries out an SAP R/3 object using input parameters passed in the SOAP request message that do not match records in SAP R/3, then the following SOAP response is generated.

<?xml version="1.0" encoding="ISO-8859-1" ?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
 <SOAP-ENV:Fault>
  <faultcode>SOAP-ENV:Server</faultcode> 
  <faultstring>Error processing agent [XDSapIfrAgent] - XD[FAIL] SapIFRException:  
java.sql.SQLException: com.ibi.sapjco3.SapCallableStatement: execute() 
java.sql.SQLException: JCO Error Key: NO_RECORD_FOUND Short Description:
com.sap.mw.jco.JCO$AbapException: (126) NO_RECORD_FOUND: NO_RECORD_FOUND</faultstring>
   </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

Failure to Connect to SAP R/3

If Oracle Application Adapter for SAP R/3 cannot connect to SAP R/3 when executing a Web service, then the following SOAP response is generated:

<?xml version="1.0" encoding="ISO-8859-1" ?> 
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
 <SOAP-ENV:Fault>
  <faultcode>SOAP-ENV:Server</faultcode> 
  <faultstring>Error processing agent [XDSapIfrAgent] - XD[RETRY]    
Connect to SAP gateway failed Connect_PM GWHOST=ESDSUN, GWSERV=sapgw00, ASHOST=ESDSUN,
SYSNR=00 LOCATION CPIC (TCP/IP) on local host ERROR partner not reached (host ESDSUN, service 3300)
TIME Mon Jun 30 16:01:02 2003 RELEASE 620 COMPONENT NI (network interface) VERSION 36 RC -10 MODULE ninti.c LINE 976 DETAIL NiPConnect2
SYSTEM CALL SO_ERROR ERRNO 10061 ERRNO TEXT WSAECONNREFUSED: Connection refused COUNTER 1</faultstring>
  </SOAP-ENV:Fault>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Invalid SOAP Request

If Oracle Application Adapter for SAP R/3 receives a SOAP request message that does not conform to the WSDL for the Web services being carried out, then the following SOAP response is generated.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
 <SOAP-ENV:Fault>
  <faultcode>SOAP-ENV:Server</faultcode>
  <faultstring>RPC server connection failed: Connection refused: connect</faultstring>
 </SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Empty Result From Oracle Application Adapter for SAP R/3 Request

If Oracle Application Adapter for SAP R/3 carries out a SOAP request using input parameters passed that do not match records in the target system, then the following SOAP response is generated.

Note:

The condition for this adapter does not yield a SOAP fault.
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
   <SOAP-ENV:Body>
      <m:RunDBQueryResponse xmlns:m="urn:schemas-iwaysoftware-com:iwse"
        xmlns="urn:schemas-iwaysoftware-com:iwse"
        cid="2A3CB42703EB20203F91951B89F3C5AF">
        <RunDBQueryResult run="1" />
     </m:RunDBQueryResponse>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>