Been at this for months and I cant understand why this is happening. I have tried several drivers and I keep getting strange errors and I was hoping someone could help me out. I am trying to develop a applet-servlet-sql connection. I have placed all the classes in a Domino 4.6.7 server the code im using works in Tomcat. I have placed streams throughout the program to catch errors. So when i do the following in the init()
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
myCon = DriverManager.getConnection
("jdbc:microsoft:sqlserver://999.99.99.9:9999;DatabaseName=x;User=x;Password=x");
no errors are thrown. But when I do the following
further in the program in the performTask()
PreparedStatement statement = myCon.prepareStatement(
"INSERT INTO login ([First_Name]) VALUES (?)");
java.lang.NullPointerException:
at t.ServeTwoServlet.performTask(ServeTwoServlet.java:101)
at t.ServeTwoServlet.doPost(ServeTwoServlet.java:31)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:278)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:330)
at COM.lotus.go.internal.InternalServletThread.run(InternalServletInvoker.java:396)
at COM.lotus.go.internal.InternalServletInvoker.executeServlet(InternalServletInvoker.java:280)
at COM.lotus.go.internal.InternalServletInvoker.service(InternalServletInvoker.java:202)
at COM.lotus.go.internal.ServletManager.service(ServletManager.java:453)
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
myCon = DriverManager.getConnection
("jdbc:microsoft:sqlserver://999.99.99.9:9999;DatabaseName=x;User=x;Password=x");
no errors are thrown. But when I do the following
further in the program in the performTask()
PreparedStatement statement = myCon.prepareStatement(
"INSERT INTO login ([First_Name]) VALUES (?)");
java.lang.NullPointerException:
at t.ServeTwoServlet.performTask(ServeTwoServlet.java:101)
at t.ServeTwoServlet.doPost(ServeTwoServlet.java:31)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:278)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:330)
at COM.lotus.go.internal.InternalServletThread.run(InternalServletInvoker.java:396)
at COM.lotus.go.internal.InternalServletInvoker.executeServlet(InternalServletInvoker.java:280)
at COM.lotus.go.internal.InternalServletInvoker.service(InternalServletInvoker.java:202)
at COM.lotus.go.internal.ServletManager.service(ServletManager.java:453)