[jboss-jira] [JBoss JIRA] (AS7-5761) EJB2 entity bean CMP collection toArray throws NPE

Pieter Bos (JIRA) jira-events at lists.jboss.org
Fri Nov 2 09:42:18 EDT 2012


    [ https://issues.jboss.org/browse/AS7-5761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12731202#comment-12731202 ] 

Pieter Bos commented on AS7-5761:
---------------------------------

The source of this problem seems to be the CmpEntityBeanComponent, and the following method:

    public Collection<Object> getEntityLocalCollection(List<Object> idList) {
        return null;
    }

When running blame on github, it shows the following change (https://github.com/jbossas/jboss-as/commit/22dd690a56844ae54d6be29ca39014136b958566#diff-4):

     public Collection<Object> getEntityLocalCollection(List<Object> idList) {	  	
-        return null;  // TODO: jeb - This should return proxy instances to local entities
+        return null;
     }

Looks like this is simply a missing implementation of this function.
                
> EJB2 entity bean CMP collection toArray throws NPE 
> ---------------------------------------------------
>
>                 Key: AS7-5761
>                 URL: https://issues.jboss.org/browse/AS7-5761
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: EJB
>    Affects Versions: 7.1.1.Final, 7.1.3.Final (EAP)
>         Environment: MAC OSX, Java7
>            Reporter: Lucas Galfaso
>            Assignee: jaikiran pai
>
> From an EJB2 entity bean that has a CMP collection of entities, calling toArray() on the CMP collection throws NullPointerException
> Caused by: java.lang.NullPointerException
>         at org.jboss.as.cmp.jdbc.bridge.RelationSet.toArray(RelationSet.java:291) [jboss-as-cmp-7.1.1.Final.jar:7.1.1.Final]
> Normal iteration thru the collection using the iterator works as expected.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list