?
Solved

http 500  error message

Posted on 2003-03-09
43
Medium Priority
?
901 Views
Last Modified: 2012-05-04
hello all:
i used tomcat4.1.18 as an application server , and i try to make adynamic pages by using jsp
and i make acoonection to mysql database
but when i want to view my jsp it give me this error HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: org.gjt.mm.mysql.Driver
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      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:260)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
      at java.lang.Thread.run(Thread.java:536)


root cause

javax.servlet.ServletException: org.gjt.mm.mysql.Driver
      at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
      at org.apache.jsp.TMP2dxaqbh7af_jsp._jspService(TMP2dxaqbh7af_jsp.java:111)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
      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:260)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
      at java.lang.Thread.run(Thread.java:536)



--------------------------------------------------------------------------------

Apache Tomcat/4.1.18

---------------------------------------------------------------------------------
can u tell me how can i solve this problem
thanks
0
Comment
Question by:dalia_xp
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 22
  • 21
43 Comments
 
LVL 3

Expert Comment

by:NetWize
ID: 8101168
I think the problem is that your mysql.jar with the mysql-driver is not on the classpath.

add it to common/lib or (i prefer that) to $JAVA_HOME/jre/lib/ext/

Hope it helps,

Jan
0
 

Author Comment

by:dalia_xp
ID: 8101329
hello:
i do that but it is the same problem
also i add mysql-connector-java-3.1.0-alpha.jar to tomcat lib $tomcat4.1/common/lib/
and i put that in the classpath
but it still the same problem
plz can u tell me how i can solve that
thankx all
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8101376
coudl you please paste you .jsp (scriptlet-parts)? Do you have other *.jsp working?

Is test.jsp working: ?

<% System.out.println("Hello"); %>
<html><body><h1>Hello</h1></body></html>

0
Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

 

Author Comment

by:dalia_xp
ID: 8101575
hello:
there is no other jsp working and test.jsp is working also
this is my jsp

<%@ page contentType="text/html; charset=windows-1252" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="Connections/dd.jsp" %>
<%
Driver Drivermyfirst = (Driver)Class.forName(MM_dd_DRIVER).newInstance();
Connection Connmyfirst = DriverManager.getConnection(MM_dd_STRING,MM_dd_USERNAME,MM_dd_PASSWORD);
PreparedStatement Statementmyfirst = Connmyfirst.prepareStatement("SELECT *  FROM reg");
ResultSet myfirst = Statementmyfirst.executeQuery();
boolean myfirst_isEmpty = !myfirst.next();
boolean myfirst_hasData = !myfirst_isEmpty;
Object myfirst_data;
int myfirst_numRows = 0;
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>

<body>

<table width="356" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="132" height="33" valign="top">Name</td>
    <td width="147" valign="top"><%=(((myfirst_data = myfirst.getObject("name"))==null || myfirst.wasNull())?"":myfirst_data)%></td>
    <td width="77">&nbsp;</td>
  </tr>
  <tr>
    <td height="30" valign="top">address</td>
    <td valign="top"><%=(((myfirst_data = myfirst.getObject("addre"))==null || myfirst.wasNull())?"":myfirst_data)%></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="33" valign="top">Day </td>
    <td valign="top"><%=(((myfirst_data = myfirst.getObject("day"))==null || myfirst.wasNull())?"":myfirst_data)%></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="127">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
<%
myfirst.close();
Statementmyfirst.close();
Connmyfirst.close();
%>
0
 

Author Comment

by:dalia_xp
ID: 8101592
hello:
there is no other jsp working and test.jsp is working also
this is my jsp

<%@ page contentType="text/html; charset=windows-1252" language="java" import="java.sql.*" errorPage="" %>
<%@ include file="Connections/dd.jsp" %>
<%
Driver Drivermyfirst = (Driver)Class.forName(MM_dd_DRIVER).newInstance();
Connection Connmyfirst = DriverManager.getConnection(MM_dd_STRING,MM_dd_USERNAME,MM_dd_PASSWORD);
PreparedStatement Statementmyfirst = Connmyfirst.prepareStatement("SELECT *  FROM reg");
ResultSet myfirst = Statementmyfirst.executeQuery();
boolean myfirst_isEmpty = !myfirst.next();
boolean myfirst_hasData = !myfirst_isEmpty;
Object myfirst_data;
int myfirst_numRows = 0;
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>

