HRCastillo2009
|
Posted: January 16, 2010 06:42 by HRCastillo2009
|
|
1) How do I resolve uncaught exceptions? Every time I do searching in the Database, net Beans posted an null pointer exception. Then I traced the erro hen a click he Debug button. And it's stop in the Uncaught exception. 2) Why is it when I try to insert a new record on the table ane exception messages occur: Truncation error.. VARCHAR <blah> truncate to length 15. But he length of the corresponding field is 75-100 (VARChAR). thanks Hope you can help me |
UnCaught exceptions and trunckation error
Replies: 1 - Last Post: January 22, 2010 13:01
by: Sonny Gauran
by: Sonny Gauran
« Older Topic
» Newer Topic
showing 1 - 2 of 2
Sonny Gauran
|
Posted: January 22, 2010 13:01 by Sonny Gauran
|
|
Usually with NullPointerExceptions, it's always produced when you are accessing a reference that has not yet been initialized. Take for example, a Person.
public static void main(String[] args){
Person someone = null;
someone.setName("Last", "First", "Middle");
}
here, the NullPointerException will result since someone has not yet been initialized. In most cases, it's a needed object has not yet been created. Maybe the Connection in the DB has not yet been created with the use of the static method DB.connect(<params>)? As for the the truncation error, i'm not so sure how to answer that... maybe some other peeps here can help. =P (oracle guys perhaps? )
|
Replies: 1 - Last Post: January 22, 2010 13:01
by: Sonny Gauran
by: Sonny Gauran
« Older Topic
» Newer Topic


)





