I agree with Rohit,
I've not done anything in JSP, but I see from the code that you've posted that you
create a Properties object, and don't store it anywere !
Sriram
4/26/01 10:20:01 AM, Rohit Parik <[EMAIL PROTECTED]> wrote:
>Comeon do some homework....
>Why are u asking to be spoon fed.
>
>The basics say .. u got an exception put a try catch the print the stack...
>
>put your entire code into a try catch
>
>something like..
> try{
>
>//your entire code.
>...
>..
>}
>catch(Exception err)
>{
> err.printStackTrace(System.out); //or any device u want the error dumped
>into
> System.out.println(err.getMessage());
>}
>
>This would give u a detailed description of your error. Then u can track it
>down... if u still cant then post the error message to this forum ..
>
>Regards
>Rohit Parik
>Netweb Software, India
>
>----- Original Message -----
>From: Charu Gupta
>To: [EMAIL PROTECTED]
>Sent: Thursday, April 26, 2001 6:58 AM
>Subject: another weblogic conection pool problem,please help
>
>
>Hi,
>I am working on a jsp application which has oracle database at the backend.
>I am trying to get a connection from the connection pool but am getting the
>following compilation error which I can not resolve, please help(I have
>pasted my jsp code after the error message.)
>
>ERROR:
>Servletimages: init
>Servlet failed with Exception java.lang.Null Pointer Exception
>
>
>JSP code:
>
><%!
>
>
> Driver poolDriver = null;
> Properties props = null;
>
> public Connection getConnection()
> {
> Connection conn = null;
> try
> {
> if(poolDriver == null)
> {
>
>poolDriver=(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
> props = new Properties();
> props.put("connectionPoolID", "oraclePool");
> }
> }
> catch(Exception ex)
> {
> return null;
> &am! p;nb! sp; }
> try
> {
> conn = poolDriver.connect("weblogic.jdbc.pool.Driver",props);
> }
> catch(SQLException ex)
> {
> return null;
> }
> return conn;
> }
> %>
> <%
>
>
> Connection tconn = getConnection();
> Statement stmt = tconn.createStatement();
> ResultSet rset = stmt.executeQuery("select * from po_user");
>
> while(rset.next())
> {
>
> %>
> <TR><TD><%= rset.getString("USER_PASS") %>
> </TD></TR>
> <%
> }
> stmt.close();
> tconn.close();
>
>%>
>
>
>
>
>
>Thanks.
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html