<body>

<table width="356" border="0" cellpadding="0" cellspacing="0">
  <!--DWLayoutTable-->
  <tr>
    <td width="132" height="33" valign="top">Name</td>
    <td width="147" valign="top"><%=(((myfirst_data = myfirst.getObject("name"))==null || myfirst.wasNull())?"":myfirst_data)%></td>
    <td width="77">&nbsp;</td>
  </tr>
  <tr>
    <td height="30" valign="top">address</td>
    <td valign="top"><%=(((myfirst_data = myfirst.getObject("addre"))==null || myfirst.wasNull())?"":myfirst_data)%></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="33" valign="top">Day </td>
    <td valign="top"><%=(((myfirst_data = myfirst.getObject("day"))==null || myfirst.wasNull())?"":myfirst_data)%></td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td height="127">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
</body>
</html>
<%
myfirst.close();
Statementmyfirst.close();
Connmyfirst.close();
%>
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8101612
Hi.
The only thing that's different from what I'd expected is the line

Driver Drivermyfirst = (Driver)Class.forName(MM_dd_DRIVER).newInstance();


Could you try to replace this with:

Class.forName(MM_dd_DRIVER);

1st: You don't need the Drivers instance, that is created by Drivermanager.
2nd: If the Driver-Class doesn't have a default constructor that call will fail.
0
 

Author Comment

by:dalia_xp
ID: 8101660
hi:
this is my connection file dd.jsp
this file created by dreamweaver to make connection to mysql database

<%
String MM_dd_DRIVER = "org.gjt.mm.mysql.Driver";
String MM_dd_USERNAME = "";
String MM_dd_PASSWORD = "";
String MM_dd_STRING = "jdbc:mysql://localhost/menagerie";
%>
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8101693
that looks ok. have you tried modify that Class.forName() line?
0
 

Author Comment

by:dalia_xp
ID: 8101716
hi:
yes i do that but it is the same problem
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8101752
OK, so maybe it's an connection problem. Is your "normal" access to mysql working?

Maybe you try a dummy-class

test.java

public class test {
  public static void main(String args) {
    try {
      //Your DB-Connection-Code here
    } catch(Exception e) {
      e.printStackTrace();
    }
  }
}

And check if your DB is responding right.
0
 

Author Comment

by:dalia_xp
ID: 8101907
ok i write the program as an servlet and i compile it it working with out problem this is my servlet program

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.sql.*;

public class test extends HttpServlet
{

public void doGet (HttpServletRequest req, HttpServletResponse resp)
throws ServletException, java.io.IOException
{
resp.setContentType("text/html");
java.io.PrintWriter out = new java.io.PrintWriter(resp.getOutputStream());
String sqlStatement ="SELECT * FROM reg";
String driverName ="org.gjt.mm.mysql.Driver";
String connectionURL ="jdbc:mysql://localhost/menagerie";
Connection con = null;
Statement stmt = null;
ResultSet rs = null;

try
{
 Class.forName(driverName).newInstance();
 con = DriverManager.getConnection(connectionURL);
 stmt = con.createStatement();
 variable rs
 rs = stmt.executeQuery(sqlStatement);

}
catch (Exception e)
{
 out.println(e);
}

out.println("<html>");
out.println("<head>");
out.println("<title>Contents of the  Database</title>");
out.println("</head>");
out.println("<center><h3>Contents of the  Database</h3></center>");

try
{

    if(rs.next()){
    ResultSetMetaData rsmd = rs.getMetaData();
    int colCount = rsmd.getColumnCount();
    String name;
    String addre;
    out.println("<center><table border>");
    out.println("<tr>");
    for (int i = 0; i < colCount; i++) {
    out.println("<th>" + rsmd.getColumnLabel(i + 1) +"</th>");
    }
    out.println("</tr>");
    do {
    out.println("<tr>");
    name = rs.getString(1);
    addre = rs.getString(2);
    out.println("<td>" + name + "</td>");
     out.println("<td>"+ addre + "</td>");
    out.println("</tr>");
    }while (rs.next());
    out.println("</table></center>");
    }
    else{
    out.println("No records could be found");
    }
}
catch(Exception e)
{
 out.println(e);
}
out.println("</body>");
out.println("</html>");
out.flush();

try{
    if (con != null){
 con.close();
}
}
catch(Exception e) {
 out.println(e);
}

}
}


