Hi Dev, This JIRA is preventing geronimo 2.2.2-snapshot from passing a tck case.
Could anyone help take a look ? ---------- Forwarded message ---------- From: Shawn Jiang (JIRA) <[email protected]> Date: Fri, Jul 30, 2010 at 10:26 AM Subject: [jira] Created: (OPENEJB-1315) NPE when deploying EJB modules. To: [email protected] 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 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. -- Shawn
