History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CASTOR-639
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Werner Guttmann
Reporter: Martin Fuchs
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Nullpointer Exception for nullable multiply-column keys with activated logging

Created: 10/Jan/04 01:20 AM   Updated: 18/Apr/05 10:55 PM
Component/s: JDO
Affects Version/s:
Fix Version/s: None

Time Tracking:
Not Specified

Operating System: All
Platform: PC

Bugzilla Id: 1500

 Description  « Hide

I sent you a patch for a NullPointer Exception problem that occured for me when
using castor JDO with multiply-column keys and activated logging.

There are some columns null in some rows I retreive from the DB. Well, may be
this only works for me because I use read-only access for this class.

This shows the Java code I used: (all real names changed)

OQLQuery oql = jdo_db.getOQLQuery(
"select distinct col1, col2, col3, col4, col5 "+
"from VIEW1 "+
"order by 1, 2, 3, 4 "+
"AS Classname"

QueryResults results = oql.execute(Database.ReadOnly);

And this is shows the mapping definition:

<class name="Classname" identity="col1 col2 col3 col4 col5">
<map-to table="VIEW1"/>

<field name="col1" type="string" required="true" direct="true">
<sql name="COLUMN1" type="char"/>

<field name="col1" type="string" required="true" direct="true">
<sql name="COLUMN2" type="char"/>

<field name="col3" type="string" required="false" direct="true">
<sql name="COLUMN3" type="char"/>

<field name="col4" type="string" required="false" direct="true">
<sql name="COLUMN4" type="char"/>

<field name="col5" type="string" required="false" direct="true">
<sql name="COLUMN5" type="char"/>

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Martin Fuchs - 10/Jan/04 01:20 AM
Created an attachment (id=371)
Bugfix for the Nullpointer Bug

Werner Guttmann - 23/Jan/04 03:52 AM
Applied supplied patch, making small amendments to the code so that a situation
where a member is null is dealt with in a more informative way.

Martin Fuchs - 19/Oct/04 11:21 AM
OK, let's also close this.