db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "armin waibel (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OJB-30) Check for null object in array
Date Fri, 22 Apr 2005 21:56:25 GMT
     [ http://issues.apache.org/jira/browse/OJB-30?page=comments#action_63538 ]
     
armin waibel commented on OJB-30:
---------------------------------

Could you post some more from the stack trace to see the calling methods?

> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message