Skip to Content
Author's profile photo Jitendra Kansal

command line also helps you in converting JDBC JAR to OSGi JAR to use with Integration Gateway in SMP

Hello SMP Administrators,

 

Do you want to expose database information into OData services? Integration gateway will help you. It will convert the data coming from the database to OData. As SMP is based on OSGi, you can not directly deployed JDBC driver to SMP server, it has to be OSGi enabled jar package.

 

There are two different ways to convert JDBC JAR to OSGi JAR:

 

1.  Eclipse plug-in development

2. Command line approach >> Limited to Oracle, SQL server & DB2 drivers

 

I will explain only 2nd approach:

 

In this example, i want to create an OSGi enabled bundle which includes Microsoft JDBC driver for SQL server.

 

Steps followed:

 

1. Copy driver jar file to a temporary folder (SMP server should be installed on same machine)

2. Navigate to this path: C:\SAP\MobilePlatform3\Server\tools\dbconfig

3. execute below command

 

F:\SAP\MobilePlatform3\Server\tools\dbconfig>create_jdbc_bundle.bat –sqlserver C:\temp\sqljdbc4.jar

 

sqlserver.PNG

 

You will see a new OSGi enabled jar file has been created in the mentioned folder.

 

/wp-content/uploads/2015/04/sql2_693761.png

 

4. Copy this new jar file and paste in PICKUP folder and make sure that you see an “OK” message under .state folder

 

pickup.PNG

 

As mentioned already,  there are only 3 supported drivers: SQLServer, Oracle & DB2.

 

-sqlserver

-oracle

-db2

 

So for other databases like SAP HANA, SAP ASE, SAP SQL Anywhere, HSQLDB, MYSQL you can not use above command line method to generate OSGi enabled jar file. You have to go with Eclipse plug-in development

 

Inputs taken from SAP Note 2146914 and big thanks to Andreas Wegmann for providing extra information.

CC: SAP for Mobile

Regards,

JK

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.