I want to create a Registration Servlet allowing a user to type in their details and save it to a mySQL database. Below are all the classes i have used. the Registration Servelt is throwing an SQlException shown below.
} catch (SQLException se) {
out.println("<p>There has been a problem creating your account. Please contact the site administrator via email to <a href=\"mailto:admin@sfikjfdk.com\">this address</a></p>");
out.println("<p>SQL Error executing query='"+query+"'");
}

My question is how can I fix it to make my servlet work, ive tried everything i could think of.

/*
* RegistrationServlet.java
*
* Created on 2 September 2005, 20:04
*/

import java.io.*;
import java.net.*;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.SQLException;
import javax.servlet.*;
import javax.servlet.http.*;

/**
*
* @author Trixxma
* @version
*/
public class RegistrationServlet extends HttpServlet {

/** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
* @param request servlet request
* @param response servlet response
*/
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet ReservationServlet</title>");
out.println("</head>");
out.println("<body>");
out.println("<h1>Account Creation</h1>");

//Get parameters for new user record
String firstname = request.getParameter("firstname");
String lastname = request.getParameter("lastname");
String email = request.getParameter("email");
String username = request.getParameter("uname");
String password = request.getParameter("password");
String query = "INSERT INTO Users VALUES ('"+username+"','"+password+"','"+firstname+"','"+lastname+"','"+email+"')";
// write the user to the selected database
try {
Connection conn = DataManager.getInstance().getConnection();
Statement stmt = conn.createStatement();
stmt.execute(query);
User newUser = new User(username, firstname, lastname, email);
// add the user to the session and redirect to the menu
request.getSession().setAttribute("user", newUser);
// response.sendRedirect("tipping");
} catch (SQLException se) {
out.println("<p>There has been a problem creating your account. Please contact the site administrator via email to <a href=\"mailto:admin@sfikjfdk.com\">this address</a></p>");
out.println("<p>SQL Error executing query='"+query+"'");
}
out.println("</body>");
out.println("</html>");
out.close();
}

// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
/** Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

/** Handles the HTTP <code>POST</code> method.
* @param request servlet request
* @param response servlet response
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}

/** Returns a short description of the servlet.
*/
public String getServletInfo() {
return "Short description";
}
// </editor-fold>
}

/*
* User.java
*
* Created on 2 September 2005, 20:33
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/

/**
*
* @author Trixxma
*/
public class User {
private String userName, firstName, lastName, email;

/** Creates a new instance of User */
public User(String userName, String firstName, String lastName, String email) {
this.setFirstName(firstName);
this.setLastName(lastName);
this.setUserName(userName);
this.setEmail(email);
}

public String getUserName() {
return userName;
}

public void setUserName(String userName) {
this.userName = userName;
}

public String getFirstName() {
return firstName;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getLastName() {
return lastName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}

public void setEmail(String email){
this.email = email;
}

public String getEmail(){
return email;
}
}

/*
* DataManager.java
*
* Created on 28 August 2005, 18:30
*
* To change this template, choose Tools | Options and locate the template under
* the Source Creation and Management node. Right-click the template and choose
* Open. You can then make changes to the template in the Source Editor.
*/

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ResourceBundle;

public class DataManager {
ResourceBundle rb;

private DataManager() {
rb = ResourceBundle.getBundle("database");
this.loadDriver();
}

public void loadDriver() {
try {
new com.mysql.jdbc.Driver();
Class.forName(rb.getString("jdbc.driver")).newInstance();
} catch (Exception e) {
System.out.println(e.getMessage());
}
}

public Connection getConnection() throws SQLException {
return DriverManager.getConnection(
rb.getString("jdbc.url"),
rb.getString("jdbc.username"),
rb.getString("jdbc.password"));
}

public static DataManager getInstance() {
return new DataManager();
}

// method to test connection
public static void main(String args[]) {
try {
DataManager dm = new DataManager();
dm.getConnection();
System.out.println("DataManager is working correctly");
} catch (SQLException sqle) {
System.out.println(sqle.getMessage());
}
}

}

CREATE DATABASE movie;
USE movie;
CREATE TABLE Users (
uname VARCHAR(15) NOT NULL UNIQUE,
password VARCHAR(15) NOT NULL,
admin BOOLEAN,
firstname VARCHAR(20),
lastname VARCHAR(30) );