Sunday, November 18, 2007

JDBC Adapter: Type 2 JDBC Driver Deployment

Symptom

You are using the SAP XI 3.0 / PI 7.0 J2EE JDBC Adapter and would like to use a Type 2 Native JDBC Driver to connect to your database.

If you just install the native DLLs / shared objects of your Type 2 JDBC driver into a directory in your operating system's search path, you might receive the following error:

java.sql.SQLException: java.lang. UnsatisfiedLinkError: Native Library \.dll already loaded in another classloader
Other terms

XI30, Adapter Framework, jmsproviderlib, type2, native lib
Reason and Prerequisites

A special deployment mechanism is required to install a Type 2 JDBC driver for the use with the SAP XI 3.0 / PI 7.0 J2EE JDBC Adapter.
Solution

For general information about how to deploy JDBC drivers to be used to connect to a database using the SAP XI 3.0 / PI 7.0 J2EE JDBC Adapter, please refer to the XI configuration guide, chapter "External Drivers for the JDBC and JMS Adapters". Additionally, a document "How To Install and Configure External Drivers for JDBC & JMS" is available at http://service.sap.com/nw-howtoguides -> "Exchange Infrastructure".

When deploying a Type 2 JDBC driver, the following procedure needs to be applied in addition to the steps outlined in the above documents. Any sample file referenced in the instructions below is included in a ZIP file named Note_850116_Examples.zip, which has been attached to this note.

1. Determine, which native DLLs/shared objects are required by your Type 2 JDBC driver. If in doubt, please contact the vendor of your JDBC driver.

2. Create a file named SearchRules.xml built after the attached example file.

3. For each native library, you will need to add a section to the section of the SearchRules.xml XML structure, i.e. there will be multiple elements below the element if you need to reference multiple native libraries.

4. Each section contains additional elements for every platform you want to supply a native library for. Any path element has three attributes: "platform", "jvm-bitlength" and "supported".

a) The "platform" attribute identifies the operating system platform for which you want to supply a native library. For a list of available platform identifiers, please refer to the attached sample SearchRules.xml.

b) The optional attribute "jvm-bitlength" describes the bitlength of the JVM, for which the library can be used. It has to be specified only, if there are different versions for 32 and 64 bit.

c) The "supported" attribute indicates whether you have supplied a native library for a certain platform. If have done so, please set this attribute's value to "true", otherwise to "false".

d) Provide the native library's file name as the value of the XML element.

e) An example path element for a native library named "NativeLibrary.dll" for a 32 bit JVM running on a Microsoft Windows operating system would look like this: NativeLibrary.dll

5. Add the SearchRules.xml file you created to the META-INF directory of the aii_af_jmsproviderlib.sda you already created according to the documentation in section 3.1 of the "How To Install and Configure External Drivers for JDBC & JMS" guide.

6. Add all native library files referenced in your SearchRules.xml file to a directory named "OS_libs" within your aii_af_jmsproviderlib.sda SDA.

The resulting directory and file structure within the SDA should look similar to the one documented in the attached screenshot "SDA Structure.png"

7. Deploy the resulting aii_af_jmsproviderlib.sda using SDM as documented in section 3.2 of the "How To Install and Configure External Drivers for JDBC & JMS" guide.

8. After the deployment is complete, please manually stop and start your J2EE server using the SAP Management Console (under Microsoft Windows) or the stopsap / startsap commands (under Unix). This step is mandatory, the restart triggered by the SDM when deploying the aii_af_jmsproviderlib.sda is not sufficient to deploy the files listed in OS_libs.


XI 3.0 JDBC Adapter: Rollback not performed on DB error


Symptom

You are using the SAP XI 3.0 JDBC Receiver Adapter to connect to a JDBC-compliant relational database. Autocommit is disabled for your receiver channel. Nevertheless, if you send an XML document containing multiple query/DML statements to the adapter and at least one of these statements fails (e.g., due to a constraint violation), the changes made by the other statements contained in your message are not rolled back correctly.
Other terms

Adapter Framework, JDBC, SQL, Rollback, XI
Reason and Prerequisites

The problem appears only with certain JDBC driver implementations. Connections to Microsoft SQL Server 2000 are not affected.
Solution

The problem is corrected with patch 1 for Support Package 11 of the XI ADAPTERFRAMEWORK CORE 3.0 software component.

Import the relevant SAPXIAFC11P_1.SCA archive for SAP Exchange Infrastructure XI 3.0 as described in the NetWeaver 04 Support Package StackGuide.

For Netweaver '04, the archive and the guide are located on the SAP Service Marketplace under the alias "/nw04" -> "Support Package Stacks Information".


XI 3.0 JDBC Receiver: # of Retries on SQL Error w/o Effect


Symptom

You have configured a SAP XI 3.0 J2EE JDBC Adapter receiver channel with the Advanced Mode parameter "Number of Retries of Database Transaction on SQL Error" set to a value greater than zero.

Nevertheless, the database transaction is not repeated immediately after an error has occurred, but the message enters the normal retry cycle instead.
Other terms

XI30, Adapter Framework, no Of Retries
Reason and Prerequisites

Program error.
Solution

The problem is corrected with patch 6 for Support Package 11 and patch 1 for Support Package 12 of the XI ADAPTERFRAMEWORK CORE 3.0 software component.

Import the relevant SAPXIAFC11P_6.SCA / SAPXIAFC12P_1.SCA archive for SAP Exchange Infrastructure XI 3.0 as described in the NetWeaver 04 Support Package Stack Guide.

No comments:

Blog Archive