Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 46358 invoked from network); 8 Jun 2004 02:20:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Jun 2004 02:20:08 -0000 Received: (qmail 6934 invoked by uid 500); 8 Jun 2004 02:19:57 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 6897 invoked by uid 500); 8 Jun 2004 02:19:56 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 6883 invoked by uid 99); 8 Jun 2004 02:19:56 -0000 Received: from [132.236.56.39] (HELO postoffice9.mail.cornell.edu) (132.236.56.39) by apache.org (qpsmtpd/0.27.1) with ESMTP; Mon, 07 Jun 2004 19:19:56 -0700 Received: from [192.168.5.101] (syr-24-59-99-22.twcny.rr.com [24.59.99.22]) by postoffice9.mail.cornell.edu (8.12.10/8.12.6) with ESMTP id i582JUMB008857 for ; Mon, 7 Jun 2004 22:19:31 -0400 (EDT) Message-ID: <40C52239.1010709@cornell.edu> Date: Mon, 07 Jun 2004 22:19:37 -0400 From: David Smith User-Agent: Mozilla Thunderbird 0.6 (X11/20040502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tomcat Users List Subject: Re: problems connecting to networked odbc data source References: <40C51C61.20401@netscape.net> In-Reply-To: <40C51C61.20401@netscape.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 4.5.0.90627, Antispam-Core: 4.0.4.92622, Antispam-Data: 2004.6.7.102793 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Check the archives -- jdbc-odbc bridge is a bad idea. It's never been stable to my knowlege. I'd recommend either a real MS SQL server or some other database server with a good JDBC driver. --David ilasno wrote: > hello, > > here's my setup. i have a development linux server running debian, > tomcat 5.0.16, and java 1.3. i have successfully connected to a remote > mysql database (on port 3306 with a connection string like > 'jdbc:mysql://xx.xx.xx.xx:3306/dbName?autoReconnect=true') with a > datasource configured in the server.xml file. > > the computer i work on is running windows 2000 server and is networked > with the debian linux box, and what i would like to do is configure a > datasource within the debian tomcat server.xml that would connect with > a microsoft access database that is set up as a DSN on the windows > server. i started with a datasource configuration like this: > > < type="javax.sql.DataSource" /> > - <#> > - <#> > factory > org.apache.commons.dbcp.BasicDataSourceFactory > > - <#> > driverClassName > sun.jdbc.odbc.JdbcOdbcDriver > > > url > jdbc:odbc://192.168.0.2/dbName?autoReconnect=true > > > ...other parameters, including maxActive, username, password, etc... > - <#> > > but i was getting a null reference when i tried to create the > connection object from the datasource object. so, to try to get > something going, i then moved to an all-code connection, like so: > > String url= "jdbc:odbc://192.168.0.2/dbName"; > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); > Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance(); > conn = DriverManager.getConnection(url); > > but it's still throwing an exception on the line that attempts to get > a connection, this time like so: > > java.lang.Exception: DB:getTest() failed: No suitable driver > at net.ilasno.db.DB.getTest(DB.java:82) > at org.apache.jsp.test_jsp._jspService(test_jsp.java:45) > at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > at > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) > > at > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) > at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) > > > it's my understanding that the jdbc/odbc bridge driver is a part of > the core java classes. at this point i would settle for either > technique, i just want to access the data! any suggestions? > > thanks for your time --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org