Java : Java related items, personal opinions, coding, etc.
Updated: 2/2/2004; 2:41:46 PM.

 

Subscribe to "Java" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Monday, January 06, 2003

I love coding, but sometimes it's frustrating as hell.  Today was one of those days.  Castor JDO is a great tool, but it's lack of appropriate error messages is a killer.  If I had the time, I'd help them put more descriptive error messages in their code.  That wouldn't be too hard to do. 

Java coders, if you have spare time go lend the Castor JDO project a hand.  Put some descriptive error messages and documentation in!


6:29:14 PM    comment []

AAAARRRRRGGGGHHHHH!  I've been working on a problem with Castor JDO 0.9.4.1 for several hours now.  I have a class that represents a simple table.  It has 3 columns, one of which is a char(1) in my database.  I am mapping that in to a String in my Java class.

The problem that I've been having is that I wanted to tread the char(1) column as a boolean with getLock and isLock accessor methods but really store it as a String behind the scenes.  However, Castor JDO doesn't like that at ALL!  I had to change the code so that it was using getLock and setLock with the appropriate String types.  It took me FOREVER to figure that out, because I didn't realize it was a problem with the class.  Castor JDO apparently looks at every class in the mapping file at the time it loads its configuration and not just when the class is first used. 

The problem showed up in my application as a NullPointerException right after I loaded the configuration with JDO.loadConfiguration(). 


4:07:22 PM    comment []

If you use JDO Castor 0.9.3.x, and you specify in your mapping file that a column is a primary key, you better make sure that it has a primary key index on it in your database.  If not, JDO will fail with a NullPointerException!


11:35:55 AM    comment []

© Copyright 2004 Tom Pierce.



Click here to visit the Radio UserLand website.

 


January 2003
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
Dec   Feb

Search

 
How this works

Emacs Sources
 tsql-indent.el
 user-add-sql-folding-marks
 remove-line-boundary-in-region
 convert-camel-to-underscore

My Subscriptions
 Funny
 KM