Problem in building JDBC ODBC connection with my stand alone Project.

Hello Everyone!
I gave the following command in order to create JAR file:
C:\app>jar cvfm MyJar.jar Manifest.txt .
and the Manifest file contains the code: Main - Class: Login
My Manifest File and the .class codes and the JAR file which is created successfully by the above command are in the same folder "app" and then I run the project both at command prompt by the command : C:\app>java -jar MyJar.jar
and by double clicking the JAR file. My project is running successfully but, I am using JDBC - ODBC Driver in my project and I want to let this project run in any other computer system. So, any other user who is unknown to the Driver used and Database used in my project can't be able to run my project if the specified driver is not installed in his machine and also there is a bridge of ODBC Data Source (from control panel-- Administrative Tools-- Data Sources(ODBC) )from which Driver is selected and the Database is specified.
In order to test my application, I had removed the data source name from the Control Panel's Data Sources (ODBC) properties' window. Then I run my project then the following error msg is shown in command prompt:
C:\app>java -jar MyJar.jar
java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3028)
at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:3
23)
at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
at java.sql.DriverManager.getConnection(DriverManager.java:512)
at java.sql.DriverManager.getConnection(DriverManager.java:193)
at Login.<init>(Login.java:37)
at Login.main(Login.java:364)
Error Trace in getConnection() : [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
So, I have a doubt at this point that how a user is able to configure this bridge in order to run my application who is unknown to my project's back-hand? As JRE is essential to run my project so, I have decided to give setup of JRE with my project's CD, may the JDBC - ODBC Driver providing to the user with my application setup solve this problem ?
Please help me to solve my problem.

M.V.Asolkar wrote:
Please please help me.Lets presume hypothetically that the jTDS driver won't work with 2000. It might or might not.
However the fact remains that your ODBC driver is not working.
So the first step is to stop trying to run your full application. Instead you create a very simple console application that does nothing but connect to the database.
Problems that usually occur from that would be.
1. The connection string is not correct for MS SQL Server.
2. The connection information for the database is not correct
3. The database (nothing to do with java) is not configured to accept connections.

Similar Messages

  • JDBC-ODBC connectivity from JSP page

    hi
    i am trying to connect a jsp page with database using jdbc-odbc driver. i have created a dsn with the name 'test' that connects to a database 'test' in SQL server. the following lines has been added to the web.xml file placed in the \WEB-INF folder
    <context-param>
    <param-name>
    javax.servlet.jsp.jstl.sql.dataSource
    </param-name>
    <param-value>
    jdbc:odbc:text, sun.jdbc.odbc.JdbcOdbcDriver
    </context-param>
    i have also placed the rt.jar file in the \WEB-INF\lib folder. but, when i run the jsp page and ty to make any database interaction, an expection occurs
    java.lang.ClassNotFoundException : sun.jdbc.odbc.JdbcOdbcDriver
    please help

    I think you need to download the JDBC/ODBC driver jar file into your project. For example, if you need a JDBC driver for the Oracle database, you search google for 'oracle jdbc driver'. Its driver is something like classes14.jar. I suggest you create and test your database connection pool in a servlet so you will have an easier time debugging any issues in getting it to work.
    Also, as the previous post points out, JSP is for displaying data and submitting user input back to the servlet. Put all your business logic in the servlet, put any data you get from the database in request scope by the servlet, dispatch to the JSP page so it can be displayed. This is a crude example. For a better design read up on MVC (Model View Controller) design.

  • 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

  • JDBC Thin Connections with SSL and client certificates

    Hi ,
    we are going have a look at JDBC Thin Connections with SSL and client certificates.
    I have two questions:
    1. Is it possible to use SSL connections from JDBC Thin Driver and which release of the driver introduced it
    2. Is it possible to use client certificates with JDBC Thin Driver and which release of the driver introduced it
    Thanks for your help
    regards
    Markus Reichert

    I could not reproduce the error after appending the SSL certificate to the certdb.txt file available under $Jinitiator_Home/lib/security folder.
    Steps to add the SSL Certificate:
    1. Run the form with the https mode in the IE Browser.
    2. Security Alert is raised.
    3. Click on the View Certificate button.
    4. In the Certificate Window, click on the Details tab.
    5. Click on the Copy to File button to copy the certificate.
    6. Copy the certificate and append to the certdb.txt file.

  • Building an ODBC connection to Outlook Business Contact Manager database.

    I am trying to build an ODBC connection to our Outlook Business Contact Manager.
    It is SQLEXPRESS.  Do I use the More Data Connections Outlook option?  If so, I tried and it prompts me to install something, which I do not believe I have?  Any suggestions?
    Thank you,
    Carol

    If you are using ODBC then you need to create a DSN in the ODBC administrator first. Then in Crystal select ODBC (RDO) under create new connection, this will list all of your ODBC DSNs.

  • Database connection pool to stand alone java class

    Hi all,
    I would like to know the best way to use a database connection pool with a stand alone java class.
    In my web applications I usually use JDBC Data Source version 5 to connect to my database. In this case, I connect to an Oracle database. But in this scene, I've a WebSphere Application Server to provide this connection pool. But for stand alone applications, I don't know how to do because I don't have a Application server to run on.
    Can enyone help me with this beginner question?
    Best regards.

    I tried to find the pool class I created but it must be on another CD. Anyway, you can easily create a number of connections and place them on a stack (your own or java's). When you need one, pop it off. When you are finished, push it back.
    Good luck.

  • Problem with JDBC ODBC connectivity

    I am trying to connect to MS access database with jsp page. This is sample from my js page :
    String SUN_DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
    Class.forName(SUN_DRIVER);
    String aDataSourceName = "puneet";
    String url = "jdbc:odbc:" + aDataSourceName;
    Connection con;
    con = DriverManager.getConnection("jdbc:odbc:puneet","","");
    The last line gives me the follwoing error :
    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    puneet is name of my datasource and it points to my .mbd file.
    I dont have anyusername or passwords for this daatsource.
    I am using Tomcat/4.1.18-LE and jdk1.4
    I have also added rt.jar in the classpath
    pls help
    pg4

    Hi pg4,
    May be your dsn is not pointing to .mdb file. Check it by putting your mdb file right where your code is and then user following syntax which is called dsn-less connection. It helps you to connect to the target mdb file with out any need of dsn.
    String url = "jdbc:odbc:;Driver={Microsoft Access Driver (*.mdb)}; DBQ=yourDBFile.mdb";
    regards,
    Humayun

  • JDBC-ODBC connectivity problem

    hi ,i have a j2se 1.4.2 version installed on windows 2000 professional.i have j2me wireless toolkit 2.0,Oracle 8i(8.1.5),tomcat 4.0 running on system.I have tried to connect to the database in Oracle through JDBC-ODBC bridge but it becomes non-responsive.The same has been working well with Oracle 9i versions and also in Oracle 8i when ODBC driver is selected as Microsoft ODBC drivers for Oracle but not with Oracle drivers for Oracle.Can anybody tell me the compatibilities of JDBC-ODBC bridge versions,oracle and ODBC drivers? And can u tell me how to connect to oracle through a pure Java JDBC drivers on a standalone system?

    well,i think nobody has interest in my question.I have asked two questions.
    1)Can anybody tell me the compatibilities of JDBC-ODBC bridge versions,oracle and ODBC drivers?
    2)And can u tell me how to connect to oracle through a pure Java JDBC drivers (type 4 drivers) on a standalone system?
    But u advise me not to use JDBC-ODBC bridge without studying the other part.

  • Jdbc-odbc connectivity problem in[b] wsad5.1.2[/b]

    while i Try to access the msaccess database using sun.jdbc.odbc.JdbcOdbcDriver,the server is giving the error class not found....sun.jdbc.odbc.JdbcOdbcDriver......
    I have already rt.jar containing this class in my jre...
    The same thing i tried in wsad5.0 and it is working abs fine....
    If anyone has got a time to solve tis query plz help me out...
    Its urgent......

    well,i think nobody has interest in my question.I have asked two questions.
    1)Can anybody tell me the compatibilities of JDBC-ODBC bridge versions,oracle and ODBC drivers?
    2)And can u tell me how to connect to oracle through a pure Java JDBC drivers (type 4 drivers) on a standalone system?
    But u advise me not to use JDBC-ODBC bridge without studying the other part.

  • Jdbc-odbc bridge with Connection pool datasource

    I have created a little j2ee app in which an enterprise bean accesses a ms sql server table by creating a JNDI datasource using sun.jdbc.odbc.JdbcOdbcDriver. I can successfully deploy it and run it on the jsdkee 1.3 J2EE server. However, when I attempt to deploy it on WebSphere 4.0 AES, the app fails attempting to make the database connection. The error log states: "Unable to connect to database: the class (sun.jdbc.odbc.JdbcOdbcDriver) does not implement javax.sql.ConnectionPoolDatasource or javax.sql.XADatasource". Which, of course, is probably true, but is there a WebSphere workaround? There is nothing remotely related mentioned at the IBM WebSphere site.

    Thx. So far, I have not found a readily accessible free alternative driver that supports connection pooling. The drivers list notes several corporate offerings that do; freetds may work but I don't know yet. If it does, I will update this discussion.

  • Odbc-connection with ms-access

    hello,
    this is my problem
    if I migrate an MS Access db to Oracle with the OMW than is the ODBC connection, from MS Access to Oracle, perfect.
    Bud I have used the migration script witch is generated by OMW and by made a connection from MS Access to Oracle in some tables the ODBC connection Failed.
    What is the problem????
    Thanks
    Andre

    You don't need MS Access installed to use the JDBC-ODBC driver.

  • Help me about jdbc odbc connection

    Can somebody help me ? I have no idea of this error .
    3x
    the error code is :
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x7C941010
    Function=RtlEnterCriticalSection+0xB
    Library=C:\WINDOWS\system32\ntdll.dll
    Current Java thread:
         at sun.jdbc.odbc.JdbcOdbc.allocConnect(Native Method)
         at sun.jdbc.odbc.JdbcOdbc.SQLAllocConnect(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcDriver.allocConnection(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcConnection.initialize(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcDriver.connect(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
         at java.sql.DriverManager.getConnection(Unknown Source)
    Dynamic libraries:
    0x00400000 - 0x0040B000      C:\WINDOWS\system32\java.exe
    0x7C940000 - 0x7C9DD000      C:\WINDOWS\system32\ntdll.dll
    0x7C800000 - 0x7C931000      C:\WINDOWS\system32\kernel32.dll
    0x77D80000 - 0x77E29000      C:\WINDOWS\system32\ADVAPI32.dll
    0x77E30000 - 0x77EC1000      C:\WINDOWS\system32\RPCRT4.dll
    0x77BC0000 - 0x77C18000      C:\WINDOWS\system32\MSVCRT.dll
    0x08000000 - 0x08139000      C:\Program Files\Java\j2re1.4.2_05\bin\client\jvm.dll
    0x77CF0000 - 0x77D7F000      C:\WINDOWS\system32\USER32.dll
    0x77ED0000 - 0x77F16000      C:\WINDOWS\system32\GDI32.dll
    0x76AF0000 - 0x76B1B000      C:\WINDOWS\system32\WINMM.dll
    0x762E0000 - 0x762FD000      C:\WINDOWS\system32\IMM32.DLL
    0x60740000 - 0x60749000      C:\WINDOWS\system32\LPK.DLL
    0x73F80000 - 0x73FEB000      C:\WINDOWS\system32\USP10.dll
    0x10000000 - 0x10007000      C:\Program Files\Java\j2re1.4.2_05\bin\hpi.dll
    0x008A0000 - 0x008AE000      C:\Program Files\Java\j2re1.4.2_05\bin\verify.dll
    0x008B0000 - 0x008C9000      C:\Program Files\Java\j2re1.4.2_05\bin\java.dll
    0x008D0000 - 0x008DD000      C:\Program Files\Java\j2re1.4.2_05\bin\zip.dll
    0x02EC0000 - 0x02ECC000      C:\Program Files\Java\j2re1.4.2_05\bin\JdbcOdbc.dll
    0x73520000 - 0x7355D000      C:\WINDOWS\system32\ODBC32.dll
    0x5AB60000 - 0x5ABF7000      C:\WINDOWS\system32\COMCTL32.dll
    0x77380000 - 0x77B7D000      C:\WINDOWS\system32\SHELL32.dll
    0x77F20000 - 0x77F96000      C:\WINDOWS\system32\SHLWAPI.dll
    0x76300000 - 0x76348000      C:\WINDOWS\system32\comdlg32.dll
    0x77160000 - 0x77262000      C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    0x20000000 - 0x20017000      C:\WINDOWS\system32\odbcint.dll
    0x76970000 - 0x76AAC000      C:\WINDOWS\system32\ole32.dll
    0x4D310000 - 0x4D32B000      C:\WINDOWS\system32\odbccp32.dll
    0x77BB0000 - 0x77BB8000      C:\WINDOWS\system32\VERSION.dll
    0x77FA0000 - 0x77FB1000      C:\WINDOWS\system32\Secur32.dll
    0x770D0000 - 0x7715C000      C:\WINDOWS\system32\OLEAUT32.dll
    0x76F80000 - 0x76FFF000      C:\WINDOWS\system32\CLBCATQ.DLL
    0x77000000 - 0x770AB000      C:\WINDOWS\system32\COMRes.dll
    0x0F9A0000 - 0x0F9AB000      C:\WINDOWS\system32\VBAJET32.DLL
    0x58730000 - 0x58768000      C:\WINDOWS\system32\uxtheme.dll
    0x02EE0000 - 0x02EEF000      C:\Program Files\Java\j2re1.4.2_05\bin\net.dll
    0x719E0000 - 0x719F7000      C:\WINDOWS\system32\WS2_32.dll
    0x719D0000 - 0x719D8000      C:\WINDOWS\system32\WS2HELP.dll
    0x43000000 - 0x43005000      C:\Program Files\Google\Google Desktop Search\GoogleDesktopNetwork1.dll
    0x71980000 - 0x719BF000      C:\WINDOWS\system32\mswsock.dll
    0x607C0000 - 0x60816000      C:\WINDOWS\system32\hnetcfg.dll
    0x719C0000 - 0x719C8000      C:\WINDOWS\System32\wshtcpip.dll
    0x76C40000 - 0x76C68000      C:\WINDOWS\system32\imagehlp.dll
    0x67930000 - 0x679D1000      C:\WINDOWS\system32\DBGHELP.dll
    0x76BA0000 - 0x76BAB000      C:\WINDOWS\system32\PSAPI.DLL
    Heap at VM Abort:
    Heap
    def new generation total 576K, used 77K [0x10010000, 0x100b0000, 0x104f0000)
    eden space 512K, 7% used [0x10010000, 0x10019220, 0x10090000)
    from space 64K, 64% used [0x100a0000, 0x100aa4e0, 0x100b0000)
    to space 64K, 0% used [0x10090000, 0x10090000, 0x100a0000)
    tenured generation total 1960K, used 1328K [0x104f0000, 0x106da000, 0x14010000)
    the space 1960K, 67% used [0x104f0000, 0x1063c2e0, 0x1063c400, 0x106da000)
    compacting perm gen total 4096K, used 2584K [0x14010000, 0x14410000, 0x18010000)
    the space 4096K, 63% used [0x14010000, 0x142960f8, 0x14296200, 0x14410000)
    Local Time = Wed Jan 12 07:05:13 2005
    Elapsed Time = 44871
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.2_05-b04 mixed mode)
    #

    3x
    but the bug haven't been fixed ?Could be. But if so it is in a newer version of the odbc driver than the one you have. (Again this has nothing to do with java.)
    The odbc applet in windows allows you to inspect the version number. Depending on your business environment you might be able to find and use a different one. It might be possible to download a newer version from somewhere.
    As I stated another driver (jdbc) is likely to fix the problem as well. Which database are you using?

  • 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 Connections using 9iDS?

    I've just installed 9iDS and I noticed that there is no OCA installed. Has anyone with 9iDS tried using JDBC/ODBC to connect to a non-Oracle database?

    Correct we are no longer shipping the OCA - You should be looking at the Oracle gateways as a way of providing non-oracle access for Forms and Reports.
    http://technet.oracle.com/products/gateways/content.html
    You can't plug ODBC or JDBC into Forms as an alternative to SQL*Net (unless you want to do a lot of 3gl coding and Transactional triggers)

  • JDBC-ODBC Connection

    Both my office and home computers are installed with Win 2000, Java 2 SDK SE 1.4.1_01, and Tomcat 4.1. Then how come I can connect to the database and run JSP with the office computer, but I can't even connect to the database with the home computer? I tried the JDBC:ODBC:(ODBC Name here) and the home computer pops up an "unidentified error" message.
    * How can I check if my computer is installed with the JDBC-ODBC bridge driver?
    * Is there a serarate download file for that? I understand it automatically comes with Java 2 SDK, but I don't see how it's working. I uninstalled and reinstalled Java 2 SDK many times, but all the same.
    * Is there any other way to connect to the database and run JSP without using the JDBC:ODBC thing?
    Y.C.

    Using MS Access. Both my office and home computers are running with ASP on IIS and ColdFusion on ColdFusion server. I connect to either MS Access or MS SQL. I've tested ODBC and know it's working though I usually connect through OLEDB. As you may have already guessed, I am new to JSP. My big question at this moment is why JSP to MS Access through ODBC is working in my office but not at home when both computers are almost clone to each other in the same working environment. What else would be the factor in difference than those I told in my previous message?
    This is a part of the connection coding that worked in the office but not at home:
    String MM_connCareerSE_access_DRIVER = "sun.jdbc.odbc.JdbcOdbcDriver";
    String MM_connCareerSE_access_USERNAME = "";
    String MM_connCareerSE_access_PASSWORD = "";
    String MM_connCareerSE_access_STRING = "jdbc:odbc:CareerSE";
    What other information would you need?
    By the way, how do you connect to MS SQL with JSP?
    Y.C.

Maybe you are looking for

  • How to Use Detail Region in Table Input for Advanced Tables

    Hi, I have a requirement to have an editable table mapped to a VO with 30-40 fields. User does not want horizontal scrolling, so it is important to enable user input in the detail region of the advanced table The problem is whenever the detail link i

  • Mail update & keychain problems

    Since installing a large security update yesterday on my MacBook Pro, I have not been able to use Mail. I keep getting the following message: "Mail has been updated. Do you want to allow the new version to access the same keychain items (such as pass

  • Can't get my Premiere Elements 11 to reinstall

    I am told that you are only allowed a finite number of times that you can reinstall Premiere Elements 11 and I seem to have reached it. What do I do now ?

  • Screen saver troubles

    I cannot get my screen saver to stay set on my iPhoto library. Keeps going back to generic National Geographic stuff.  Upgraded to Yosemite last week.

  • Owl Orphanage: Photoshop.exe - Entry Point Not Found

    Using Photoshop CS5 64 bit on Windows 7.  New problem recently started.  Whenever I try and open PSCS5 I get the following error.  I then click OK and PS opens without further problem. OWL Orphange: Photoshop.exe - Entry Point Nont Found.  The proced