org.apache.jasper.JasperException: java.lang.NullPointerException HTTP Status 500 – org.apache.jasper.JasperException: java.lang.NullPointerException

The issue why Java thrown this exception is you have an database error connection. Simple as your user and password is wrong or just the name of your database doesn’t match.

Check your database properties.

Connection connection;
public void dbConnection(){
try{
Class.forName(“org.apache.derby.jdbc.EmbeddedDriver”);

}catch(ClassNotFoundException e){e.printStackTrace();}
try{
connection = DriverManager.getConnection(“jdbc:derby://localhost:1527/accommodation”,”admin”,”admin”);
}catch(SQLException e){e.printStackTrace(); System.out.println(“Error connection DB”);}

}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s