XAMPP 1.7.2 conncetion via Tomcat plugin and MySQL

Problems with the Windows version of XAMPP, questions, comments, and anything related.

XAMPP 1.7.2 conncetion via Tomcat plugin and MySQL

Postby cpursley » 28. January 2010 05:52

Hi,

I am trying to connect to the MySQL database with XAMPP 1.7.2 using the Tomcat plugin. The JSP page that is doing the call gives an error on my connection statement:

20: Class.forName("com.mysql.jdbc.Driver").newInstance();
21: java.sql.Connection conn;
22: conn = DriverManager.getConnection(
23: "jdbc:mysql://localhost/booksread?user=netfuzzy&password=******");

Do I need to install Connector/J if so how do I do so?
cpursley
 
Posts: 2
Joined: 28. January 2010 05:45

Re: XAMPP 1.7.2 conncetion via Tomcat plugin and MySQL

Postby cpursley » 28. January 2010 21:33

type Exception report

message

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

exception

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 24 in the jsp file: /booksRead.jsp
Syntax error on token(s), misplaced construct(s)
21: Books Read <br><br>
22: <center>
23: <%!
24: Class.forName("com.mysql.jdbc.Driver").newInstance();
25: java.sql.Connection conn;
26: conn = DriverManager.getConnection(
27: "jdbc:mysql://localhost/netfuzzy_fuzzylogic?user=netfuzzy&password=5t39h3n");


An error occurred at line: 24 in the jsp file: /booksRead.jsp
Syntax error on token "forName", = expected after this token
21: Books Read <br><br>
22: <center>
23: <%!
24: Class.forName("com.mysql.jdbc.Driver").newInstance();
25: java.sql.Connection conn;
26: conn = DriverManager.getConnection(
27: "jdbc:mysql://localhost/netfuzzy_fuzzylogic?user=netfuzzy&password=5t39h3n");


An error occurred at line: 25 in the jsp file: /booksRead.jsp
Syntax error on token ";", , expected
22: <center>
23: <%!
24: Class.forName("com.mysql.jdbc.Driver").newInstance();
25: java.sql.Connection conn;
26: conn = DriverManager.getConnection(
27: "jdbc:mysql://localhost/netfuzzy_fuzzylogic?user=netfuzzy&password=5t39h3n");
28: %>


Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:312)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:299)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

note The full stack trace of the root cause is available in the Apache Tomcat/6.0-snapshot logs.
cpursley
 
Posts: 2
Joined: 28. January 2010 05:45


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 102 guests