when i try to browse it it give me the error message
HTTP Status 404 - /subscriber/test

-----------------------------------------------------------

type Status report

message /subscriber/test

description The requested resource (/subscriber/test) is not available.


--------------------------------------------------------------------------------
apatche Tomcat/4.1.18
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8101937
Yes. That again is a problem of you web.xml or alternatively the InvokerServlet of Tomcat. Add this to

WEB-INF/web.xml

<servlet>
 <servlet-name>test</servlet-name>
 <servlet-class>test</servlet-class>
</servlet>
<servlet-mapping>
 <servlet-name>test</servlet-name>
 <uri-pattern>/test</uri-pattern>
</servlet-mapping>

is your test.class in WEB-INF/classes ?

The simple class with main() would be easier I think:

java -classpath mysql.jar;. test
0
 

Author Comment

by:dalia_xp
ID: 8101961
this is my web.xml file

<?xml version="1.0" encoding="UTF-8" ?>
   <!DOCTYPE web-app
       PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
        "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
   <web-app>
        <display-name>Hello World Application</display-name>
        <description>
        This is the Hello World application written in Java
        based on the recommendations of the Application Developer's Guide.
        </description>

        <servlet>
                <servlet-name>test</servlet-name>
                <servlet-class>test</servlet-class>
        </servlet>
       

       <servlet-mapping>
               <servlet-name>test</servlet-name>
               <url-pattern>/test</url-pattern>
               
        </servlet-mapping>

       
   </web-app>
------------------------------
also my test.class in web-inf/classes


0
 
LVL 3

Expert Comment

by:NetWize
ID: 8101975
then it's supposed to work...
Very strange behavior.

But as your original problem was in the jsp maybe you could just figure out if the DB-Connection is working in some way. As the error message says "org.gjt.mm.mysql.Driver" it most probably lies somewhere in the DB-Connection
0
 

Author Comment

by:dalia_xp
ID: 8101984
this is my web.xml file

<?xml version="1.0" encoding="UTF-8" ?>
   <!DOCTYPE web-app
       PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
        "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
   <web-app>
        <display-name>Hello World Application</display-name>
        <description>
        This is the Hello World application written in Java
        based on the recommendations of the Application Developer's Guide.
        </description>

        <servlet>
                <servlet-name>test</servlet-name>
                <servlet-class>test</servlet-class>
        </servlet>
       

       <servlet-mapping>
               <servlet-name>test</servlet-name>
               <url-pattern>/test</url-pattern>
               
        </servlet-mapping>

       
   </web-app>
------------------------------
also my test.class in web-inf/classes


0
 
LVL 3

Expert Comment

by:NetWize
ID: 8102007
and please use the "reload question" link in to pleft corner... hitting reload reposts your comments.
0
 

Author Comment

by:dalia_xp
ID: 8102013
hi:
i belive that is strange behavior
i try to make aconnection to my DB from the dreamweaver and it give me this message
" connection was made successfully"
and when i try an test page on the dreamweaver it works ok , but when i try to browse the result by using tomcat it give me the error above
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8102039
hm. that really is strange. Maybe dreamweaver is lying about username and password?
I'm out of ideas. I think you really should try that standalone-java-app to be sure that the connection-code works in "normal" Java VM.
0
 

Author Comment

by:dalia_xp
ID: 8102101
ok i try standalone-java-app to try the connection and it give me this message:

java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

java.lang.NullPointerException
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8102243
ah. so either your mysql.jar is not in the jre\lib\ext of your java-vm or you are using a different java than you thought.

what is "java -fullversion" telling you?

and if you do a set | more, have you set a JAVA_HOME ?
0
 

Author Comment

by:dalia_xp
ID: 8102308
i used JDK1.4 and the driver (mysql-connector-java-3.1.0-alpha.jar ) in the jre\lib\ext of my java VM
and i defined Java_Home in the envirment variable
                         C:\j2sdk1.4.0
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8102357
I don't get it. The Class HAS TO be in your classpath when the jar is added to lib/ext... at least that's the Specification... Beats me.

Could you try with jar on command-line-classpath?

java -classpath mysql-connector-java-3.1.0-alpha.jar;. test

If that doesn't work then

1) Classname is wrong (spelled correctly?) or
2) Classname is wrong (MySQL-Driver has changed in name for that alpha-release)

