Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    1

    Red face Unanswered: Need some help in JDBC and stored procedures

    Hi All,
    i m not so sure if this the right place to write this message but i hope i can get some help from here.So, i have a procedure like this :

    CREATE OR REPLACE procedure hello
    is
    begin
    htp.htmlOpen;
    htp.bodyOpen;
    htp.p('hello world');


    htp.bodyClose;
    htp.htmlClose;
    end;
    /


    and i m trying to execute it using java, which has the part fo surce code shown below:


    try {
    CallableStatement cs = conn.prepareCall("{call " + req + "}");
    cs.execute();
    ResultSet rs = cs.getResultSet();
    //pout.print("geliyor");
    pout.print(rs.getString(1));
    rs.close();
    }
    catch (Exception e) { pout.print("<html><title>Error Page</title></html>"+e); }


    the error and also output is supposed to be seen on the browser window, so do not be surprised. The "req" above is the variable that holds the name of the procedure.

    and this is the error that i got:

    java.lang.NullPointerException

    I do not know how to handle this thing, that is why i hope to find some help from here.

    Have a nice day.

  2. #2
    Join Date
    Sep 2003
    Posts
    19
    Let me see the contents of req.
    Let me see how your defining pout
    Let me see the full stack trace on the nullpointer exception.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •