Struts Struts2 Struts 2 Mysql,
April 15, 2009 at 1:32 AM
Hi All, Even I got the same null pointer exception as sahas and pavel. I am using NetBeans IDE 6.1 and did the below things: 1)I downloaded the mysql-connector-java-3.0.16-ga-bin.jar file 2)I have included that jar file in the libraries. 3)Also for safer side, I have set the Class path in the environment variable as C:\Program Files\Java\jre1.6.0_03\lib\ext/mysql-connector-java-3.0.16-ga-bin.jar 4)Then in the above insert.java code, I have removed the statement //String driverName = "org.gjt.mm.mysql.Driver"; instead I placed the following code: String driverName = "com.mysql.jdbc.Driver";
Hopefully this should help u guys..It works fine for me. If it works for u guys, pls post and update in this site itself..SO that it will be helpful for me to suggest others too.
View All Comments
| View Tutorial