Skip to Content
avatar image
Former Member

OData error: Cannot load JDBC driver class

Hi all,

I was wondering if there is anyone who could help me with my problem. I am trying to create an OData Service on SMP3 fetching data from SQL Server. I followed Marvin Hoffmann's Blog, however, after the service deployment the data set access is giving me the following error:

<error xmlns="">

<script id="tinyhippos-injected"/>


<message xml:lang="en">

Cannot load JDBC driver class ''



The sqljdbc4.jar library seems to have been deployed correctly from the pickup folder based on the “sqljdbc4.deploy.ok” file in the .state folder. I noticed the bundle has been marked there as “bundle-id=544”.

After inspection of the log I discovered following:

java.lang.ClassNotFoundException: from bundle 547

I tried to undeploy the library by deleting it from the server pickup folder but the file would not disappear from the \work\org.eclipse.virgo.nano.deployer\staging folder and the log contains following error:

org.eclipse.virgo.medic.eventlog.default##anonymous#fs-watcher###Hot un-deploy failed for file 'sqljdbc4.jar'.java.lang.NullPointerException: while trying to invoke the method java.lang.String.equals(java.lang.Object) of a null object returned from org.osgi.framework.Bundle.getSymbolicName()

Any idea what might be causing my issues? Not sure whether it is relevant here but note the different bundle ids. By the way, I checked the jar file and it does contain the referenced class under the path

Here is the log containing deployment first (14:11:06) then triggering the OData service request (14:14:53). -

Many thanks,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Feb 14, 2014 at 02:54 PM

    Hi Frantisek Miksicek PTS,

    even if the deployment with the standard Microsoft JDBC Driver (sqljdbc4.jar) seems to be ok, when you are deploying it directly to SMP3, it won't work... If you have a look into the SMP3 server log you will find some errors.

    Similar to the Oracle case, you have to create an osgi enabled bundle wrapping the SQLServer JDBC driver.

    I wrote it down in a new blog post here:

    Integration Gateway and Microsoft SQL Server as data source



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      You document is indeed super helpful! Just a note, by default, the following checkbox:

      Analyze library contents and add dependencies

      was unchecked. Since it wasn't highlighted via the red box you put in, I overlooked it. It wasn't until I saw the Oracle document that I noticed I had to check it. Just my $0.02. Thanks!

  • Jan 28, 2014 at 07:12 AM

    please confirm,

    While Generate and Deploy Integration Content, whatever service namespace you mentioned, it should match the security profile name you would have created in cockpit.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Jitendra,

      yes, I can confirm the namespace ("sap") I used before deploying it to the server is present in the administration cockpit as security profile.

  • avatar image
    Former Member
    Jul 02, 2014 at 11:50 AM


    I am facing the same problem and I followed the instructions in Integration Gateway and Microsoft SQL Server as data source as well. But still I am getting the error "Cannot load JDBC driver class ''"

    Server logs are showing following information

    "2014 07 02 failed: service = sap/intgwtest2, entity set = CUSTOMER, content type = application/xml;charset=utf-8, message = org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class '' |

    2014 07 02 failed to serve request for URI http://localhost:8080/gateway/odata/sap/intgwtest2/CUSTOMER, message = Cannot load JDBC driver class '' |


    Pls help to resolve this issue.


    Prem Kumar K

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 05, 2014 at 12:33 PM

    Hi All

    Here is a workaround to fix the "Cannot load JDBC driver class ''" issue.

    Follow the below steps.

    Step 1 : Create a SMPRun.bat file with the following steps

      net stop SAPSMP3Service


      taskkill /IM java.exe


      del C:\SAP\MobilePlatform3\Server\work\org.eclipse.virgo.nano.deployer\staging\


      del C:\SAP\MobilePlatform3\Server\pickup\.state\


      net start SAPSMP3Service



    Step 2 : Save the SMPRun.bat file

    Step 3: Right click SMPRun.bat file and Run the same. This will delete the existing jar file from staging folder and "" file from the .state folder

    Step 4: Now test your web service, That will work.

    Thanks & Regards,

    Prem Kumar K

    GoDBTech - SMP Mobility Team

    Add comment
    10|10000 characters needed characters exceeded