tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevan Miller (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (OPENEJB-1315) NPE when deploying EJB modules.
Date Tue, 03 Aug 2010 17:51:17 GMT

     [ https://issues.apache.org/jira/browse/OPENEJB-1315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Kevan Miller reassigned OPENEJB-1315:
-------------------------------------

    Assignee: Kevan Miller

> NPE when deploying EJB modules.
> -------------------------------
>
>                 Key: OPENEJB-1315
>                 URL: https://issues.apache.org/jira/browse/OPENEJB-1315
>             Project: OpenEJB
>          Issue Type: Bug
>          Components: container system
>    Affects Versions: 3.1.x
>         Environment: Openejb 3.1.3-SNAPSHOT + geronimo 2.2.2-SNPASHOT
>            Reporter: Shawn Jiang
>            Assignee: Kevan Miller
>         Attachments: OPENEJB-1315.patch
>
>
> Caused by: java.lang.NullPointerException
> 	at org.apache.openejb.config.JndiEncInfoBuilder.buildDependsOnRefs(JndiEncInfoBuilder.java:413)
> 	at org.apache.openejb.config.AppInfoBuilder.build(AppInfoBuilder.java:177)
> 	at org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:615)
> 	at org.apache.geronimo.openejb.deployment.EjbModuleBuilder.configureApplication(EjbModuleBuilder.java:635)
> 	at org.apache.geronimo.openejb.deployment.EjbModuleBuilder.getEjbJarInfo(EjbModuleBuilder.java:568)
> 	at org.apache.geronimo.openejb.deployment.EjbModuleBuilder.initContext(EjbModuleBuilder.java:493)
> 	at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:592)
> 	at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:257)
> --------------------------------------------------------
> I looked into the code and found the root cause,  In the beginning of "org.apache.openejb.config.AnnotationDeployer.ProcessAnnotatedBeans.deploy(EjbModule)"
,  If "isMetadataComplete" is true. this method will return directly. So that the following
snippet in the method does not get a chance to be executed.
>                         if (dependsOn != null) {
>                                 sessionBean.setDependsOn(dependsOn.value());
>                             } else {
>                                 sessionBean.setDependsOn(Collections.EMPTY_LIST);
>                             }
> Which means that the dependsOn field of sessionBean have chance to be null. Therefore,
 following snippet in method "org.apache.openejb.config.JndiEncInfoBuilder.buildDependsOnRefs(EjbModule,
EnterpriseBean, EnterpriseBeanInfo, String)"  have the chance to throw NPE.
>  for (String ejbName : sessionBean.getDependsOn()) {
>                 String deploymentId = ejbResolver.resolve(new SimpleRef(ejbName), moduleUri);
>                 if (deploymentId != null) {
>                     beanInfo.dependsOn.add(deploymentId);
>                 }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message