Skip to Content
avatar image
Former Member

JDBC with MS Access: DB connection error

Hi Dear Friends!

I'm implementing scenario File->PI->(JBDC) MS Access.

I follow the links:

1. Anirban Ghatak. FILE to JDBC Adapter using SAP XI 3.0

/people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30

2. Sameer Shadab. Connecting to MS Access using receiver JDBC Adapter (Without DSN)

/people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn

3. jdbc-driver-for-ms-access

But I have such error in Communication Channel Monitoring:

Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver 
(*.mdb)};DBQ=../../../work/PIUse/PiPattern1/TestDB.mdb' using the JDBC driver 
'sun.jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot 
establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver 
(*.mdb)};DBQ=../../../work/PIUse/PiPattern1/TestDB.mdb': java.lang.NullPointerException'

In last link they say it isn't necessary to install and configure External Drivers for JDBC. (And I really have not done it yet.) My PI work on Linux platform. What I need to set or detect?

With the best regards,

Natalia Maslova.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 21, 2007 at 03:09 PM

    Hi !

    Some ideas:

    • Try a DBQ value that is absolute, I mean no relative to some path like DBQ=../../, try something like "DBQ=/myData/test.mdb"

    • Try to add "DriverID=22; READONLY=true" to your "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=.... " definition like

    "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=.... ;DriverID=22; READONLY=true"

    In some forums outside SDN, I've found:

    "The problem is that there is no MS Access ODBC driver that runs under linux. And this still has nothing to do with Java nor with JDBC. If you can find an MS Access ODBC driver (which has nothing to do with java) that runs on linux then you would be set. Microsoft does not make one. There might be other vendors that do but I doubt it."

    http://www.unixodbc.org/

    I don't really know if it is true.

    Regards,

    Matias.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 21, 2007 at 01:29 PM

    Hi Dear Friends!

    I have looked through Forum touched my theme

    (1. File - XI - MS Access JDBC Adpater file-xi-ms-access-jdbc-adpater

    2. JDBC Adapter

    jdbc-adapter

    etc.)

    I deployed driver Access_JDBC20.jar (from www.hxtt.net) for MS Access according to links:

    1. Providing External Drivers for the JDBC and JMS Adapters

    http://help.sap.com/saphelp_nw04s/helpdata/en/14/39084136b5f423e10000000a155106/frameset.htm

    2. How to Install and Configure External Drivers for the JDBC & JMS Adapters. Version 3.01 - March 2006

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf4b1055-0d01-0010-32a3-b3848d77a6b9

    At first I had the error:

    8/21/07 3:15:18 PM

    Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=/usr/sap/DX7/DWEBMGS01/work/PIUse/PiPattern1/TestDB.mdb' using the JDBC driver 'jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: 
    Cannot establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver 
    (*.mdb)};DBQ=/usr/sap/DX7/DWEBMGS01/work/PIUse/PiPattern1/TestDB.mdb': ClassNotFoundException: jdbc.odbc.JdbcOdbcDriver'

    but after that I have the previous error:

    8/21/07 3:52:10 PM
    Error during database connection to the database URL 'jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=/usr/sap/DX7/DVEBMGS01/work/PIUse/PiPattern1/TestDB.mdb' using the JDBC driver 'jdbc.odbc.JdbcOdbcDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: 
    Cannot establish connection to URL 'jdbc:odbc:Driver={Microsoft Access Driver 
    (*.mdb)};DBQ=/usr/sap/DX7/DVEBMGS01/work/PIUse/PiPattern1/TestDB.mdb': 
    java.lang.NullPointerException'

    And really when I look through content of Access_JDBC20.jar I don't see the class file with name jdbc.odbc.JdbcOdbcDriver.

    Have you any ideas?

    Thank you in advance.

    Natalia Maslova.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Dear Friends!

      Thanks a lot for your ideas!

      Yes! I implement it! I know how to organize connect with MS Access by JDBC Receiver for XI on Linux platform. (Solution is represented in my posts in this thread.)

      My last error was in name of database table.

      And now I will try JDBC Sender!

      With the best regards,

      Natalia Maslova.

  • avatar image
    Former Member
    Aug 21, 2007 at 02:48 PM

    Hi Natalia !!

    I haven't tried yet that type of scenario, but after reading some posts I understand that this driver is included. Try this thread and see if there is any clue about configuration parameters..

    File-XI-MS Access

    Regards,

    Matias.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2007 at 03:33 PM

    Hi

    connecting to MS access (Without DSN) Receiver JDBC scenario - /people/sameer.shadab/blog/2005/10/24/connecting-to-ms-access-using-receiver-jdbc-adapter-without-dsn

    Also see below links

    /people/siva.maranani/blog/2005/09/16/xi-how-to-on-jdbc-receiver-response

    http://help.sap.com/saphelp_nw2004s/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/content.htm

    /people/yining.mao/blog/2006/09/13/tips-and-tutorial-for-sender-jdbc-adapter

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 28, 2007 at 03:37 AM

    Hi Natalia,

    I am facing a similar error as you posted in your last message.

    Please guide me how did you solve this .

    Thanks,

    Puneet

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Experts,

      I have a similar requirement.Did you deployed Licensed MS Access jar files downloaded from http://www.hxtt.net/

      Does SAP standard recommends this? If yes share me those details.

      Please let me know if there is any other jar files that can be used.