File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Error while creating database connection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Error while creating database connection" Watch "Error while creating database connection" New topic
Author

Error while creating database connection

yunuss khan
Greenhorn

Joined: Apr 22, 2006
Posts: 17
Hi All,

i want to retreive records from database but error is coming when i am executing the code..

pls help..

My code is :


===================
Error is Coming...

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

java.lang.NullPointerException
org.apache.jsp.prac.email_jsp._jspService(email_jsp.java:69)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.



Thanks & Regards,
Yunus

[ December 14, 2006: Message edited by: Bear Bibeault ]
[BPSouther: Added UBB Code Tags]
[ December 14, 2006: Message edited by: Ben Souther ]
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

Check this DriverManager.getConnection Java Doc


Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410



The generated servlet source code for Tomcat is under the:
{tomcat install}/work/Catalina/localhost/org/apache/jsp
directory.

Find the file listed above and see what on line 69 is throwing a NullPointerException.

Also:
"pls" is not a word in the English language.
Please see:
http://faq.javaranch.com/view?UseRealWords
to see why we make such a big stinkin deal of this.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Error while creating database connection