Java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver...the same old pr

Hi,
I am a new user in this forum..
I have just installed tomcat and mysql and jdbc fresh on my new system..
first of all here is what i have done...
i have installed mysql integrated in xampp at c:\xampp\mysql
i have installed my tomcat at C:\Programme\Apache Software Foundation\Tomcat 5.5
i have put jdbc <dirver>.jar file copied in all sorts of directories like ....
<tomcat_home>\common\lib
<tomcat_home>\webapps\axis\WEB-INF\lib\ext
<java_home>\lib
<java_home>\jre\lib\ext
my calsspath looks something like this
.;C:\Programme\QuickTime\QTSystem\QTJava.zip;C:\Programme\"Apache Software Foundation"\"Tomcat 5.5"\common\lib\mysql-connector-java-5.0.6-bin.jar;C:\Programme\"Apache Software Foundation"\"Tomcat 5.5"\webapps\axis\WEB-INF\lib\mysql-connector-java-5.0.6-bin.jar;C:\Programme\"Apache Software Foundation"\"Tomcat 5.5"\common\lib\servlet-api.jar;C:\Programme\"Apache Software Foundation"\"Tomcat 5.5"\common\lib\jsp-api.jar;C:\Programme\Java\jdk1.5.0_05\jre\lib\ext\mysql-connector-java-5.0.6-bin.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\activation.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\axis.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\axis-ant.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\commons-discovery-0.2.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\commons-logging-1.0.4.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\jaxrpc.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\log4j-1.2.8.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\mail.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\saaj.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\wsdl4j-1.5.1.jar;C:\Programme\Apache Software Foundation\Tomcat 5.5\webapps\axis\WEB-INF\lib\mysql-connector-java-5.0.6-bin.jar
which is basically all the jar files in the web-inf\lib folder and references to all the copies of driver as mentioned before
these are results of a lot of desperatio but still the code which i run....
package mypackage;
import java.sql.*;
public class JDBCConnector
public static void main(String[] arg) throws Exception
     System.out.println("Initiating Database Mysql Connection");
     //try {
               Statement stmt;
                    //     Register the JDBC driver for MySQL.
               Class.forName("org.gjt.mm.mysql.Driver ").newInstance();
                    //     Define URL of database server for
                    // database named mysql on the localhost
                    //      with the default port number 3306.
               String url = "jdbc:mysql://wifh-1.fhso.ch:3306/";
                    //          Get a connection to the database for a
                    // user named root with a blank password.
                    // This user is the default administrator
                    // having full privileges to do anything.
               Connection con = DriverManager.getConnection(url,"root", "birnExy");
                    //Display URL and connection information
               System.out.println("URL: " + url);
               System.out.println("Connection: " + con);
                    //Get a Statement object
               stmt = con.createStatement();
                    //     Create the new database
               stmt.executeUpdate("CREATE DATABASE JunkDB3");
                    //Register a new user named auser on the
                    // database named JunkDB with a password
                    // drowssap enabling several different
                    // privileges.
               stmt.executeUpdate("GRANT SELECT,INSERT,UPDATE,DELETE," +"CREATE,DROP " +"ON JunkDB3.* TO 'nishant'@'localhost' " +"IDENTIFIED BY 'nishant';");
               con.close();
     //}catch( Exception e ) {
          //     e.printStackTrace();
     //}//end catch
          //return hook;
     }//end main
}//end class JDBCConnector
gives the following error.....
<soapenv:Envelope>
&#8722;
     <soapenv:Body>
&#8722;
     <soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
&#8722;
     <faultstring>
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
</faultstring>
&#8722;
     <detail>
<ns1:hostname>SADMC0087</ns1:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
please help me

20.05.2007 22:43:26 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Programme\Java\jdk1.5.0_05\jre\bin;.;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Programme\QuickTime\QTSystem\;C:\Programme\ATI Technologies\ATI Control Panel;C:\Programme\Java\jdk1.5.0_05\bin;C:\Programme\Apache Software Foundation\Tomcat 5.5\common\lib;
20.05.2007 22:43:27 org.apache.coyote.http11.Http11BaseProtocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
20.05.2007 22:43:27 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1203 ms
20.05.2007 22:43:27 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
20.05.2007 22:43:27 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.5.23
20.05.2007 22:43:27 org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
20.05.2007 22:43:28 org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive SIpages.war
20.05.2007 22:43:31 org.apache.coyote.http11.Http11BaseProtocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
20.05.2007 22:43:31 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
20.05.2007 22:43:31 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/109 config=null
20.05.2007 22:43:31 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
20.05.2007 22:43:32 org.apache.catalina.startup.Catalina start
INFO: Server startup in 4813 ms
now this is when i run from eclipse where SIpages.war is my war file to be deployed...which looks something like this
sipages/web-inf/classes
sipages/web-inf/src
sipages/web-inf/lib-this has the jar file as you mentioned
and come other files...nwo where soes my .java file go in this war and how do i compile the java file

