I'm currently building a database app where the web app sits on Applications Server 9.1 and after a user fills in a form it the information is sent to a MySql database.
When I press submit I get a java.lang.NullPointerException. I have placed the driver in the jre/lib/ext folder and the code for connecting to the database is as follows:
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/pd206",
"root", "password");
} catch (ClassNotFoundException e) {
System.out.println("Class still not found");
} catch (SQLException e) {
System.out.println("SQL Exception in init");
}
The system is currently working on a local machine and is not expected to go onto a full network until later in the year.
Can somebody please help?
When I press submit I get a java.lang.NullPointerException. I have placed the driver in the jre/lib/ext folder and the code for connecting to the database is as follows:
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/pd206",
"root", "password");
} catch (ClassNotFoundException e) {
System.out.println("Class still not found");
} catch (SQLException e) {
System.out.println("SQL Exception in init");
}
The system is currently working on a local machine and is not expected to go onto a full network until later in the year.
Can somebody please help?