You could unzip the jar and see if that Driver class is in there

jar -xvf mysql-connector-java-3.1.0-alpha.jar
0
 

Author Comment

by:dalia_xp
ID: 8102501
i make unzip for jar -xvf mysql-connector-java-3.1.0-alpha.jar
also i am sure that the driver not change in name also this driver is exist
\mysql-connector-java-3.1.0-alpha\org\gjt\mm\mysql\driver.class

but what do u mean by this sorry i can't catch this command
java -classpath mysql-connector-java-3.1.0-alpha.jar;. test
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8102532
That is a command for executing the test-class (stand-alone-application) from command line.

use this test.java:

import java.sql.*;
import java.io.*;

public class test {
 public static void main(String[] args) {
   try {
     Class.forName("org.gjt.mm.mysql.Driver");
     Connection c = DriverManager.getConnection(
       "jdbc:mysql://localhost/menagerie"
     );
   } catch(Exception e) {
     e.printStackTrace();
   }
  }
}

compile this with

javac test.java
gives you the file test.class

copy the mysql-connector-java-3.1.0-alpha.jar to the same directory

now execute java by hand:
java -classpath .;mysql-connector-java-3.1.0-alpha.jar test

0
 

Author Comment

by:dalia_xp
ID: 8102595
i give me this error

C:\>java -classpath .;mysql-connector-java-3.1.0-alpha.jar test
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
        at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:130)
        at test.main(test.java:7)

C:\>
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8102659
If that's the case then I can't believe that the .jar-file really contains a class with that name.

could you please send me the output of:

jar -tf mysql-connector-java-3.1.0-alpha.jar

0
 
LVL 3

Expert Comment

by:NetWize
ID: 8108834
also i am sure that the driver not change in name also this driver is exist
\mysql-connector-java-3.1.0-alpha\org\gjt\mm\mysql\driver.class

that's what you wrote me... and you're using "Driver.class" (capital D) in your source !!!

java is case-sensitive, so that might be the Problem!!!
0
 

Author Comment

by:dalia_xp
ID: 8109175
ok this is the out put


C:\>jar -tf mysql-connector-java-3.1.0-alpha.jar
META-INF/
META-INF/MANIFEST.MF
clover/
mysql-connector-java-3.1.0-alpha/
mysql-connector-java-3.1.0-alpha/com/
mysql-connector-java-3.1.0-alpha/com/mysql/
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/util/
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/webapp/
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/webapp/images/
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/webapp/style/
mysql-connector-java-3.1.0-alpha/lib/
mysql-connector-java-3.1.0-alpha/lib-nodist/
mysql-connector-java-3.1.0-alpha/org/
mysql-connector-java-3.1.0-alpha/org/gjt/
mysql-connector-java-3.1.0-alpha/org/gjt/mm/
mysql-connector-java-3.1.0-alpha/org/gjt/mm/mysql/
mysql-connector-java-3.1.0-alpha/testsuite/
mysql-connector-java-3.1.0-alpha/testsuite/perf/
mysql-connector-java-3.1.0-alpha/testsuite/regression/
mysql-connector-java-3.1.0-alpha/testsuite/simple/
mysql-connector-java-3.1.0-alpha/build.xml
mysql-connector-java-3.1.0-alpha/CHANGES
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/AssertionFailedException.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/AssertionFailedException.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Blob.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Blob.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/BlobFromLocator.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/BlobFromLocator.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Buffer.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Buffer.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/CharsetMapping.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/CharsetMapping.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Clob.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Clob.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/CompressedInputStream.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/CompressedInputStream.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Connection$UltraDevWorkAround.cl
ass
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Connection.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Connection.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/DatabaseMetaData.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/DatabaseMetaData.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Debug.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Debug.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Driver.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Driver.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/EscapeProcessor.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/EscapeProcessor.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/EscapeTokenizer.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/EscapeTokenizer.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Field.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Field.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/LogicalHandle.cla
ss
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/LogicalHandle.jav
a
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/MysqlConnectionPo
olDataSource.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/MysqlConnectionPo
olDataSource.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.c
lass
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/MysqlDataSource.j
ava
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/MysqlDataSourceFa
ctory.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/MysqlDataSourceFa
ctory.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnec
tion.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/jdbc2/optional/MysqlPooledConnec
tion.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/MiniAdmin.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/MiniAdmin.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/MysqlDefs.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/MysqlDefs.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/MysqlIO.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/MysqlIO.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/NamedPipeSocketFactory$NamedPipe
Socket.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/NamedPipeSocketFactory$RandomAcc
essFileInputStream.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/NamedPipeSocketFactory$RandomAcc
essFileOutputStream.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/NamedPipeSocketFactory.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/NamedPipeSocketFactory.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/NotImplemented.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/NotImplemented.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/NotUpdatable.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/NotUpdatable.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/OutputStreamWatcher.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/OutputStreamWatcher.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/PacketTooBigException.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/PacketTooBigException.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/PreparedStatement$BatchParams.cl
ass
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/PreparedStatement$EndPoint.class

mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/PreparedStatement.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/PreparedStatement.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/ResultSet.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/ResultSet.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/ResultSetMetaData.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/ResultSetMetaData.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/RowData.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/RowData.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/RowDataDynamic$OperationNotSuppo
rtedException.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/RowDataDynamic.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/RowDataDynamic.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/RowDataStatic.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/RowDataStatic.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Security.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Security.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/ServerPreparedStatement$BindValu
e.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/ServerPreparedStatement.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/ServerPreparedStatement.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/SingleByteCharsetConverter.class

mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/SingleByteCharsetConverter.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/SocketFactory.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/SocketFactory.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/SQLError.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/SQLError.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/StandardSocketFactory.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/StandardSocketFactory.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Statement.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Statement.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/StringUtils.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/StringUtils.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/TimeUtil.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/TimeUtil.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/UpdatableResultSet.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/UpdatableResultSet.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/util/TimezoneDump.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/util/TimezoneDump.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Util$RandStructcture.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Util.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/Util.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/WatchableOutputStream.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/WatchableOutputStream.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/WatchableWriter.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/WatchableWriter.java
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/webapp/images/mysql-logo.png
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/webapp/style/style.css
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/WriterWatcher.class
mysql-connector-java-3.1.0-alpha/com/mysql/jdbc/WriterWatcher.java
mysql-connector-java-3.1.0-alpha/COPYING
mysql-connector-java-3.1.0-alpha/lib/jdbc2_0-stdext.jar
mysql-connector-java-3.1.0-alpha/lib/jta-spec1_0_1.jar
mysql-connector-java-3.1.0-alpha/mysql-connector-java-3.1.0-alpha-bin.jar
mysql-connector-java-3.1.0-alpha/org/gjt/mm/mysql/Driver.class
mysql-connector-java-3.1.0-alpha/org/gjt/mm/mysql/Driver.java
mysql-connector-java-3.1.0-alpha/README
mysql-connector-java-3.1.0-alpha/testsuite/BaseTestCase.class
mysql-connector-java-3.1.0-alpha/testsuite/BaseTestCase.java
mysql-connector-java-3.1.0-alpha/testsuite/perf/BasePerfTest.class
mysql-connector-java-3.1.0-alpha/testsuite/perf/BasePerfTest.java
mysql-connector-java-3.1.0-alpha/testsuite/perf/LoadStorePerfTest.class
mysql-connector-java-3.1.0-alpha/testsuite/perf/LoadStorePerfTest.java
mysql-connector-java-3.1.0-alpha/testsuite/perf/RetrievalPerfTest.class
mysql-connector-java-3.1.0-alpha/testsuite/perf/RetrievalPerfTest.java
mysql-connector-java-3.1.0-alpha/testsuite/regression/MetaDataRegressionTest.cla
ss
mysql-connector-java-3.1.0-alpha/testsuite/regression/MetaDataRegressionTest.jav
a
mysql-connector-java-3.1.0-alpha/testsuite/regression/NumbersRegressionTest.clas
s
mysql-connector-java-3.1.0-alpha/testsuite/regression/NumbersRegressionTest.java

mysql-connector-java-3.1.0-alpha/testsuite/regression/ResultSetRegressionTest.cl
ass
mysql-connector-java-3.1.0-alpha/testsuite/regression/ResultSetRegressionTest.ja
va
mysql-connector-java-3.1.0-alpha/testsuite/regression/StatementRegressionTest.cl
ass
mysql-connector-java-3.1.0-alpha/testsuite/regression/StatementRegressionTest.ja
va
mysql-connector-java-3.1.0-alpha/testsuite/regression/StringRegressionTest.class

