Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 29th, 2004, 06:46 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default Pls help for JDBC in Servlet

Pls look into this problem when I run class as application using main method it is updating the record into table
but When I call thru the servlet Post method there is a problem.

line 55 String insStr = "Insert into G_Customer values(?, ?, ?)";
line 56 conn = getOracleConnection();
line 57 pStmnt = conn.prepareStatement(insStr);


twice it produced the error as NoClassFound, but after restarting

only the following error:


java.lang.NullPointerException
    at dao.CustomerDao.CustomerInsert(CustomerDao.java:57 )
    at servlet.CustomerDataInput.doPost(CustomerDataInput .java:113)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
    at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invokeNext(StandardPipeline.j ava:643)
    at org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:191)
.
.
.
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:223)
    at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:594)
    at org.apache.coyote.http11.Http11Protocol$Http11Conn ectionHandler.processConnection(Http11Protocol.jav a:392)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(P oolTcpEndpoint.java:565)
    at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:619)
    at java.lang.Thread.run(Thread.java:534)


Thanks,
Gokul

__________________
Gokulan E
 
Old August 5th, 2004, 12:27 AM
Friend of Wrox
 
Join Date: Jul 2004
Posts: 345
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to gokul_blr Send a message via Yahoo to gokul_blr
Default

The problem was rectified
Added the class12.jar file to lib folder






Similar Threads
Thread Thread Starter Forum Replies Last Post
JDBC 4.0 billfly BOOK: Professional Java, JDK 6 Edition ISBN: 978-0-471-77710-6 2 February 11th, 2007 10:53 AM
help needed in jdbc in servlet parthcpn Servlets 1 January 16th, 2006 12:23 AM
JSP, Servlet & JDBC Cycle gokul_blr BOOK: Beginning Java 2 1 July 28th, 2004 11:35 AM
Cannot load JDBC driver class with com.mysql.jdbc. dzis Apache Tomcat 0 January 29th, 2004 11:57 AM
Cannot load JDBC driver class with com.mysql.jdbc. dzis MySQL 0 January 29th, 2004 11:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.