Similar Messages

  • Java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

    hi
    I am facing followig error.
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    How to set the class path.
    I am using Windows XP, NetBeans IDE 5.5, MySQL-5.0
    I have made one simple servlet program in order to read one small table from the MySQL database.
    I got the connectivity but above error is i have been facing.
    Please tell me how to write to set the class path and where should i put my mysql-connector-java-5.0.4-bin file. so i can read the data from the database.
    thanking you.
    regards
    discuss.

    hi
    I am facing followig error.
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    How to set the class path.
    I am using Windows XP, NetBeans IDE 5.5, MySQL-5.0
    I have made one simple servlet program in order to read one small table from the MySQL database.
    I got the connectivity but above error is i have been facing.
    Please tell me how to write to set the class path and where should i put my mysql-connector-java-5.0.4-bin file. so i can read the data from the database.
    thanking you.
    regards
    discuss.

  • Java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver when using RMI

    I am trying to connect to mysql Db through RMI but i am getting this exception.
    When trying to connect to db through a normal class implementation without RMI it is connected succesfully.
    What is causing the problem????
    Thanks in advace

    CLASSPATH, man. The RMI server needs to have the MySQL driver JAR in its CLASSPATH.
    That's usually what that exception means.
    %

  • Including org.gjt.mm.mysql.Driver with my application

    So, lets say I have a Java program that connects to an SQL server and it runs fine on my machine. I have all the nessicarry classpath's and Connector/J properly installed. But, when I run it on a client machine I get:
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.DriverNow, I can solve this issue by putting the Connector/J onto their computer but, I'm wondering if there's a way to package the application and the driver so that anyone can run it without having to install Connector/J manually.
    Any help would be much appreciated.
    Thanks!

    JonasWon wrote:
    So, lets say I have a Java program that connects to an SQL server and it runs fine on my machine. I have all the nessicarry classpath's and Connector/J properly installed. But, when I run it on a client machine I get:
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    That's the old, deprecated JDBC driver class name.
    Now, I can solve this issue by putting the Connector/J onto their computer but, I'm wondering if there's a way to package the application and the driver so that anyone can run it without having to install Connector/J manually.
    Any help would be much appreciated.
    Thanks!"install" it manually? Nobody "installs" a 3rd party JAR. These aren't quite DLLs.
    I'll assume your app is a desktop deployment. Package it into an executable JAR, add the Connector/J JAR to the Classpath in the manifest, and zip that JAR up with the Connector/J JAR. Your users will just unzip the ZIP file and execute the JAR.
    %

  • Org.gjt.mm.mysql.Driver not found help!!

    hi all
    it's the first time for me working with MySql, and when i try to connect to the db, i have the following exception:
    java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    i know that i shall download it from Mysql site, but i don't know WHERE to put it
    i'm using forte 3.0 - jdk 1.4.0 on Win2K
    please help me!
    thanx
    sandro

    No problem,
    in general you should modify the CLASSPATH of your JDK to point to the jar-driver-file, e.g. (on unix): CLASSPATH = "someDirectory"\driverFIle.jar:$CLASSPATH
    and then: export CLASSPATH. That should solve your problem. if using windows: Just take a look at systemControlCenter. There it's possible to modify the CLASSPAT-environment.
    So far...

  • Driver class 'org.gjt.mm.mysql.Driver' not Found JSP

    OS ->Windows XP Pro
    Tomcat version ->4.0.1
    jdk version -> 1.3.1
    database -> mysql
    Classpath = .;C:\jakarta-tomcat-4.0.1\common\lib\servlet.jar;C:\jakarta-tomcat-4.0.1\common\lib\mm.mysql.jdbc-1.2c\mysql_uncomp.jar;
    I am trying to run a function in a javabean to startup up a connection to a database. Code as follows...
    public void connect() throws ClassNotFoundException,
    SQLException,
    Exception {
    try {
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    con = DriverManager.getConnection(
    "jdbc:mysql://localhost/Wrox ?user=root&password=lunchbox ");
    } catch (ClassNotFoundException cnfe) {
    error = "ClassNotFoundException: Could not locate DB driver.";
    throw new ClassNotFoundException(error);
    } catch (SQLException cnfe) {
    error = "SQLException: Could not connect to database.";
    throw new SQLException(error);
    } catch (Exception e) {
    error = "Exception: An unknown error occurred while connecting " +
    "to database.";
    throw new Exception(error);
    I call it from my jsp page code as follows.. connect in bold
    <%@ page language="java"
    import="java.sql.*, java.io.*, java.util.*, com.wrox.databases.*"
    errorPage="error.jsp" %>
    <jsp:useBean id="book" class="com.wrox.databases.Books" />
    <html>
    <head>
    <title> Wrox Press Ltd. </title>
    </head>
    <body>
    <h1> Wrox Press Ltd.</h1>
    <h2> List of Books </h2>
    <b>Add More Books</b>
    <form action="delete.jsp" method="post">
    <table border="1">
    <tr>
    <td><b>ID:</b></td>
    <td><B>Title:</b></td>
    <td><B>Price:</b></td>
    </tr>
    <%
    book.connect();
    ResultSet rs = book.viewBooks();
    while (rs.next()) {
    %>
    <tr>
    <td>
    <input type="checkbox" name="pkey"
    value="<%= rs.getString("Title_ID") %>" />
    </td>
    <td><%= rs.getString("Title") %></td>
    <td><%= rs.getString("Price") %></td>
    </tr>
    <%
    %>
    </table>
    Check books for deletion.<BR>
    <input type="submit" value="Delete All Checked Books">
    </form>
    <% book.disconnect(); %>
    </body>
    </html>
    The name of the bean is correct and so is the package it is stored under. I tried it in the bean and got "ClassNotFoundException" Could not locate DB driver". I tried it with DBtags and got
    Driver class 'org.gjt.mm.mysql.Driver' not Found
    any help would be really appreciated.

    When using any 3rd party library with tomcat. the jar file of that library has to be put in the WEB-INF/lib directory of your application. Then only tomcat will find it.
    So the my-sql driver would have come in a jar file. just put that jar file in the WEB-INF/lib directory.
    After that things should work. If they don't please post again.
    hope this helps.
    regards,
    Abhishek.

  • Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'

    Hi,
    I'm trying to run my web app and connect to a MySQL database but keep getting this error:
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver'
    any ideas?
    Thanks!

    Lookup the stacktrace and find the root cause of the exception.
    My cents on a ClassNotFoundException which is rather self-explaining.
    By the way, the mentioned driver class name is a very old driver. You shouldn't be using that anymore. Surf to the MySQL homepage and download the most recent Connector/J JDBC driver for your database version. Documentation is also available over there.

  • JSF/Tiles: [java.lang.ClassNotFoundException: org.apache.tiles.servlets.Til

    Hi,
    I am working on JSF1.2 in SAP NetWeaver CE and I am using Tiles. Please help me to resolve the following issues.
    ~~~~~~~~~~~~~~~~~~~
    1. File:G:\ws_wd\ce_ws.jdi\LocalDevelopment\DCs\demo.sap.com\lbsjsf\ear\_comp\gen\default\deploy\demo.sap.com~lbsjsf~ear.ear
         Name:lbsjsf~ear
         Vendor:demo.sap.com
         Location:localDevelopment
         Version:20090402105707
         Deploy status:Warning
         Version:NEW
         Description:
              1. Warning occurred on server 4585250 during deploy demo.sap.com/lbsjsf~ear : Web Class Existence Test: servlet class "org.apache.tiles.servlets.TilesServlet" cannot be found in the application class path. Possible reasons: 1) package or class name not correct; 2) missing referenced component (application or library); 3) missing reference to component (application or library)., file: demo.sap.com~lbsjsf~web.war#WEB-INF/web.xml, column 0, line 0, severity: warning
    Warning occurred on server 4585250 during deploy demo.sap.com/lbsjsf~ear : Web Class Existence Test: The servlet "com.cg.lbs.ui.controller.StartupConfigurationServlet" must implement "javax.servlet.Servlet"., file: demo.sap.com~lbsjsf~web.war#WEB-INF/web.xml, column 0, line 0, severity: warning
              2. Warning exception has been returned while the 'demo.sap.com/lbsjsf~ear' was starting. Warnings:
    Warning occurred on server 4585250 during startApp demo.sap.com/lbsjsf~ear : Cannot load servlet [org.apache.tiles.servlets.TilesServlet]. Error is: [java.lang.ClassNotFoundException: org.apache.tiles.servlets.TilesServlet
    ------------------------- Loader Info -------------------------
    ClassLoader name: [demo.sap.com/lbsjsf~ear]
    Living status: alive
    Direct parent loaders:
    [system:Frame]
    [service:servlet_jsp]
    [service:ejb]
    Resources:
    F:\usr\sap\CE1\J00\j2ee\cluster\apps\demo.sap.com\lbsjsf~ear\servlet_jsp\lbsjsf\root\WEB-INF\classes
    ++++++++++++++below is my web.xml+++++++++
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID" version="2.5">
         <display-name>
              LocalDevelopment~LocalDevelopment~lbsjsf(2fweb~demo.sap.com
         </display-name>
         <filter>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <filter-class>
                   org.apache.myfaces.webapp.filter.ExtensionsFilter
              </filter-class>
              <init-param>
                   <param-name>maxFileSize</param-name>
                   <param-value>20m</param-value>
              </init-param>
         </filter>
         <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
              <servlet-name>Faces Servlet</servlet-name>
         </filter-mapping>
         <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
         </filter-mapping>
         <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
         <filter-mapping>
              <filter-name>MyFacesExtensionsFilter</filter-name>
              <url-pattern>*.jsf</url-pattern>
         </filter-mapping>
         <servlet>
              <servlet-name>Tiles Servlet</servlet-name>
              <servlet-class>
                   org.apache.tiles.servlets.TilesServlet
              </servlet-class>
              <init-param>
                   <param-name>definitions-config</param-name>
                   <param-value>/WEB-INF/tiles.xml</param-value>
              </init-param>
              <load-on-startup>3</load-on-startup>
         </servlet>
         <servlet>
              <servlet-name>Faces Servlet</servlet-name>
              <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
              <load-on-startup>2</load-on-startup>
         </servlet>
         <servlet>
              <servlet-name>StartupConfiguration</servlet-name>
              <servlet-class>
                   com.cg.lbs.ui.controller.StartupConfigurationServlet
              </servlet-class>
              <init-param>
                   <param-name>log4j-init-file</param-name>
                   <param-value>sswblog4j.xml</param-value>
              </init-param>
              <load-on-startup>1</load-on-startup>
         </servlet>
         <servlet-mapping>
              <servlet-name>Faces Servlet</servlet-name>
              <url-pattern>*.faces</url-pattern>
         </servlet-mapping>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
         </welcome-file-list>
    </web-app>

    That's a pretty decent error message. Have you eliminated the potential causes which were listed in the message?

  • Java.lang.ClassNotFoundException: org.apache.jasper.servlet.JspServlet

    Hi,
    I am developping a simple portlet.These are all my files..
    TestPortlet.java,
    context.xml
    liferay-display.xml
    liferay-portlet.xml
    porltet.xml
    web.xml
    But when i am trying execute i am getting this error. Any one can help?
    Help would be greatly appreciated.
    Thanks
    Prasad
    Feb 9, 2009 4:01:31 PM com.liferay.portal.kernel.log.Jdk14LogImpl error
    SEVERE: Portal class loader is not available to override the default Catalina web class loader
    Feb 9, 2009 4:01:31 PM org.apache.catalina.core.ApplicationContext log
    INFO: Marking servlet jsp as unavailable
    Feb 9, 2009 4:01:31 PM org.apache.catalina.core.ApplicationContext log
    SEVERE: Error loading WebappClassLoader
    delegate: false
    repositories:
    /WEB-INF/classes/
    org.apache.jasper.servlet.JspServlet
    java.lang.ClassNotFoundException: org.apache.jasper.servlet.JspServlet
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Feb 9, 2009 4:01:31 PM org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /PortalExample1 threw load() exception
    java.lang.ClassNotFoundException: org.apache.jasper.servlet.JspServlet
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
    at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
    at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
    at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

    So what are the contents of the relevant files?
    It looks like an error at Tomcat startup:
    Do you need any Portlet library jar files in your web app?
    However I would suggest that you would have more luck at the other end of a google search on the error message.
    The [Liferay wiki |http://www.liferay.com/web/guest/community/wiki] seems a good place to start.

  • Help. JDBCRealm error -- org.gjt.mm.mysql.Driver not found

    Hi All,
    I tried to setup JDBCRealm. After I config. to JDBCRealm and restart tomcat. I got this error:
    java.sql.SQLException: org.git.mm.mysql.Driver error.
    Can someone help. Thanks

    web-inf/lib is not sufficient in this case, as the Tomcat engine needs access to the driver - not just your application.
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#JDBCRealm
    You need to
    Place a copy of the JDBC driver you will be using inside the $CATALINA_HOME/server/lib directory (if you do not need it visible to web applications) or $CATALINA_HOME/common/lib (if it will be used both by Tomcat 4 and by your apps).
    Cheers.
    evnafets

  • Org.gjt.mm.mysql.Driver

    I want to send a WAR file of my web applications to my clients. The application consiting of servlets and jsps connects to a database and requires org.gjt.mm.mysql.Driver how do i incorperate the .jar inside the WAR so my client doesn't have to fiddle with dropping jars in tomcats lib directory? I've tried including the org.gjt.mm.mysql.Driver driver jar inside the war WEB-INF/lib but it still says it cant find the driver?

    If you have set up connection pooling within Tomcat, there is no way around it. The connection pooling is controlled by Tomcat, so it requires the driver file in [TOMCAT]/common/lib.
    The only way to have a completely independant WAR file would be to handle all the database connections and connection pooling yourself within the web application.

  • Java.lang.ClassNotFoundException: org.apache.log4j.Logger

    I got below error tried to load the first JSP in JDeveloper 11g. The log4j library is defined in the project. There is not compilation error. Please help!
    ava.lang.NoClassDefFoundError: org/apache/log4j/Logger
         at jsp_servlet.__index._jspService(__index.java:98)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         Truncated. see log file for complete stacktrace

    Did you read this part there:
    There is a second possible issue that is specific to the commons-logging and related libraries when used with Integrated WLS and the configuration (which includes ADF) out-of-the-box. Because the commons-logging.jar is apparently in the system classpath, due to the way Java classloader delegation works, any log4j classes at the web application level are not visible to the logger factory by default. As long as this is the case, you may need to add the following to your web-application's WEB-INF/weblogic.xml:
    <container-descriptor>
    <prefer-web-inf-classes>true</prefer-web-inf-classes>
    </container-descriptor>
    What this does is tell the WLS JSP servlet to let web application classes override classes found in the system classloader. Standard Java classloader delegation gives the highest priority to the system classes.

  • Root exception is java.lang.ClassNotFoundException: org.apache.naming.java.

    Hi, All
    From where i can get .jar file which should have org.apache.naming.java.javaURLContextFactory class ..
    Thank You,

    Hi, All
    From where i can get .jar file which should have org.apache.naming.java.javaURLContextFactory class ..
    Thank You,

  • Org.gjt.mm.mysql.Driver under tomcat?

    hi all
    anybody knows where to put this driver under tomcat in order to let my servlet connect to a MySql db?
    thanx all
    sandro

    sandro
    Put the driver on "lib/common/" directory of Tomcat, and since lib is directly located by tomcat when you restart it. You must have to restart the tomcat after copying the file. The folder path may be "/var/tomcat/lib/commomn/" and may vary during installation.
    Cheers
    Rahul//

  • Java.lang.ClassNotFoundException:   net.sourceforge.jtds.jdbc.Driver

    Help!
      I've created a simple program that should connect to a client of mine using jdbc.  I was given the driver class which I have imported and added to my build path.  I deploy the application and it errors saying it cannot find the class.  Here is the code:
    public void wdDoInit()
        //@@begin wdDoInit()
        IWDMessageManager mm = wdThis.wdGetAPI().getComponent().getMessageManager();
        String host = "host";
        int port = 1433;
        String SID = "hostsid";
        String user = "username";
        String pass = "pwd";
        String driver_class = "net.sourceforge.jtds.jdbc.Driver"; 
        String access = "jdbc:jtds:sqlserver://" + host + ":1433" + "/" + SID;
        Connection con;
         try
          try
            Driver driver = (Driver)Class.forName(driver_class).newInstance();
           } catch (Exception e)
            mm.reportWarning("msg = " + e.toString());
          con = DriverManager.getConnection(access, user, pass);
        } catch (SQLException e)
          mm.reportWarning("Error: " + e.getMessage());

    Hi Steve,
    Put jar file with JDBC driver to lib folder under your WD project and it will be included to wda and ear files.
    BTW, may be it is beeter to register driver and datasource instead of using direct connect to DB? See how to register data source http://help.sap.com/saphelp_nw04/helpdata/en/b0/6e62f30cbe9e44977c78dbdc7a6b27/frameset.htm
    Best regards, Maksim Rashchynski.

Maybe you are looking for