mysql-connector-java-3.1.0-alpha/testsuite/regression/StringRegressionTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/BlobTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/BlobTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/ConnectionTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/ConnectionTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/DataSourceTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/DataSourceTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/DateTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/DateTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/EscapeProcessingTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/EscapeProcessingTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/MetadataTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/MetadataTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/MiniAdminTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/MiniAdminTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/NumbersTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/NumbersTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/SSLTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/SSLTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/StatementsTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/StatementsTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/TimeTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/TimeTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/TransactionTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/TransactionTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/TraversalTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/TraversalTest.java
mysql-connector-java-3.1.0-alpha/testsuite/simple/UpdatabilityTest.class
mysql-connector-java-3.1.0-alpha/testsuite/simple/UpdatabilityTest.java

C:\>
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8109279
com/mysql/jdbc/Driver.class

THAT IS YOUR DRIVER CLASS !!!

not any org.gjt.mm.mysql...

Why did you tell me that org.gjt.mm.mysql.Driver was in your jar file and that the names havn't changed if it's not and they did?

I guess Dreamweaver has a jar with the OLD mysql-driver in it that's why it's working in DW and not in your jsp!!!

0
 

Author Comment

by:dalia_xp
ID: 8109328
this is my Drivers

mysql-connector-java-3.1.0-alpha/org/gjt/mm/mysql/Driver.class
mysql-connector-java-3.1.0-alpha/org/gjt/mm/mysql/Driver.java

plz take alook again to the jar file
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8109358
Yeah I see that it's there, but I bet as soon as you use the com.mysql.jdbc.Driver it will be working...
0
 

Author Comment

by:dalia_xp
ID: 8109371
i try it and it give me this error

C:\>java -classpath .;mysql-connector-java-3.1.0-alpha.jar test
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver.class
        at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:130)
        at test.main(test.java:7)

C:\>
0
 

Author Comment

by:dalia_xp
ID: 8109387
sorry this is the error

C:\>java -classpath .;mysql-connector-java-3.1.0-alpha.jar test
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
        at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:130)
        at test.main(test.java:7)

C:\>
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8109403
Ahrgh... I was blind, sorry.

That mysql...jar of yours needs to be extraced with
jar -xf mysql...  

After tht copy the

mysql-connector-java-3.1.0-alpha-bin.jar

into JAVA/jre/lib/ext...

that jar your using is not an application-jar but only an archive wich contains source & binaries in a SUBDIRECTORY (/mysql-connector-java-3.1.0-alpha/). For a jar to work

the entries should have looked like

com/mysql/
org/gjt/mm/

and not like
mysql-connector-java-3.1.0-alpha/com/mysql/

to be sure: check the contents of that mysql-connector-java-3.1.0-alpha-bin.jar with jar -tf mysql-connector-java-3.1.0-alpha-bin.jar and see that the entries are com/mysql/...

Where did you get that jar from...?
0
 

Author Comment

by:dalia_xp
ID: 8109424
i download it from
http://mmmysql.sourceforge.net/
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8109438
to be honest i only found a .zip and a .tar.gz there...

0
 

Author Comment

by:dalia_xp
ID: 8109457
yes i convert it .jar is that case the problem
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8111420
Have you managed to get your connection running?
0
 

Author Comment

by:dalia_xp
ID: 8118027
what did u mean
0
 
LVL 3

Expert Comment

by:NetWize
ID: 8118047
Is your problem solved, now that you use the "right" jar?

0
 

Author Comment

by:dalia_xp
ID: 8118180
i was using it .jar but it doesn't work as i told u
0
 
LVL 3

Accepted Solution

by:
NetWize earned 200 total points
ID: 8118554
Haven't you read my comments? You were using the wrong jar. You SHOULD be using the

mysql-connector-java-3.1.0-alpha-bin.jar

Jar which is INSIDE your
mysql-connector-java-3.1.0-alpha.jar

Extract the jar wich
jar -xf mysql-connector-java-3.1.0-alpha.jar

and copy the
mysql-connector-java-3.1.0-alpha/mysql-connector-java-3.1.0-alpha-bin.jar
into the jre/lib/ext

Your problem was that you created a jar from the zip you downloaded from mysql
0
 

Author Comment

by:dalia_xp
ID: 8125813
thankx NetWize for helping me to solve the problem
thankx alot
0

Featured Post

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question