Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 900798 (JBPAPP6-1404)

Summary: Incorrect interface definition in ejb-jar.xml for entity beans shows just NullPointer exception
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Ondrej Chaloupka <ochaloup>
Component: EJBAssignee: Chao Wang <chaowan>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0.0CC: chaowan, jmartisk, kkhan, ochaloup
Target Milestone: DR13   
Target Release: EAP 6.4.0   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-1404
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ondrej Chaloupka 2012-08-17 13:24:54 UTC
project_key: JBPAPP6

In case that you specify interface type for entity bean in ejb-jar.xml that does not correspond with definition in the class of the bean then just Null Pointer exception is shown without any other info what's happening.

I mean when you define bean through interface as remote and the ejb-jar.xml describes bean interfaces as local
{code}
public interface SomeBean extends EJBObject {
...
}
public interface SomeBeanHome extends EJBHome {
...
}
{code}
and the ejb-jar.xml looks like
{code}
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" version="3.1">
  <enterprise-beans>
    <entity>
      <ejb-name>SomeBean</ejb-name>
      <local-home>package.SomeBeanHome</local-home>
      <local>package.SomeBean</local>
      <ejb-class>package.SomeBeanBean</ejb-class>
      <persistence-type>Bean</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      <reentrant>true</reentrant>
    </entity>
  </enterprise-beans>
</ejb-jar>
{code}

then NullPointerException is thrown
{code}
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00001: Failed to start service jboss.deployment.unit."entitybeanbmp.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."entitybeanbmp.jar".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "entitybeanbmp.jar"                                      
  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]                  
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]                           
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]                              
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_23]                                   
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_23]                                       
  at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_23]                                             
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011058: Failed to install component SimpleBMPBean                             
  at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:102)                                
  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.2.0.Alpha1-SNAPSHOT.jar:7.2.0.Alpha1-SNAPSHOT]                  
  ... 5 more
Caused by: java.lang.NullPointerException                                                    
  at org.jboss.as.ejb3.component.entity.EntityBeanObjectViewConfigurator$2.configureDependency(EntityBeanObjectViewConfigurator.java:108)                            
  at org.jboss.as.ejb3.component.entity.EntityBeanObjectViewConfigurator$2.configureDependency(EntityBeanObjectViewConfigurator.java:105)                            
  at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:139)                                   
  at org.jboss.as.ee.component.deployers.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:95)                                 
  ... 6 more 
{code}

instead of some informative one.

Comment 1 Anne-Louise Tangring 2012-11-13 20:57:55 UTC
Docs QE Status: Removed: NEW 


Comment 4 Dimitris Andreadis 2013-10-24 18:27:42 UTC
Assigning jpai EJB issues to david.lloyd. Please re-assign to Cheng or others as needed.

Comment 5 Jan Martiska 2014-07-02 10:16:32 UTC
Proposing for EAP 6.4.

Comment 7 Jan Martiska 2014-12-12 12:02:14 UTC
Verified in EAP 6.4.0.DR13.