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

Similar Messages

  • 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

  • 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.

  • Need a jdbc driver for tomcat - oracle

    i have tomcat 6 and oracle forms 6i
    i need a driver
    where can i get it from & how do i install???

    http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/htdocs/jdbc_10201.html

  • 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?

  • Cannot load JDBC Driver Class in Tomcat5.5 using struts.

    Hello to all,
    I'm working in the struts environment using Esclipse3.2 IDE.
    And I have installed Tomcat5.5 server.I have created the LoginForm
    in struts.Now i like to connect my LoginForm with MySql database.I
    have also created the database in MySql naming strutsdatabase.
    I had also download the mysql-connector-java-3.0.16-ga-bin.jar and
    save that in C:/tomcat/commons/lib directory.
    While running I have got the below error:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:766)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.setLogWriter(BasicDataSource.java:598)
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:808)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    javax.servlet.UnavailableException: Initializing application data source org.apache.struts.action.DATA_SOURCE
    at org.apache.struts.action.ActionServlet.initModuleDataSources(ActionServlet.java:812)
    at org.apache.struts.action.ActionServlet.init(ActionServlet.java:335)
    at javax.servlet.GenericServlet.init(GenericServlet.java:211)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    And I have attached my struts-config.xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software
    Foundation//DTD Struts Configuration 1.2//EN"
    "http://struts.apache.org/dtds/struts-config_1_2.dtd">
    <struts-config>
    <data-sources>
    <data-source
    type="org.apache.tomcat.dbcp.dbcp.BasicDataSource">
    <set-property property="url"
    value="jdbc:mysql://localhost:3306/strutsdatabase?autoReconnect
    =true"/>
    <set-property property="driverClassName"
    value="com.mysql.jdbc.Driver"/>
    <set-property property="username" value=""/>
    <set-property property="password" value=""/>
    <set-property property="maxActive" value="10"/>
    <set-property property="validationQuery" value="SELECT
    COUNT(*) FROM test"/>
    <set-property property="maxWait" value="5000"/>
    <set-property property="defaultAutoCommit" value="false"/>
    </data-source>
    </data-sources>
    <form-beans>
    <form-bean name="LoginForm"
    type="fino.web.struts.action.LoginForm"/>
    </form-beans>
    <global-exceptions/>
    <global-forwards/>
    <action-mappings>
    <action name="LoginForm" path="/login" scope="request"
    type="fino.web.struts.action.LoginAction" validate="true">
    <forward name="success" path="/success.jsp"/>
    <forward name="failure" path="/failure.jsp"/>
    </action>
    </action-mappings>
    <controller/>
    <message-resources null="false"
    parameter="org.apache.struts.action.ActionResources"/>
    </struts-config>
    Friends,please help me to find solution to this problem.

    Note: This thread was originally posted in the [Java Compiler|http://forums.sun.com/forum.jspa?forumID=7] forum, but moved to this forum for closer topic alignment.

  • 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...

  • ODBC or JDBC on Linux/Oracle

    http://www.openlinksw.com/
    Is where you will find connectivity for LINUX and Oracle.
    I did some research on the connectivity of LINUX and Oracle
    after having switched from a Server Farm hosting IIS and then
    going to linux.
    The basic info I found was in about 20 links.
    Some areas of interest might be:
    http://www.linuxworld.com/ this is by INFOWORLD MAG but has the
    best source and links for commercial Linux.
    In addition:
    http://users.ids.net/~bjepson/freeODBC/
    The free ODBC might be a place to gain the functionality to get
    the job done if you have the ability to code at that layer.
    The reason WHY odbc is not the preferd method of accessing
    Oracle is that OLE DB is thunked through the JET DATABASE ENGINE
    or subsystem in WIN9.x and WINNT at the client side.
    http://support.microsoft.com/support/kb/articles/q139/7/25.asp
    This article goes into some detail how OLE DB, ODBC, ADO, RDO,
    and the rest of the MSFT data is handled and by what files.
    ORACLE uses "OLE OBJECTS" to get the data and passes the JET
    DBENGINE/Sub-system.
    So for a Server on Linux and a host on Wintel you might look at
    the JDBC or universal Model of data connectivity.
    Oddly this was just something I looked into prior to deciding to
    get into Oracle8i....
    If you get any additional info.. or other "workable" approaches..
    Please follow up I would be interested...
    null

    Have you ever heard of [url http://www.google.com]google?
    By searching for [url http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=linux+mysql+jdbc+driver]linux mysql jdbc driver, and following the first link, it took me about two minuts to find the [url http://www.mysql.com/downloads/api-jdbc-stable.html]MySql JDBC driver download page.

  • Pre-loading a JDBC driver

    Hi, is there a simple way to load a JDBC driver in Tomcat at startup, to avoid the call to Class.forName() in every JDBC page that accesses the dB?
    I also would like to change it when I like in a simple way, say something like changing a property file, if possible.
    Thanks for your help.

    Geez, use a connection pool.In fact I'm planning to do it
    >
    Tomcat lets you set up a JNDI data source for your
    app. Go read those docs. - MODThanks for the advice.
    Are you sure? I would have thought you'd only have to load the class >once.In fact I would like not to ever load it in my pages...

  • 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?

  • 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 for oracle8i(8.1.5) on Linux with JDK1.2.2

    I am looking for a JDBC Driver.
    Does anybody know where I can get it?
    Thanks in advance.
    null

    Java Development Quote:
    You can download the JDK 1.2 version of the 8.1.6 Thin driver from this site. It is 100% Pure Java and will run on Linux.
    As you replied, I downloaded 8.1.6 Thin driver(classes12.zip) and installed it in the Linux server where Oracle 8.1.5 resides at.
    I wrote a test program, and it compiled without errors. But when I excuted it, I get the error message below:
    java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNU
    M=135286784)(ERR=12505)(ERROR_STACK=(ERROR=(CODE=12505)(EMFI=4))))
    Below is the test program I used:
    import java.sql.*;
    import oracle.jdbc.driver.*;
    public class Test
    public static void main (String args [])throws SQLException
    //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    try{
    Class.forName("oracle.jdbc.driver.OracleDriver");
    catch(ClassNotFoundException e){
    System.out.println("Cannot load the Driver");
    Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@207.207.148.132:1521:DR_DEV","crunchy", "imcrunchy");
    // Create a Statement
    Statement stmt = conn.createStatement ();
    // Select the ENAME column from the EMP table
    ResultSet rset = stmt.executeQuery ("select sysdate from dual");
    // Iterate through the result and print the employee names
    while (rset.next ())
    System.out.println (rset.getString (1));
    I'd appreciate if you give me some insight.

  • Help installing new JDBC driver on LINUX

    Hello,
    Today, I downloaded the new SQL Server 2005 JDBC Driver onto
    my Linux Server. The path to the driver's .jar file is
    /root/sqljdbc_1.0/enu/sqljdbc.jar. I placed that path in my CF
    Adminstrator "Java and JVM" page's Class Path field. I restarted
    the app server but each time I try to establish a dsn connection I
    keep getting this error. (note: I have dsn's set up already to this
    instance of SQL Server 2005 so the communicatio is there but I
    would prefer to use this new driver)
    Connection verification failed for data source: dsnTestDB
    java.sql.SQLException: No suitable driver available for
    dsnTestDB, please check the driver setting in resources file,
    error: null
    The root cause was that: java.sql.SQLException: No suitable
    driver available for dsnTestDB please check the driver setting in
    resources file, error: null
    Any help would be greatly appreciated.
    Thanks,
    mdg1
    Houston, TX

    Try placing the jar file in the
    {cfmx-root}/runtime/servers/lib (create if not already there)
    directory if you have the server install or the
    {jrun-root}/servers/lib directory if you have the multiserver or
    j2ee install on JRun. Restart the Coldfusion applicatioin server.
    Ted Zimmerman

  • 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.                                                                                                                                                                                           

  • Oracle JDBC Driver for Linux

    I'm looking for a place to download an Oracle JDBC driver for Linux. I have installed Oracle 8.1.5 for Linux, but don't find the driver either in the installation, nor on the CD. Can anyone point me to someplace I might be able to find it?
    Also, generic help in setting this up to work, JDBC API calls would also be of great help.
    Thanks.

    Luis Claudio Rodrigues da Silveira (guest) wrote:
    : How can I configure JDBC driver in a Suse environment? What
    are
    : the necessary steps?
    : Thanks in advance.
    1) You need classes111.zip usually located at
    $ORACLE_HONE/jdbc/lib.
    2) Add classes111.zip to CLASSPATH and export
    3) If you use thin driver your code should look like:
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    // Connect to the database
    // You must put a database name after the @ sign in the
    connection URL.
    // You can use either the fully specified SQL*net syntax or
    a short cut
    // syntax as <host>:<port>:<sid>. The example uses the
    short cut syntax.
    Connection conn =
    DriverManager.getConnection
    (jdbc:oracle:thin:@hostname:port:ORACLE_SID,
    USER_NAME, PASSWOED);
    null

