Apache Tomcat 4.0 and MySQL 3.2.3, how to connect?

Hi, could anybody help me please? I have a problem in connecting between Apache Tomcat 4.0 and MySQL 3.2.3. How can I connect them? Do I need mm.mysql.Driver? I have download that one, but I don't know where I should put that .jar file?
And before that, I have made a JSP file that using MySQL Database, and I have error like this:
Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org.gjt.mm.mysql.Driver
     at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:457)
     at org.apache.jsp.ex1$jsp._jspService(Compiled Code)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
     at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.StandardContext.invoke(Compiled Code)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.connector.http.HttpProcessor.process(Compiled Code)
     at org.apache.catalina.connector.http.HttpProcessor.run(Compiled Code)
     at java.lang.Thread.run(Thread.java:479)
root cause
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
     at org.apache.catalina.loader.WebappClassLoader.loadClass(Compiled Code)
     at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:198)
     at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:132)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Compiled Code)
     at org.apache.jsp.ex1$jsp._jspService(Compiled Code)
     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
     at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.StandardContext.invoke(Compiled Code)
     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.valves.AccessLogValve.invoke(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
     at org.apache.catalina.core.StandardPipeline.invokeNext(Compiled Code)
     at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
     at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
     at org.apache.catalina.connector.http.HttpProcessor.process(Compiled Code)
     at org.apache.catalina.connector.http.HttpProcessor.run(Compiled Code)
     at java.lang.Thread.run(Thread.java:479)
Can anybody help me, please? I need this in a short time for my thesis.

From the stack trace, it says that the mm.mysql Driver was not found. This means that you have not included the mySQL JDBC driver in your classpath. You have to download the mySQL driver jar file and place that in the "lib" folder under the Tomcat installation. Then, make sure that the said jar file is included in your classpath. Hope this helps

Similar Messages

  • Hi I just got my new Apple TV and I cant figure out how to connect it with My MacBook Air (11-inch, Late 2010- Processor  1.4 GHz Intel Core 2 Duo) OSX Version 10.8

    Hi
    Hi I just got my new Apple TV and I cant figure out how to connect it with My MacBook Air (11-inch, Late 2010- Processor  1.4 GHz Intel Core 2 Duo) OSX Version 10.8

    Are you referring to mirroring or you just unable to set up homesharing.
    AirPlay Mirroring requires a second-generation Apple TV or later, OS X 10.8 or better and is supported on the following Mac models: iMac (Mid 2011 or newer), Mac mini (Mid 2011 or newer), MacBook Air (Mid 2011 or newer), and MacBook Pro (Early 2011 or newer). It also requires the computer to be using wi-fi.

  • Simulation PID on control and design with DAQ card how to connection

    hi guys.. i am a beginner for LabVIEW 
    i have homework design PID on simulation path and i found by google
    how to connect simulation path to DAQ card ??
    anybody can help me
    which function to connect it???

    Duplicate Post

  • Print Server with Apache Tomcat 6.0 and Cocoon 2 Problem...

    Hi,
    My company have 2 server, (9i - APEX_3.1.2.00.02) and (10g - APEX_3.1.0.00.32), both in Http server running in OEL 4.0.
    I tried the following cocoon installation in other window server,
    http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html
    and I set both APEX Instants Setting, the report printing setting according to the installation above.
    The 10g apex run perfectly, however the 9i apex cannot print pdf report. the following is the error message show when i click on the export pdf button.
    The webpage at http://server9i:7777/pls/apex_camnet/f?p=105:1:3689040380318743457:PDF: might be temporarily down or it may have moved permanently to a new web address. Error 324 (net::ERR_EMPTY_RESPONSE): Unknown error.
    Before i add the print server to (9i), the pdf can be export, however no content inside the pdf, some corrupted detected, but when I added the report printing setting, the message above shown.
    Is this because of the version of database? or the version or APEX? or other matter i did not aware?
    Pls Help.
    ~ vincent
    Edited by: kiddoo_81 on Dec 23, 2010 2:08 PM

    Hi,
    Anybody? any suggestion?
    Thank you.
    ~vincent

  • I have a macbook pro with a mini display port out and would like to know how to connect the video from my mac to a TV with old RCA input video, or a TV with S-video imput. How can I do this, and do I need a video converter?

    I have a MacBook Pro that I want to hook up the Mini Display Port video out to a TV with RCA video imput, or a TV with S-video iimput.
    How do I do this, and do I need a video converter?
    Dennis

    there's an adaptor for mini dvi to s-video
    a well known auction site would yield results if apple don't stock it

  • I just got a new ipod touch and I don't know how to connect it to iTunes. Help ?

    I've plugged it in and everything but it won't come up , already updated iTunes and restarted computer

    See:
    iOS: Device not recognized in iTunes for Windows
    or
    iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X
    Syncing with iTunes on a Mac or PC requires:
    Mac: OS X v10.6.8 or later for iOS 6 (10.5.8 for iOS 5)
    PC: Windows 7; Windows Vista; or Windows XP Home or Professional with Service Pack 3 or later
    iTunes 10.7 or later (free download from www.itunes.com/download) for iOS 6 (10.5 for iOS 5)

  • How to integrate Apache Web Server and Apache Tomcat 4.0 ?

    <pre>
    Hi All,
    Can anyone give me a detailed description(or url that tells so) of how to install the Apache Web Server, Apache Tomcat Server4.0 and Integrate both of them.
    Still now I am using Apache Tomcat 4.0 as a standalone application and now I want to learn how to install,use Apache Web Server and integrate this with Apache Tomcat.
    Please point me to exact location,url to download the recent Apache Web Server and,
    Can I use my existing Standalone Apache Tomcat 4.0 to integrate this with Apache Web Server that I am going to download.
    A detailed explanation of how to integrate both is very helpful.
    Thanks in advance.
    <pre>

    The way to integrate Apache Web Server & Apache is very easy. The first step is download the library to connect both servers. This library can be download from http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0/bin/webapp-module-1.0-tc40-windows.zip.
    Copy the files to APACHE_HOME\modules and open httpd.conf to change any lines:
    You find the section "LoadModule" and you add the next lines:
    LoadModule webapp_module modules/mod_webapp.so
    AddModule mod_webapp.c
    And the end of the file you must add these lines:
    WebAppConnection conexion warp localhost:8008
    WebAppDeploy examples conexion /examples
    The first parameter -2nd line- (examples) is the URL name application, the second is the connection's name and the last parameter is the application's name. This name is the same which in servlet.xml.
    At last you can add one more lines to check the module's configuration:
    WebAppInfo /webapp-info
    If you visit http://<yoor_host>/webapp-info you can see the configuration.

  • Apache Tomcat vs IBM Websphere

    Hi,
    In our current deployment, I am using Apache Tomcat as the Java Application Server that comes bundled with Hyperion Planning 9.3.1 suite of applications. The documentation also suggests Oracle Application Server, IBM Websphere and BEA WebLogic. Currently the application stack is Hyperion Planning only, with Financial Reporting for the reporting needs.
    For our current situation, we have shortlisted between using the bundled Apache Tomcat or IBM Websphere. For comparison I wanted to know how stable Apache Tomcat is in general compared to websphere? How many concurrent users can it handle? Are there any specific limitations of Apache Tomcat that I should consider? Can someone list the major pros and cons of each?
    Thanks in advance
    Shehzad

    I agree with Jake.. Tomcat can handle much more than a few users. Whether it can handle the load for your environment may depend on your usage pattern, size of forms, etc.
    We typically use Tomcat for our Dodeca product that uses the Java API to talk to Essbase. It doesn't product 'forms' but rather just transfers data via XML between the client and server. With that product, we do have one customer that is serving appx 7,000 users on a single Tomcat server. In that case, however, the usage pattern is that field users log in daily (or sometimes weekly) and run a few reports (that retrieve data via XML).
    Note that Tomcat has a configuration parameter in the server.xml file to set the max number of threads that can be spawned by the process. You may want to tune that parameter if you decide to run Tomcat in production (and absolutely be sure to give it more heapsize in the java options).
    Tim Tow
    Applied OLAP, Inc

  • Multiple Realms in Apache Tomcat

    Sorry, if this is the wrong forum, but its the closest match i could find.
    I am trying to run 2 servlets that use apache tomcat's j_security with a FORM login to authenticate clients. I would like these 2 servlets to be authenticated by having j_security look in two different tables in a MS SQL 2000 Server database.
    I have read up a lot on apache tomcat's site, and the sense that i've made of it is that i need to have multiple realms, and in order to do that i need multiple contexts. I've tried wrapping my realm tag in a context tag but it doesn't work. What am i missing?
    thanks.
    <Context path="/servlet/" docBase="ROOT/WEB-INF/classes" reloadable="true" />
              <Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
         driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
         connectionName="sa" connectionPassword="******"
         connectionURL="jdbc:microsoft:sqlserver://localhost:1433;databaseName=ConcernCheck;selectMethod=cursor;"
    userTable="Operator" userNameCol="Username" userCredCol="Password"
         userRoleTable="Operator" roleNameCol="Role" />
    </Context>
    Thanks

    Hi!
    I have the same problem! did you solve this problem? can you give me a hint?
    Tnx,
    Stanislav

  • Deploy web service on apache tomcat

    Hi,
    I have J2EE application and now I need to expose some of the methods from this application via web service. I am using apache tomcat 6.20 and I am having lots of issues deploying my web service to apache tomcat.
    It seem to work fine on gloss fish as I was following the tutorial on netbeans for simple web services.
    Any ideas on best practice on building web service on apache tomcat. I've seen many people are having issues with this combination tomcat and jaxws but didn't find anything helpful.
    Thanks in advance.

    Here is the error I am getting when trying to pass strongly typed objects:
    javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
    - with linked exception:
    [javax.xml.bind.JAXBException: class java.util.LinkedList nor any of its super class is known to this context.]
            at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:329)
            at com.sun.xml.ws.message.AbstractMessageImpl.writeTo(AbstractMessageImpl.java:142)
            at com.sun.xml.ws.encoding.StreamSOAPCodec.encode(StreamSOAPCodec.java:109)
            at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
            at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:338)
            at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:93)
            at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:480)
            at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:244)
            at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:135)
            at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doGet(WSServletDelegate.java:129)
            at com.sun.xml.ws.transport.http.servlet.WSServletDelegate.doPost(WSServletDelegate.java:160)
            at com.sun.xml.ws.transport.http.servlet.WSServlet.doPost(WSServlet.java:75)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
            at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
            at java.lang.Thread.run(Thread.java:619)
    Caused by: javax.xml.bind.MarshalException
    - with linked exception:
    [javax.xml.bind.JAXBException: class java.util.LinkedList nor any of its super class is known to this context.]
            at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:279)
            at com.sun.xml.bind.v2.runtime.BridgeImpl.marshal(BridgeImpl.java:100)
            at com.sun.xml.bind.api.Bridge.marshal(Bridge.java:141)
            at com.sun.xml.ws.message.jaxb.JAXBMessage.writePayloadTo(JAXBMessage.java:321)
            ... 25 more
    Caused by: javax.xml.bind.JAXBException: class java.util.LinkedList nor any of its super class is known to this context.
            at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:242)
            at com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java:257)
            at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:649)
            at com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.serializeItem(ArrayElementNodeProperty.java:65)
            at com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.serializeListBody(ArrayElementProperty.java:168)
            at com.sun.xml.bind.v2.runtime.property.ArrayERProperty.serializeBody(ArrayERProperty.java:152)
            at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
            at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)
            at com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.serializeBody(SingleElementNodeProperty.java:150)
            at com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.serializeBody(ClassBeanInfoImpl.java:322)
            at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:681)
            at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:274)
            ... 28 more
    Caused by: javax.xml.bind.JAXBException: class java.util.LinkedList nor any of its super class is known to this context.
            at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.java:566)
            at com.sun.xml.bind.v2.runtime.XMLSerializer.childAsXsiType(XMLSerializer.java:644)
            ... 37 more

  • How can I run two instances of apache tomcat in the same machine.

    Hi
    Can I run 2 instances of apache tomcat in the same machine.If yes then how.?

    Yes, you can. Just run 2 instances. Make sure that they run on different ports.

  • MySQL problem -- ERROR 2002 Can't connect to local MySQL server

    Not Sure if this would be a right forum for my problem...
    I'm installing mySQL on my iBook, and thought that I have configured it. But then, after followring some instuctions from Adobe and Marc Liyanage sites, I have a problem to connect. This is what I've done in "TERMINAL"
    ~username$> cd /usr/local/mysql
    mysql ~username$> sudo chown -R mysql data/
    (asking for admin password)
    mysql ~username$> sudo echo
    mysql ~username$> sudo ./bin/mysqld_safe &
    username-ibook-g4:/usr/local/mysql username$ Starting mysqld daemon with databases from /usr/local/mysql/data
    STOPPING server from pid file /usr/local/mysql/data/roshaili-osmans-ibook-g4.local.pid
    060611 16:31:30 mysqld ended
    mysql ~username> /usr/local/mysql/bin/mysql test
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    [1]+ Done sudo ./bin/mysqld_safe
    mysql ~username>
    When I typed ::
    /usr/local/mysql/bin/mysqladmin -u root
    (see that there's no password)
    Then it displays:
    /usr/local/mysql/bin/mysqladmin Ver 8.41 Distrib 5.0.22, for apple-darwin8.6.0 on powerpc
    Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
    This software comes with ABSOLUTELY NO WARRANTY. This is free software,
    and you are welcome to modify and redistribute it under the GPL license
    Administration program for the mysqld daemon.
    Usage: /usr/local/mysql/bin/mysqladmin [OPTIONS] command command....
    -c, --count=# Number of iterations to make. This works with -i
    (--sleep) only.
    ...... bla bla bla.....
    Variables (--variable-name=value)
    and boolean options {FALSE|TRUE} Value (after reading options)
    count 0
    force FALSE
    compress FALSE
    character-sets-dir (No default value)
    default-character-set (No default value)
    host (No default value)
    port 0
    .........bla bla....
    ping Check if mysqld is alive
    processlist Show list of active threads in server
    reload Reload grant tables
    refresh Flush all tables and close and open logfiles
    shutdown Take server down
    status Gives a short status message from the server
    start-slave Start slave
    stop-slave Stop slave
    variables Prints variables available
    version Get version info from server
    roshaili-osmans-ibook-g4:~ roshailiosman$ >
    -----------------finish-----------------
    Does that mean that I'm connected to mySQL?
    Does anybody how to connect to MYSQL from the terminal? Thanks.
    iMac Mac OS X (10.4.6)
    iMac   Mac OS X (10.4.6)  

    Your biggest 'issue' right now is that your mysqld process is stopping on you -- making a connection impossible.
    Why it's bombing might be in a log .. try in mysql/data/usr.local.err .. and fix why itsbombing.
    To connect to it it'll be : mysql -u root -ppassword -D database

  • Does anyone know how to connect with an external modem and AOL service?

    i just got the macbook yesterday and the modem came today, and i cannot figure out how to connect with an AOL account using the external modem. does anyone know how, or have the same problem??
    Macbook 1.83Ghz White   Mac OS X (10.4.7)  

    Hi MacMan2006! And Welcome To Discussions!
    Do you have the AOL software installed?
    When you open System Preferences > Network > Location: Automatic & at Show: is there an option to select External Modem?
    If so, is your Modem Model listed?
    ali b

  • Jdbc mysql using JNDI- org.apache.tomcat.dbcp.dbcp.SQLNestedException:

    Hi
    I am new to JNDI and i want to set up database connection using JNDI.
    I read the documentation at tomcat site and accordingly.
    Presently i m using-
    Tomcat 5.5
    MySQL 5.0.6
    this is my context.xml file under
    * $CATALINA_HOME/webapps/mywebsite/META-INF/web*
        <?xml version="1.0" encoding="UTF-8"?>
    <Context path="/myweb" docBase="myweb"
            debug="5" reloadable="true" crossContext="true">
      <Resource name="jdbc/myjndi" auth="Container" type="javax.sql.DataSource"
                   maxActive="100" maxIdle="30" maxWait="10000"
                   username="abc" password="abc" driverClassName="com.mysql.jdbc.Driver"
                   url="jdbc:mysql://localhost:3306/mydb"/>
    </Context>and this is my partial web.xml file under
    *$CATALINA_HOME/webapps/mywebsite/WEB-INF*
      <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      <description>MySQL Test App</description>
          <resource-ref>
              <description>DB Connection</description>
              <res-ref-name>jdbc/myjndi</res-ref-name>
              <res-type>javax.sql.DataSource</res-type>
              <res-auth>Container</res-auth>
           </resource-refI downloaded the mysql J/Connecter from mysql website and put it in the
    *$CATALINA_HOME/webapps/mywebsite/WEB-INF/lib*
    My sample jsp code to test the connectvity is
    <%!
       Connection conn=null;
       DataSource ds=null;
       Context ctx=null;
       Context envctx=null;
    %>
    <%
        ctx=new InitialContext();
        try{
                envctx=(Context)ctx.lookup("java:comp/env");
                ds=(DataSource)envctx.lookup("jdbc/myjndi");
                if(ds==null){
                       out.println("not found");
                else{
                    out.println("found");
                 conn=ds.getConnection();
                 //Class.forName("com.mysql.jdbc.Driver");
                 //conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/my","root","password");
                if(conn==null){
                     out.println("driver not found");
                else
                    out.println("driver class found");
           } catch(Exception e){
                out.println("Exception : "+e);
           Exception is coming when i run this page
    found Exception : org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
    Can you please tell me why this exception is coming.... i searched everywhere and tried all the things but could not get out of that
    Thanks in advance

    Thanks for the reply.......
    I put the mysql driver jar file to directory class path
    CLASSPATH=C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\mysql_driver.jar
    in my environment variables and also restarted the server but still same
    exception is coming. If i run simply using
    Class.forName("com.mysql.jdbc.Driver")
    then the exception is not coming...
    Thanks

  • Desperately seeking help. mod_jk problem with Apache 2.0.49 and Tomcat 4.1.

    Hi All,
    I am setting up the connection between Tomcat 4.1 and Apache 2.0.49 since past 3 days without success.
    I downloaded the
    JK 1.2
    JK 1.2 Binary Releases
    mod_jk_1.2.5_2.0.47.dll from apache site.(renamed it to mod_jk.dll as instructed). Now the problem is that after making the other settings in server.xml, httpd.conf,workers.properties
    My Tomcat does not show any error when i uncomment the following code
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                   port="8009" minProcessors="5" maxProcessors="75"
                   enableLookups="true" redirectPort="8443"
                   acceptCount="10" debug="0" connectionTimeout="20000"
                   useURIValidationHack="false"
                   protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
    which is the code for mod_jk2. I don't understand this as I have download the file for JK1.2.
    I am getting the mod_jk.conf file generated but it is generated with the following code.
    <IfModule !mod_jk.c>
      LoadModule jk_module C:/Program Files/Apache Group/Apache2/modules/mod_jk.dll
    </IfModule>
    JkWorkersFile "C:/Program Files/Apache Group/Tomcat 4.1/conf/jk/workers.properties"
    JkLogFile "C:/Program Files/Apache Group/Tomcat 4.1/logs/mod_jk.log"
    JkLogLevel info
    <VirtualHost localhost>
        ServerName localhost
        JkMount /admin ajp13
        JkMount /admin/* ajp13
        JkMount /webdav ajp13
        JkMount /webdav/* ajp13
        JkMount /examples ajp13
        JkMount /examples/* ajp13
        JkMount /tomcat-docs ajp13
        JkMount /tomcat-docs/* ajp13
        JkMount /manager ajp13
        JkMount /manager/* ajp13
    </VirtualHost>
    AGAIN , here I fail to understand why it is generating the jk_module with forward slash.
    (I HAVE GIVEN THE ps=/ property in worker.properties)
    Once I add the path in quotes i.e.
    LoadModule jk_module "C:/Program Files/Apache Group/Apache2/modules/mod_jk.dll"
    I am able to start the apache server. but am failing in the connection test ie. not able to view the examples directory.
    Plz. advise me , I am really going crazy over this stuff.
    Thanks in advance,
    Vishy.

    I am confused, you need to pick modjk2 or modjk.
    I would not use a precompiled modjk2.dll , I have and had security problems.
    I would compile it from source. The instructions are in the source package.
    If you use modjk, your on the right steps, modjk is more difficult to setup. than modjk2.
    For modjk2 all you need is
    LoadModule jk2_module C:/Program Files/Apache Group/Apache2/modules/mod_jk2.dll
    and the workers2.properties in /conf directory, that's it.
    Tomcat 4 and above come 'stock' with ajp workers turned on port 8009.
    First make sure modjk is loaded in Apache.
    Make sure all 30 lines of error page is uncommented on http.conf
    You can do this by http://servername/SOMEbogusAddress
    just go to apache page, then try and load a non-existing page
    You should see at bottom of page:
    Apache/2.0.49 (Unix) mod_jk2/2.0.4

Maybe you are looking for

  • Error in : Purchase order Creation using BAPI_PO_CREATE1

    Hell  guys, I am trying to create a PO using a BAPI - BAPI_PO_CREATE1 I want the new PO to have all the characteristics of an existing PO. whose PO # is  stored in wa_order_split_create-docnr and for the new PO, i want the quantity from wa_order_spli

  • Error while activating 0LIV_DS01

    Hi: While trting to activate business content DSO for MM Invoices 0LIV_DS01, I am getting folllwoing error. Application component DM of DataSource 80LIV_DS01 does not exist Message no. R8418 Diagnosis You tried to assign a DataSource to the applicati

  • Slow startup & shut down on new iPod Touch 4G but it takes 40 seconds to start!!

    Hello, Just bought a new iPod Touch 4G (32GB) two weeks ago and from day 1 it takes forever to start up!   Usually about 40 seconds to start up and 30 seconds to shut down.   My son's 8GB starts up right away.   I've been a longtime Apple customer, b

  • 2 Devices 1 Libary

    I have an iPhone and now an iPod Classic. My iPhone holds some of my music libary but i want my iPod Classic to hold EVERYTHING. (music, movies, movie trailers, music videos, photos, ect.) How do I sync everything to the ipod classic without syncing

  • Passing Parameters to Oracle Function

    Hi, I am very new to BI Publisher and have following concern, I have a Procedure in a Oracle Package which would return a Number, I need to use that as a Form field in my .RTF template, Could you please let me know whether I can use like this. <group