[ http://issues.apache.org/jira/browse/OJB-30?page=comments#action_64119 ]
     
Bobby Lawrence commented on OJB-30:
-----------------------------------

Here is more from the stack trace...
Sorry I couldn't get line numbers...

java.lang.NullPointerException

        at org.apache.ojb.broker.core.proxy.ProxyHelper.getRealClass(Unknown 
Source)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeAndLinkOneToMany(Unknown 
Source)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeCollections(Unknown 
Source)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(Unknown 
Source)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown 
Source)
        at org.apache.ojb.broker.core.PersistenceBrokerImpl.store(Unknown 
Source)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown 
Source)
        at org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(Unknown 
Source)
        at 
org.jlab.mis.apps.mics.ejb.MicsManagerBean.addProject(MicsManagerBean.java:397)


> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to