Maybe you are looking for

  • ERROR: Wrong password for user

    Oracle 10g version 10.2.0.1. RHEL 4. I was trying to setup a backup, but everytime I enter my User ID and Password it keeps telling me it's wrong. I have tried this with EVERY user ID I have, I have verified the Password by loging in via SSH, and sti

  • Tuxedo 8.0 and Oracle patch 9.2.0.8

    Hi, We have installed Oracle patch 9.2.0.8 into UNIX machine. We are using Tuxedo for middleware that using an API Application through Tuxedo to provision onto Oracle database. Since Oracle patch 9.2.0.8 installed, Tuxedo produced core file. It has b

  • Disable BT-WiFi operating on the 5Ghz Band.

    With the Home Hub 4, 2 further SSID's are broadcasted. They are: BTWifi BTWifi-with-FON Both of these SSID's provide the same service. I am assuming BT done the "with-FON" to show they have partnered with FON or some other reason. For me. I think it

  • Connect iphone to mac pro

    My iphone 5  can not be connected with my Mac Pro with bluetooth. Any idea what i can do to solve this issue?

  • Calls in Dubai

    I am planning to make a purchase for credits for me to call Dubai landlines and mobile numbers but I am not sure if it is going to work properly, I don't want to spend for credits that I won't be able to use. I want to know since I have read that VOI