Bugzilla Version 2.16.7
Bugzilla Bug 1500
  Nullpointer Exception for nullable multiply-column keys with activated logging
     Query page      Enter new bug
Bug#: 1500   Platform:   Reporter: martin-fuchs at gmx dot net (Martin Fuchs)
Product:   OS:   Add CC:
Component:   Version:   CC:
Remove selected CCs
Status: CLOSED   Priority:  
Resolution: FIXED   Severity:  
Assigned To: werner dot guttmann at gmx dot net (Werner Guttmann)   Target Milestone:  

Attachment Type Modified Status Actions
Bugfix for the Nullpointer Bug patch 2004-01-10 01:20 none Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 1500 depends on: Show dependency tree
Show dependency graph
Bug 1500 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments:

Reopen bug

View Bug Activity   |   Format For Printing

Description: Opened: 2004-01-10 01:20


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"/>

------- Additional Comment #1 From Martin Fuchs 2004-01-10 01:20 -------
Created an attachment (id=371)
Bugfix for the Nullpointer Bug

------- Additional Comment #2 From Werner Guttmann 2004-01-23 03:52 -------
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.

------- Additional Comment #3 From Martin Fuchs 2004-10-19 11:21 -------
OK, let's also close this.

     Query page      Enter new bug
This is Bugzilla: the Mozilla bug system. For more information about what Bugzilla is and what it can do, see bugzilla.org.
Actions: New | Query | bug # | Reports   New Account | Log In