Errors With Solutions

Common Errors

1. Null Pointer Exception at line…..
: - Follow below points
- Check line number at which null pointer occur
- Apply break point on line (before of Null pointer line no.)e.g. at 23 null pointer is occurred. apply break point at 22
- By debugging check which value is null. it may be variable or Object containing Null value.

2. Array out of bound exception …
: - Follow below points
- This error occurred if we are accessing arrays value before giving or initializing array.
- Or if you are accessing array location greater than of declared size of arrays.

3. Address already in use: JVM Bind –Server Error
: - This error is occurred during server startup and due that server is unable to start.
- This Cause due to your server is already running or started and you are starting again.
- To resolve this problem stop server from where it is started or just restart your machine.

4. Driver class not Found Exception –JDBC error
: - Make sure you have added mysql.jar file into java build path properly.
For web project put mysql.jar in lib folder and then add to build path always. Instead of adding into build path directly.

5. Bad version in .class File
: - This error is occurred. If you are running class on one jdk version. and that class is compiled from different jdk version.
: - This error is also occurred in web project running on server. at that time ensure that jre of project and jre of tomcat server is must be same.