Problems with sun's jdbc:odbc bridge under Tomcat 4.0

I keep getting this error when I try to access through jdbc:odbc sun's drive:
java.sql.Exception: [Microsoft][Administrador de controladores ODBC] No se encuentra el nomb
re del origen de datos y no se especific� ning�n controlador predeterminado
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:2488)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:3
17)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:160)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
Translating the local spanish message, should be something like: "Can't find data source and no default driver defined."
I don't get this error if i access through the same driver but not on web server Tomcat 4.0.1. And I don't get this error even under Tomcat with other jdbc drivers (mysql for example).
Someone knows what is happening here?
I would apreciate some help.
Thank you.

If you're running on Windows, you need to create an ODBC datasource to connect to.
To accomplish this, you need to go to Start >>> Control Panel >> Administrative Tools >> Data Sources (ODBC),
2. On the User DSN tab, click add
3. give it a name, this is the name you will use in the connection string. jdbc:odbc:<name>
4.Click Select, then find your mdb file, or other database file.
5. click Ok.

Similar Messages

  • Problem: connect DB with Applet by JDBC-ODBC bridge

    Dear all,
    When I connect local MS SQL server by "sun.jdbc.odbc.JdbcOdbcDriver" as below, it works well! However, when I put the similar code under Java Applet program, it cannot run by showing error:
    java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
    at java.security.AccessController.checkPermission(AccessController.java:399)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1501)
    at sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:169)
    I think Java Applet has some security policy when I try to use applet to connect(read/write) DB. How can I solve it so that I can browse my applet under IE.
    Thanks a lot!
    Here is my worked code in Java program but not in Applet:
    import java.sql.*;
    public class TestJDBC1 {
    public static void main(String args[]) throws Exception {
    String userid = "";
    String password = "";
    // Register the driver with DriverManager
    new sun.jdbc.odbc.JdbcOdbcDriver();
    // Get a connection
    Connection conn = DriverManager.getConnection("jdbc:odbc:rdr",
    userid, password);
    // Create a statement for executing SQL
    Statement stmt = conn.createStatement();
    // Execute a query / SELECT statement
    ResultSet rset = stmt.executeQuery("SELECT * FROM PlatformNode");
    ResultSetMetaData rsmd = rset.getMetaData();
    // Find out how many columns were returned by the query
    int count = rsmd.getColumnCount();
    // Loop until all rows have been processed
    while (rset.next()) {
    // Loop until all columns in current row have been processed
    for (int i = 1; i <= count; i++) {
    // Print out the current value
    System.out.print(rset.getObject(i));
    // Put a comma between each value
    if (i < count) {
    System.out.println(",");
    // Start the next row's values on a new line
    System.out.println("");
    // Close the database objects
    rset.close();
    stmt.close();
    conn.close();

    Hi,
    Applets by default are restricted from accessing a lot of things.to enable applest from accessing database and other thngs u need to edit the policy file
    Try this.
    go to the jre/bin directory open the policytool.exe file
    and add permission(in ur case RuntimePermission to access class in package sun.jdbc.odbc) and save the file.
    this will enable applets from accessing the databse.
    Hope that helps
    Note:
    policytool.exe must be used to open the java.policy file present in /jre/lib/security directory and then add the permissions
    regards,
    Partha

  • Problems: connect DB with Applet by JDBC-ODBC bridge

    Dear all,
    When I connect local MS SQL server by "sun.jdbc.odbc.JdbcOdbcDriver" as below, it works well! However, when I put the similar code under Java Applet program, it cannot run by showing error:
    java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.sun.jdbc.odbc)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
    at java.security.AccessController.checkPermission(AccessController.java:399)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1501)
    at sun.applet.AppletSecurity.checkPackageAccess(AppletSecurity.java:169)
    I think Java Applet has some security policy when I try to use applet to connect(read/write) DB. How can I solve it so that I can browse my applet under IE.
    Thanks a lot!
    Here is my worked code in Java program but not in Applet:
    import java.sql.*;
    public class TestJDBC1 {
    public static void main(String args[]) throws Exception {
    String userid = "";
    String password = "";
    // Register the driver with DriverManager
    new sun.jdbc.odbc.JdbcOdbcDriver();
    // Get a connection
    Connection conn = DriverManager.getConnection("jdbc:odbc:rdr",
    userid, password);
    // Create a statement for executing SQL
    Statement stmt = conn.createStatement();
    // Execute a query / SELECT statement
    ResultSet rset = stmt.executeQuery("SELECT * FROM PlatformNode");
    ResultSetMetaData rsmd = rset.getMetaData();
    // Find out how many columns were returned by the query
    int count = rsmd.getColumnCount();
    // Loop until all rows have been processed
    while (rset.next()) {
    // Loop until all columns in current row have been processed
    for (int i = 1; i <= count; i++) {
    // Print out the current value
    System.out.print(rset.getObject(i));
    // Put a comma between each value
    if (i < count) {
    System.out.println(",");
    // Start the next row's values on a new line
    System.out.println("");
    // Close the database objects
    rset.close();
    stmt.close();
    conn.close();

    ur question has just been answered under the java programming section

  • Question re Sun's jdbc-odbc bridge

    Hi,
    Can anybody tell me whether this bridge (in the latest SE, 1.4.0) does things like updatable recordsets... i.e. jdbc 2.0 functionality? I keep getting an ArrayOutOfBounds exceptoin...
    Thanks,
    Mike

    ArrayOutOfBounds exceptoin... Which suggests that either there is a bug in the driver or in the way you are using it. And that will have nothing to do with whether it supports a particular feature or not.

  • Is Sun's JDBC-ODBC Bridge on Access stable?

    I need some opinion here.
    Thanks
    Setya

    Thanks,
    I plan to build enterprise app using EJB with Oracle or MSSQLServer as the back end. Since our table structure does not always satisfy the table structure required for reporting (which sometimes is very complex), we plan to pull the data from the EJB first and then put it in the MSAccess temporary tables in stand alone client app (which satisfy the structure required for reporting) and from here we present the reports to users.
    Any suggestion regarding this plan would be greatly appreciated.
    Thanks
    Setya

  • Setting up and checking JDBC-ODBC bridge

    I'm supporting an application that does not use general JDBC drivers but relies on the JDBC-ODBC bridge. Can't currently get a connection to my 10.2 database, and it looks like the problem is that the JDBC-ODBC bridge isn't set up. Any hints on how to do this?
    (I originally posted this on the database forum but was told to try here. Odd since my app is HTML and XHTML, and was not developed using JDev).
    Regards
    Simon

    Why do you use the JDBC-ODBC bridge; if the database is Oracle 10? You should connect from Java to Oracle with the API driver or even better with the Oracle JDBC driver.
    If the client is not Java there should be no reason the use the bridge.
    The Sun JDBC-ODBC bridge is not intented for production.
    You can find configuration information in this document:
    http://java.sun.com/j2se/1.3/docs/guide/jdbc/getstart/bridge.doc.html
    Regards Flemming

  • JDBC-ODBC BRIDGE gives classcast exception

    I want to use your XMLSQL Utility to exchange data between XML
    and database( Access database ) through sun's jdbc-odbc bridge,
    but got the following run time error:
    oracle.xml.sql.OracleXMLSQLException:
    java.lang.ClassCastException:

    While the SQL-to-XML functionality of XSU works with any JDBC driver, the 1.2.1 (current release) of XSU has the restriction that the insert/update/delete functionality only works with the Oracle JDBC driver.
    We are testing the next version of XSU in house that fixes this limitation to allow it to support full functionality against any JDBC driver. We expect this release to be posted by next Friday (Oct 20th).

  • Oracle RDB Driver fails with JDBC/ODBC Bridge

    Has anyone experienced problems using the latest Oracle RDB
    Driver (3.0.2.0) with the JDBC/ODBC Bridge.
    We have been using the Oracle ODBC Driver for RDB (2.10.17)
    successfully on NT, but it is not supported on W2K. The new
    drivers work fine for Access etc., but fail with the bridge.
    Specifically, you can step thru a result set, but getObject()
    returns null for all fields.
    Any suggestions?
    Joe

    This forum is for general suggestions and feedback about the OTN
    site. For technical question about an Oracle product, you can
    select the appropriate discussion forum in our 'Discussions'
    section at: http://forums.oracle.com/forums/homepage.jsp
    Best regards, OTN Team

  • JDBC-ODBC Bridge with iAS on UNIX

    Can the Sun JDBC-ODBC bridge be used with iAS on UNIX (Solaris)? If possible, can someone share the basic steps. For example, what parameters to enter when configuring the bridge as a datasource and also how to pass needed environment variables (LD_LIBRARY_PATH has to have the path of the ODBC driver manager).
    I need to connect to a ODBC driver on UNIX, no JDBC driver is available for this data source, nor is a Windows solution acceptable.
    I have iAS 6.0 SP3 with iWS 4.1 SP9 on Solaris 8.

    Hi,
    I'm not sure if there is a free download available, but you can find some help by visiting the following URL http://www.dbmaker.com/Header/Frame_Forum.htm
    For the exact steps, I think this would be more helpful http://www.dbmaker.com/reference/technotes/jdbc.html
    Please let me know if this helps.
    Regards
    Raj

  • JDBC-ODBC Bridge with iAS on Solaris

    Is there any way to use the Sun JDBC-ODBC bridge with the iPlanet
    Application Server running on UNIX (Solaris)? If it is possible, can
    someone who has done it share the basic steps. For example, I cannot
    figure out what parameters to enter when configuring the bridge as a
    datasource and also how to pass certain environment variables (eg the
    LD_LIBRARY_PATH which points to the ODBC driver manager).
    It seems that on Windows iAS has ODBC as a Type 2 JDBC data source (at
    least the manuals have screenshots with ODBC nodes). However I need to
    have iAS running on Solaris (and connecting to a proprietary ODBC
    driver; no JDBC driver is available for this data source).
    I have iAS 6.0 SP3 with iWS 4.1 SP9 on Solaris 8.
    TIA!
    George
    P.S. Apologies if this is a frequently asked question, but I could not
    find archives of the iplanet.ias.* groups. I wish Google would carry
    them...

    Hi,
    I'm not sure if there is a free download available, but you can find some help by visiting the following URL http://www.dbmaker.com/Header/Frame_Forum.htm
    For the exact steps, I think this would be more helpful http://www.dbmaker.com/reference/technotes/jdbc.html
    Please let me know if this helps.
    Regards
    Raj

  • How do I get the SUN jdbc-odbc bridge to work?

    Hi,
    I'm trying to us the SUN 1.2 jdbc-odbc bridge on Oracle 8.
    I have installed the ODBC driver from www.intersolv.com
    (Merant) and have successfully tested it.
    I have SUN 1.2 installed and verified that
    the sun JdbdOdbcDriver is in my CLASSPATH.
    My driver path is:
    sun.jdbc.odbc.JdbcOdbcDriver
    My url is
    jdbc:odbc:Oracle8
    my odbc.ini is correct, and my ODBCINI is set.
    when I try to connect I get "No suitable driver".
    The SUN documentation indicates this error means
    my shared libraries aren't correct, but I have
    verified my ODBC setup with a odbc demo app.
    Any suggestions on how to form my url?
    Has anyone used the bridge on Solaris?
    null

    The display is just too dim.  I tried the brightness and backlight settings and these do not work.  This has been like this since I bought it.  Never bothered to deal with it before and just made do with reading a very dim menu.

  • Problem using Jdbc-Odbc Bridge

    Hi,
    I am using Java 2 SDK and I am trying to access MS Access database on my machine using Jdbc-Odbc bridge. I have set up the DSN in ODBC. But I get the following error when I run my program -
    'No Suitable Driver'
    Here's my code snippet-
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    String dsn = "jdbc:odbc:DriverInfoDB";
    Connection con = DriverManager.getConnection(dsn,"","");
    con.setAutoCommit(false);
    Statement stmt;
    String query = null; // SQL select string
    ResultSet rs; // SQL query results
    stmt = con.createStatement();
    .....etc etc...
    Where is the error in this code??
    Help Needed!!
    Thanks
    Vivek.

    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection con = DriverManager.getConnection(dsn,"guest","guest");
    OR DriverManager.getConnection(dsn);
    System.out.println("Conection's opened");
    catch(ClassNotFoundException cnfe)
    System.err.println(cnfe);
    catch(SQLException sqle)
    System.err.println(sqle);
    try that code and double check you DSN Name . it's a good practice to greate a system DSN.
    i hope that helps.
    FEEL FREE TO ASK. WON'T BITE U
    ABDUL

  • Access MS-Access using JDBC ODBC bridge from Sun AMD64

    Hi,
    We are trying to configure a communication channel using the JDBC adapter. We are setting the driver to the JDBC-ODBC bridge driver and trying to access an MS Acess database from the PI server(sun amd64). When we set the driver to the JDBC-ODBC bridge, the J2EE engine tries to restart immediately and does not start. The std_server.out contains the following error:
    Service com.sap.aii.adapter.jdbc.svc started. (234 ms).
    1016 sun.io.CharToByteASCII::convert (370 bytes)
    1017 ! com.sap.sql.jdbc.common.CommonPreparedStatement::close (119
    bytes)
    ld.so.1: jlaunch: fatal: relocation error:
    file /usr/j2se/jre/lib/amd64/libJdbcO
    dbc.so: symbol SQLAllocEnv: referenced symbol not found
    Has anybody been able to configure the JDBC-ODBC bridge driver for MS Access? Also, has anybody used the database vendor(MS) drivers? If so, where are they available.
    Thanks in advance
    Vipin

    Hi
    Please go through below links that would be helpful to you
    SAP Network Blog: 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
    /people/sap.user72/blog/2005/06/01/file-to-jdbc-adapter-using-sap-xi-30
    If required Try the following driver. I havent used it but its available.
    HXTT Access is such a type 4 driver at http://www.hxtt.net/en/software/access/document.html .
    Thanks
    Swarup

  • JDBC-ODBC Bridge is too slow

    Why the Sun JDBC-ODBC Bridge is so slow? When i use the ms bridge it is as faster than a JDBC connection, but i found a bug on the ms bridge that it returns NULL when the value is a "" (blank)
    Anyone how to make sun bridge has a acceptable perfomance?
    I am using MySQL 3.23 and tested on Sun JDKs 1.1.8, 1.2, 1.4
    My comp is a K6-2 400 with 128 RAM
    Thanks

    isjm said
       I've found using a pure JDBC driver (ashna's JTurbo) to be
       roughly 40% faster than the bridge after doing some
       (admitidly) small amount of bench testing. I also found
       it resolved a number of issues (bugs??) with the bridge
       (e.g. no longer throws an occasional fractional truncation
       exception when inserting timestamps). As for the bridge
       being used only for test purposes check out this URL:
       http://java.sun.com/J2se/1.3.0/docs/guide/jdbc/getstart/bridge.doc.html
       They recommend using the bridge only for experimental use or when a
       pure driver is not available. I guess you could consider this as test purposes only.There is no such thing as a 'pure driver' (or 'pure jdbc driver' from a different post.)
    The doc you site suggests a 'pure java' driver - a type 4. I question that. I know there are number of things that one can do in ODBC and in OCI which speed up requests. And obviously one can't do those in java.
    Performance problems are caused by the following:
    -Requirements-most impact
    -Design
    -Environment (cpu,network,thread, etc bottlenecks)
    -Language/intefaces - least impact.
    Changing requirements/design can easily produce impacts of orders of magnitude (by removing one requirement I reduce a 4-8 hour report to less than 30 seconds.) So how much impact did the 40% you saw impact your total application? Did you profile your application/system under load using a automated tool to measure the speed?
    I would suspect also that the suggestion that the driver is 'experimental use or when no other alternative is available' might be slightly biased as the driver was produced by Merant who is actively selling drivers too. One would suppose that they were not allowed to deliberately introduce bugs into the code. However, they might have insisted that some language be introduced to suggest that someone should buy the product.
    anarquia said
       But i can't believe i've tested today again and the sun
       bridge is working as fast the ms bridge! i can't
       understand, yesterday i've tested a million times
       and it was about 30 times slower, i'll try to find
       what's happened yesterdayDid you use a closed network? Did you use isolated servers?

  • About JDBC ODBC bridge

    I'm developing an application using EJBs in a development environment with Sun Application Server, Sql Server and NetBeans IDE 4.1. I'm using entity beans and session beans in my application. But, when I try to connect to database using a Servlet or JSP with the session beans, the connection with database could not be established. This is my problem!!!

    First, you probably shouldn't use the JDBC/ODBC bridge. Any serious and many non-serious databases have real drivers. Is there anything but Access that really needs the bridge...? Use the jTds driver (google for it). Or just last week Microsoft beta'ed a new JDBC driver for MSSQL; no idea how good it is. Some smalltalk on that: http://www.theserverside.com/news/thread.tss?thread_id=35063
    Second, what error do you get?
    If it is "connection refused", here is my standard first aid check list:
    - Check host name in connect string.
    - Check port number in connect string.
    - Try numeric IP address of server host in connect string, in case name server is hosed.
    - Are there any firewalls between client and server blocking the port.
    - Check that the db server is running.
    - Check that the db server is listening to the port. On the server, try: "telnet localhost the-port-number". Or "netstat -an", there should be a listening entry for the port.
    - Try "telnet serverhost the-port-number" from the client, to see if firewalls are blocking it.
    - If "telnet" fails: try it with the numeric ip address.
    - If "telnet" fails: does it fail immediately or after an obvious timeout? How long is the timeout?
    - Does the server respond to "ping serverhost" or "telnet serverhost" or "ssh serverhost"?

Maybe you are looking for