Tomcat 4.0 Catilina & JDBC driver

Greetings,
I have cobbled together an app that accesses a DB2 UDB on an AIX box. I am using the IBM driver COM.ibm.db2.jdbc.app.DB2Driver. My app throws a class not found exception and errors out when I try to access the database at exactly the point where the driver loads "Class.forName(driverName);". I need assistance in telling Catilina (the servlet and jsp container) about this driver and have not found much doco on this to date. Any assistance appreciated!
GPB

BTW...I have the jdbc driver jar'd up in the lib directory.

Similar Messages

  • What JDBC drive I can use in Tomcat

    Hi all. I'm trying to shift my web application(JSP and JavaBeans only) from JRUN to Tomcat 4.1. I used sun JDBC driver or JRUN's own JDBC driver to connect to Microsoft SQL Server 2000 and both worked. Now since I'm setting up the same thing in Tomcat, I have totally no idea about what JDBC driver I should use and how to do it. I'm wondering whether Tomcat itself provides any JDBC driver? Or if not, how to make it work with Sun's driver? Or some more, is there any free driver available which is workable?
    Thanks a lot for any help!

    As you said in production envio you have set up
    up another server which will be the primary server
    for the application.Though, your application works
    well in Tomcat, it 's not complete solution in
    production envio.That depends on what the "production" system is intended to do, how many users it serves, what are the security concerns, etc.
    A low usage, internal system can easily be run with just Tomcat.

  • Tomcat7 + JDBC driver jar

    Context:
    According to the installation guide for bonitasoft (http://documentation.bonitasoft.com/dat … add_driver)
    Tomcat 7
    For Tomcat, simply add the JDBC driver jar file in the appropriate folder:
        Bonita BPM Tomcat bundle: in the bundle folder add the driver to the lib/bonita folder.
        Bonita BPM deploy bundle: in the Tomcat folder add the driver to the lib folder.
        Ubuntu/Debian package: add the driver to /usr/share/tomcat7/lib.
        Windows as a service: add the driver to C:\Program Files\Apache Software Foundation\Tomcat 7.0\lib
    Problem:
    Which JDBC driver is meant ? I searched the web for an tomcat JDBC jar file for tomcat7 ?
    This confused me further, I tought archlinux is analog to ubuntu and read the section platform installation example for (Ubuntu + OpenJDK + Tomcat + MySQL):
    Add JDBC driver
    You need to include JDBC driver in Tomcat classpath:
        Change to Tomcat libraries directory: cd /usr/share/tomcat7/lib.
        Download the library mysql-connector-java from the MySQL site to this directory.
    But the mysql site (recommended by the installation guide) provides a download link for an tar.gz file and on google.code (https://code.google.com/p/find-ur-pal/d … 8-bin.jar&) I found .jar file. The installation guide clearly speaks about an .jar file. There are different version of the JDBC jar file on the web. Which one is right ?

    Do you intend on continuing to spam the boards with this issue? Read the Etiquette and the wiki: https://wiki.archlinux.org/index.php/Tomcat_and_Apache
    Moving to NC...

  • Classpath in tomcat.bat for jdbc driver (jsp page)

    Dear Friends,
    I am able to run my java program with Microsoft JDBC driver from console (dos prompt).
    But, when i am trying to run JSP program on browser using, the same driver, it is saying classNotFoundException().
    do i need to set the classpath for Microsoft jdbc driver in my tomcat.bat ?
    Please help me, what changes do i have to do in tomcat.bat to run the microsoft jdbc driver for jsp application.
    If anyone having idea, please share ur valuable ideas.
    thanks in advance.
    yours
    Rajesh
    [email protected]

    If the driver is packed in a jar-file, you can just place the jar in the lib directory of Tomcat. If it's not, you can pack it in a jar and do the same thing:)

  • JDBC DRIVER LINUX TOMCAT APACHE

    Hello all
    I am woking on APACHE + TOMCAT + RH LINUX
    enviorment . I have a main page which calls another JSP on clicking to a button . That JSP makes connection with oracle 7.3.4 which is running on another machine whose enviorment is AIX 4.2 .
    whenever I clicked on button it access the JSP but it could nt find the driver which is classes12.zip in
    TOMCAT_HOME/lib directory and classpath is already set
    Error I am getting is driver not found in case the statement is
    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    and error is Document contain no data in case I change the above statement to
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Please help ?
    Thanks in Advance
    Avi

    Thanks for yor reply beattris
    Still it didbnt work Please have a look at the code
    <%
    System.out.println("1");
    Class.forName("oracle.jdbc.driver.OracleDriver");
    System.out.println("2");
    conn = java.sql.DriverManager.getConnection("jdbc:oracle:thin:@blackadder:1521:ORCL","driver","norman");
    stmt = conn.createStatement();
    rs = stmt.executeQuery("SELECT FILE_STATUS FROM GOLFFILES WHERE GOLFFILE_ID = (SELECT MAX(GOLFFILE_ID) FROM GOLFFILES)");
    while (rs.next()) {
    varIsUpdated = rs.getString(1);
    rs.close();
    stmt.close();
    if (varIsUpdated.equals("START") && !(varIsUpdated.equals("LOADED"))) {
    conn.close();
    %>
    Above is the code it comes to JSP and it prints 1 which is above the class.forName statement but after that it wont print 2 .. which means it is able execute this statement
    One more thing do .zip files work on linux
    Please see if u can help ?
    Thanks
    KS

  • MS SQL Server 2000 JDBC Driver + Tomcat 4

    Will the MS SQL Server 2000 JDBC Driver (http://www.microsoft.com/SQL/downloads/2000/jdbc.asp) work with a JSP application on the Tomcat Server. The JSP is to access a MS SQL Server Database. Would it b able to do this with this Driver or do I need another one (type) for Tomcat?
    Thanx
    Yaz

    Hi Yasir,
    1. It should be OK.
    (2. Check the requirement to see if you have everything)
    --Paul.                                                                                                                                                                                           

  • Problem loading jdbc driver in Tomcat

    Hi,
    I have got a connection to MySQL5.0 from TomCat 5.5.13, that was test correctly in development (JSC Upd 1) but I encounter the following deployment error :
    com.sun.rave.web.ui.appbase.ApplicationException: org.apache.jasper.JasperException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    When I verify, I found that if I put the mysql Connector JDBC driver in <tomcat>/common/lib, there is no error.
    But when the MySql Connector JDBC driver resides in <tomcat>/shared/lib, the error persists.
    What's the difference ? shouldn't it work for both ?
    Thanks in advance for any pointers and advise.

    hmm... i guess that it's a must to include the lib at /common/lib instead of shared/lib .
    Is there a Tomcat resource that I can read up on ?
    rgds

  • Tomcat 6.0.18, Cannot create JDBC driver of class '' for connect URL 'null'

    hi,
    I have searched through the web, none of the solution works for me. Hope I could get some suggestion from you.
    I am running tomcat 6.0.18 + eclipse 3.4.1 + jre 1.6 + jsp + jsf + mysql 5.0 on Ubuntu 8.10.
    The <GlobalNamingResources> configuration of TOMCAT_HOME/conf/server.xml
    <GlobalNamingResources>
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users
        -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/db" auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/db?autoReconnect=true"
    username="xxx"
    password="xxx"
    maxActive="20"
    maxIdle="10"
    poolPreparedStatements="true" />
      </GlobalNamingResources>TOMCAT_HOME/conf/context.xml
    <Context>
        <!-- Default set of monitored resources -->
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
        <!-- Uncomment this to disable session persistence across Tomcat restarts -->
        <!--
        <Manager pathname="" />
        -->
        <!-- Uncomment this to enable Comet connection tacking (provides events
             on session expiration as well as webapp lifecycle) -->
        <!--
        <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
        -->
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                
    </Context>An additional context.xml at eclipse'sworkspace/MyApplication/WebContent/META-INF
    <?xml version="1.0" encoding="UTF-8"?>
    <Context>
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                  
    </Context>web.xml of my application
      <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/db</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>This is the current configuration of the application, before this, I have followed the guidance of:
    [Apache Tomcat 6.0 JNDI Datasource HOW-TO|http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations]
    and all the solutions from
    [Cannot create JDBC driver of class..|http://www.theserverside.com/discussions/thread.tss?thread_id=25459]
    Please advice, what's going wrong?

    hi,
    I have searched through the web, none of the solution works for me. Hope I could get some suggestion from you.
    I am running tomcat 6.0.18 + eclipse 3.4.1 + jre 1.6 + jsp + jsf + mysql 5.0 on Ubuntu 8.10.
    The <GlobalNamingResources> configuration of TOMCAT_HOME/conf/server.xml
    <GlobalNamingResources>
        <!-- Editable user database that can also be used by
             UserDatabaseRealm to authenticate users
        -->
        <Resource name="UserDatabase" auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved"
                  factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
                  pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/db" auth="Container"
    type="javax.sql.DataSource"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/db?autoReconnect=true"
    username="xxx"
    password="xxx"
    maxActive="20"
    maxIdle="10"
    poolPreparedStatements="true" />
      </GlobalNamingResources>TOMCAT_HOME/conf/context.xml
    <Context>
        <!-- Default set of monitored resources -->
        <WatchedResource>WEB-INF/web.xml</WatchedResource>
        <!-- Uncomment this to disable session persistence across Tomcat restarts -->
        <!--
        <Manager pathname="" />
        -->
        <!-- Uncomment this to enable Comet connection tacking (provides events
             on session expiration as well as webapp lifecycle) -->
        <!--
        <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
        -->
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                
    </Context>An additional context.xml at eclipse'sworkspace/MyApplication/WebContent/META-INF
    <?xml version="1.0" encoding="UTF-8"?>
    <Context>
    <ResourceLink global="jdbc/db" name="jdbc/db" type="javax.sql.DataSource"/>                  
    </Context>web.xml of my application
      <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/db</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>This is the current configuration of the application, before this, I have followed the guidance of:
    [Apache Tomcat 6.0 JNDI Datasource HOW-TO|http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html#Database%20Connection%20Pool%20(DBCP)%20Configurations]
    and all the solutions from
    [Cannot create JDBC driver of class..|http://www.theserverside.com/discussions/thread.tss?thread_id=25459]
    Please advice, what's going wrong?

  • Where to put SQL Server JDBC driver in Tomcat?

    Can anyone tell me where should I put the Microsoft SQL Server JDBC driver in the Tomcat and can make it work?

    You may also need to place the full path in the classpath variable. You can also download install instructions from the same page where you access the microsoft driver.

  • JNDI-Tomcat 5.5.17, Cannot create JDBC driver of class '' for connect URL '

    I wrote a jsp program using JNDI to get connected to MySql DB, but i got the error " Cannot load JDBC driver class 'com.mysql.jdbc.Driver' " while running the program.
    I'm using NetBean5.5 which has bundled TomCat5.5.17.
    I've refered to many tutorials and websites, but i still can't solve it, here's my configuration and codes:
    Imported mysql-connector-java-5.0.5-bin into lib directory.
    context.xml:
    <Context path="/WebApplication1">
    <Resource name="jdbc/jsp" auth="Container" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/jsp">
    <parameter>
    <name>driverClassName</name>
    <value>com.mysql.jdbc.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:mysql://localhost:3306/jsp</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>root</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>malaysia</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>20</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>10</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>-1</value>
    </parameter>
    </ResourceParams>
    </Context>
    i included the following in Web.xml:
    <resource-ref>
    <res-ref-name>jdbc/jsp</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    <res-sharing-scope>Shareable</res-sharing-scope>
    </resource-ref>
    My JSP Code:
    Context initContext = new InitialContext();
    Context envContext = (Context)initContext.lookup("java:/comp/env");
    DataSource ds = (DataSource)envContext.lookup("jdbc/jsp");
    Connection conn = ds.getConnection();
    Thanks~~~~

    I think mysql jdbc library should add to the class library path of your project.
    Hope this helps.

  • Urgent... unable to load JDBC driver

    i have developed a servlet which will establish connection to mySQL.. but it couldn't load the JDBC driver even i placed
    [ mysql-connector-java-2.0.14-bin.zip ] in [ C:\j2sdk1.4.2_05\jre\lib\ext\ ]
    in fact.. it work fine b4 i format my notebook.. anyone can help me??
    pls note that i using APACHE TOMCAT and mySQL 3.23
    pls help.. very urgent one
    the following is my servlet code.....
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    public class LoginServlet extends HttpServlet {
    static final String dbURL = "jdbc:mysql://localhost" ;
    public void doPost(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    Connection conn = null;
    String nextJSP = null;
    try {
    Class.forName("org.gjt.mm.mysql.Driver");
    catch (ClassNotFoundException e) {
    throw new ServletException("Unable to load JDBC driver");
    }

    i already add new variable in environment variables
    variable name = CLASSPATH
    variable value = C:\j2sdk1.4.2_05\jre\lib\ext\mysql-connector-java-2.0.14-bin.jar;
    but the same output is come up.. still unable to load my JDBC driver in TOMCAT... y?

  • How do I get IWS 4.1 to recognize a MySql JDBC driver?

    I have developed a web application the access a MySql database from a JSP using tomcat 3.3. I am now migrating the application to the production envionment, IPWS 4.1 SP7. I get a serverlet exception : no sutable driver when the JSP tries to connect using the mm.mysql-2.0.6.1 JDBC driver. I have tried other driver versions (older and newer) to no avail. How do I get IPWS to work with MySql data base?

    I've recently done this with iWs 4.1 and mm.mysql 2.0.11 on a Windows 2000 box.
    Download and install the mm.mysql software, I put the jar file mm.mysql-2.0.11-bin.jar into C:\mm.mysql
    Then on the iWs Management Interface... Servlets, Configure JVM attributes. Go to the end of the ClassPath field and add ";C:/mm.mysql/mm.mysql-2.0.11-bin.jar" and save the change.
    Then my JSP code looks like the following:
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    Connection con = DriverManager.getConnection("jdbc:mysql://dbserver.mydomain.com/mydatabase?user=xxx&password=xxx");
    Regards,
    Jim

  • Connecting to SQLserver 2005 via Web Analysis using a JDBC driver

    We are currently working on a web analysis suite and have been trying to create a SQL spreadsheet data object.
    After downloading and supposedly installing the sqljdbc.jar driver, we are having problems getting a connection to MS SQL server 2005.
    We set the classpath to this driver in the operating system (Windows server 2003) but are unsure exactly how to set this classpath in Tomcat 5.0.28 as recommended by the help file. We have tried editing the catalina.bat and catalina.50.bat in the \Hyperion\common\appServers\Tomcat\5.0.28\bin folder to point to sqljdbc.jar, but to no avail.
    So....does anyone have any experience on setting up the JDBC driver for MSSQLServer 2005 and making a connection in Web Analysis. Could you please give a step by step account of how this is done?

    Hi,
    In the past I have used two methods either updating the registry for the web application or by placing the jar file in the following directory
    \Hyperion\deployments\Tomcat5\WebAnalysis\webapps\WebAnalysis\WEB-INF\lib
    If you do place it in that directory you will need to restart the web analysis web server.
    Then in web analysis studio go to file > new > database connection >Relational
    Select Microsoft SQL Server
    JDBC Driver
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    Connection string
    jdbc:microsoft:sqlserver://<servername>:1433;DatabaseName=<dbname>;SelectMethod=cursor
    Enter username/password
    There is always the Merant SQL server connection that can be used as well.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver

    Hi.
    I've got this piece of code into a servlet:
    <%@page language="java" import="java.sql.*"%>
    <%
    Driver DriverRecordset1 = (Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
    Connection Conn = DriverManager.getConnection("jdbc:oracle:thin:@myserver:1521:SID","system","manager");
    When starting Tomcat, I included into startup.bat:
    set CLASSPATH=%CLASSPATH%;d:\orant\jdbc\classes102.zip (it exists)
    But when executing the code, I get this error message:
    javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
    What am I doing wrong?
    Thank you very much.

    The whole message:
    javax.servlet.ServletException: oracle.jdbc.driver.OracleDriver
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown Source)
         at mypage_1._jspService(mypage_1.java:112)
         at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
         at org.apache.tomcat.core.Handler.invoke(Unknown Source)
         at org.apache.tomcat.core.Handler.service(Unknown Source)
         at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
         at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
         at org.apache.tomcat.core.ContextManager.service(Unknown Source)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Unknown Source)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown Source)
         at java.lang.Thread.run(Thread.java:484)
    ================
    If I write only:
    Class.forName("oracle.jdbc.driver.OracleDriver");
    I get the same error.

  • Problems showing german special characters using DB2 jdbc driver

    Hi JDBC gurus,
    In my application the special german characters(umlauts...) are not shown correctly when I'm using IBM jdbc driver(type 2). When I switch to jdbcodbc driver everything is correct. So is there any trick, some connection parameter, some property or something like this? Something like "setCharset" or "umlauts" or something? I could not find anything in web :-(
    It is also hard to imagine that nobody has faced this problem. Or it is very trivial...
    The second problem:
    I have downloaded a new driver (com.ibm.db2.jcc.DB2Driver) but when I try to connect with DB I'm getting
    com.ibm.db2.jcc.b.SqlException: No license present. What does it mean - no license? I'm going to clear with our DB admin if the reason can be that I have no rights to connect directly with DB without having client installed locally on my PC. This is only what comes to my mind.
    Environment:
    DB: DB2 7.x
    Web-Server: Tomcat 5.x
    Hibernate 3.1.x

    Actually the problem is ONLY symbol � - scharfes S. Other umlauts are shown correctly...
    What is wrong with that symbol????
    Many thanks in advance,
    Giorgi

Maybe you are looking for

  • How to add DNS entry Post Installation in Solaris 10?

    Hi, I have installed Solaris 10 without mentioning the DNS entry while installation. How do I add that now in order to make that Solaris 10 to get connected to Internet ? Thanks in Advance. Girish Prabhakara.

  • From one ipod to another... isnt working

    i purchased an ipod mini a few years back, and tonight i purchased a 30 gig ipod. when i plugged the new one into my computer it did not respond, but when i plug the old one in it works fine, what is going wrong? and yes its for windows.

  • How can I text from my macbook pro

    How can I text from my Macbook pro using Mountian Lion?

  • BDC in background for Transaction FB50

    Hi, I have created BDC program for FB50 T.code. when i run this below code (foreground) : (call transaction FB50 using it_bdcdata mode 'A' update 'S' messages into it_bdcmsgcoll.) then my it_bdcmsgcoll contain error messages occured during data downl

  • Repair order/Service order

    Dear fnds, Iam new for Customer Service..... What is the Main Dufference of Repair order and Service Order..... When it will have  to Raise by the User... Please Explain Me brief...i gone thr Help.sap....just explain me General terminology... Thanks