Hi Albert,

Yes, there is actually a value for CRDESC.
When I ran the query directly against the database I can see the value.
However, I have to type "set long 256" to see all of the value, else
it will truncate because of datatype LONG.  It doesn't make any sense
to me why the error says: "nullpointerexception".

Thanks,
Tyla

-----Original Message-----
From: Albert Wong [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 19, 2000 1:24 PM
To: [EMAIL PROTECTED]
Subject: Re: DESPERATELY SEEKING HELP: "full description error:
java.lang .Nul lPointer Exception"


Does the CRDESC column actually have a value for that particular record?
Even if you get a resultset back, the individual field itself may be blank.

The best thing to do is do a println of your sql query.  Then run it against
the database using a query tool (for example, if your using Oracle, you
could use SQLPlus).

It seems likely your CRDESC column is blank.  Using getString() on a long
value would more likely cause a ClassCastException than a
NullPointerException.

Albert

-----Original Message-----
From: Suon, Thla [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 19, 2000 11:38 AM
To: [EMAIL PROTECTED]
Subject: DESPERATELY SEEKING HELP: "full description error:
java.lang.Nul lPointer Exception"


-----Original Message-----
From: Suon, Thla [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 18, 2000 9:18 AM
To: [EMAIL PROTECTED]
Subject: Please Help with: "full description error:
java.lang.NullPointer Exception"


Greetings Everyone,

I have a very annoying problem and can't seem to solve it for 3 days now.
Any help from you guys would be greatly appreciated.  I think I am having
this problem because one of tables has a column called CRDESC of datatype
LONG.
I used:
"oracle.jdbc.driver.OracleStatement
ostmt=(oracle.jdbc.driver.OracleStatement)stmt;
ostmt.defineColumnType(2,Types.VARCHAR);" but it is giving me all kinds of
problem.  I put in a debug statement inside called "
System.out.println("inside");"
and have learned that it doesn't get further than that.  It never print out
another
debug statement I put in called "System.out.println("full_crdesc:
"+full_crdesc);"  So suspect there is a problem with the getString?   Please
help....thanks.

Tyla

============please see program below=====================

try {
  int i = 0;
  int i_total = 0;
  String full_rel = "";
  rs = stmt.executeQuery("SELECT
release,platform,status,to_char(fixdate,'Mon
       dd,yyyy')fixdate,to_char(clsdate,'Mon dd,yyyy')
       clsdate,clsby,fldrelease,urgency from scars.strstat where strnr="
+strnum
       +"order by release");
  while(rs.next()) {
    release[i] = rs.getString("release");
    platform[i] = rs.getString("platform");
    status[i] = rs.getString("status");
    String fixdate = rs.getString("fixdate");
   }//end while

   for (i_counter = 0; i_counter < i_total; i_counter++) {
     try {
       rs = stmt.executeQuery("SELECT crseqnum from
            scars.strstat where strnr="+strnum +" and release="+"'"+release
            [i_counter]+"'"+" and platform="+"'"+platform[i_counter]+"'"+"
and
            status="+"'"+status[i_counter]+"'");
            while(rs.next()){
               crseqnum =rs.getInt(1);
            }
       }//end try
       catch (Exception ex) {
          System.out.println("closing/routing error: "+ex.toString());
        }

       full2_crdesc = " < Release # "+platform[i_counter]+"&nbsp"+
                      release[i_counter]+" >";
       out.print(full2_crdesc);
       for(int cr = 1; cr <= crseqnum; cr++) {
         oracle.jdbc.driver.OracleStatement ostmt=
         (oracle.jdbc.driver.OracleStatement)stmt;
         ostmt.defineColumnType(2,Types.VARCHAR);
         rs= stmt.executeQuery("SELECT crdesc from scars.closeroute where
             strnr="+strnum +"and crseqnum="+cr +"
             and platform="+"'"+platform[i_counter]+"'"+" and
release="+"'"+release
             [i_counter]+"'");
         while (rs.next()) {
            full_crdesc = "";
            System.out.println("inside");
            String crdesc = rs.getString("CRDESC");
            System.out.println("crdesc: " +crdesc);
            full_crdesc = full_crdesc + "\n"+"\n"+crdesc;
            System.out.println("full_crdesc: "+full_crdesc);
            out.print(full_crdesc);
          }//end while
        }//end for loop
        out.print("\n");
        out.print("__________________________________________");
        out.print("\n");
    }//end i_counter for loop
    out.print("</textarea>");
    out.print("<br>");
    }// end outside try
    catch (Exception ex) {
      System.out.println("full description error: " +ex.toString());
    }

thank you,
Tyla
___________________________________________________________________________
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

___________________________________________________________________________
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

___________________________________________________________________________
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

___________________________________________________________________________
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

Reply via email to