Forums Register Login

These errors are driving me crazy

+Pie Number of slices to send: Send
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)
+Pie Number of slices to send: Send
at the point where the code is throwing the error, the connection must have been reset to null(or never set at all). Don't have the rest of your code, so it's hard to help you with that kind of error( if it's not too long, post it ).
+Pie Number of slices to send: Send
Hey John where is the myCon object declared. Is it in that method, or outside where the performTask method has visibility of that object.
The reason we say this is because it is easy to see that at that last line the myCon variable is set to null.
Mark
It means our mission is in jeapordy! Quick, read this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 736 times.
Similar Threads
java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
getting error
out of Heap Space
Read a .xls,.xlsx file format using XSSF
Please Help!!!
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 20:47:34.