db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bobby Lawrence (JIRA)" <j...@apache.org>
Subject [jira] Created: (OJB-30) Check for null object in array
Date Fri, 22 Apr 2005 20:17:23 GMT
Check for null object in array

         Key: OJB-30
         URL: http://issues.apache.org/jira/browse/OJB-30
     Project: OJB
        Type: Improvement
  Components: PB-API  
    Versions: 1.0.x CVS    
 Environment: Windows XP, JVM 1.4.2
    Reporter: Bobby Lawrence
    Priority: Minor

It took me a while to figure out why I was getting this null pointer exception, but eventually,
I did...

java.lang.NullPointerException at org.apache.ojb.broker.core.proxy.ProxyHelper.getRealClass

I have a persistent object that has a 1:n relationship with another object.  This is represented
by an array of objects inside the "parent".

In my code, I was setting the array size to 2 for instance, but I was only placing one into
the array.

The ProxyHelper class saw a size of 2, but when it tried to get the second one out, it got
a null.

Is it possible to check for a null object when we are persisting the collection?

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message