Removing dependence on EJB deployers from JBossWS deployer in JBoss EAP 5.1

Solution Verified - Updated -

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.1.x

Issue

After I followed the KCS article Slimming JBoss EAP 5.1 and removed EJB 2.x and EJB 3 service only, the following ERROR was shown in server.log at JBoss start-up:

ERROR [org.jboss.wsf.framework.deployment.DeploymentAspectInstaller] (main) Cannot add deployment aspect(s)
WSDeploymentAspectManagerPreJSE provides: []
WSDeploymentAspectManagerPostJSE provides: [JAXBIntros]
   org.jboss.wsf.container.jboss50.deployment.RuntimeLoaderDeploymentAspect, requires: ContainerMetaData
   org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect, requires: RuntimeLoader, ContainerMetaData, URLPattern, VFSRoot, JAXBIntros
   org.jboss.wsf.framework.deployment.EndpointRecordProcessorDeploymentAspect, requires: RegisteredEndpoint
   org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect, requires: ContainerEndpointHandler, ContainerMetaData
   org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect, requires: UnifiedMetaDataModel, JAXBIntros
   org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect, requires: UnifiedMetaDataModel
   org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeploymentAspect, requires: UnifiedMetaDataModel
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Create: name=WSNativeDeploymentAspectInstallerPostJSE state=Configured
java.lang.IllegalStateException: Cannot add deployment aspect(s)
WSDeploymentAspectManagerPreJSE provides: []
WSDeploymentAspectManagerPostJSE provides: [JAXBIntros]
   org.jboss.wsf.container.jboss50.deployment.RuntimeLoaderDeploymentAspect, requires: ContainerMetaData
   org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect, requires: RuntimeLoader, ContainerMetaData, URLPattern, VFSRoot, JAXBIntros
   org.jboss.wsf.framework.deployment.EndpointRecordProcessorDeploymentAspect, requires: RegisteredEndpoint
   org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect, requires: ContainerEndpointHandler, ContainerMetaData
   org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect, requires: UnifiedMetaDataModel, JAXBIntros
   org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect, requires: UnifiedMetaDataModel
   org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeploymentAspect, requires: UnifiedMetaDataModel
    at org.jboss.wsf.framework.deployment.DeploymentAspectInstaller.throwSortException(DeploymentAspectInstaller.java:170)
    at org.jboss.wsf.framework.deployment.DeploymentAspectInstaller.create(DeploymentAspectInstaller.java:129)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:59)
    at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:150)
    at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)

...(snip)...

ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

DEPLOYMENTS MISSING DEPENDENCIES:
  Deployment "WSDeployerHook_JAXRPC_EJB21" is missing the following dependencies:
    Dependency "WebServiceDeployerEJB" (should be in state "Create", but is actually in state "Configured")
  Deployment "WSDeployerHook_JAXWS_EJB3" is missing the following dependencies:
    Dependency "WebServiceDeployerEJB" (should be in state "Create", but is actually in state "Configured")
  Deployment "WSDeploymentAspectInstallerEJB" is missing the following dependencies:
    Dependency "WSInjectionMetaDataDeploymentAspect" (should be in state "Installed", but is actually in state "Instantiated")
  Deployment "WSDeploymentAspectInstallerPreJSE" is missing the following dependencies:
    Dependency "WSInjectionMetaDataDeploymentAspect" (should be in state "Installed", but is actually in state "Instantiated")
  Deployment "WSInjectionMetaDataDeploymentAspect" is missing the following dependencies:
    Dependency "org.jboss.ejb3.EjbReferenceResolver" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'org.jboss.ejb3.EjbReferenceResolver' **")
  Deployment "WSNativeDeploymentAspectInstallerEJB" is missing the following dependencies:
    Dependency "WSDeploymentAspectInstallerEJB" (should be in state "Create", but is actually in state "Instantiated")
  Deployment "WSNativeDeploymentAspectInstallerPreJSE" is missing the following dependencies:
    Dependency "WSDeploymentAspectInstallerPreJSE" (should be in state "Create", but is actually in state "Instantiated")
  Deployment "WebServiceDeployerEJB" is missing the following dependencies:
    Dependency "Ejb3Deployer" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'Ejb3Deployer' **")

DEPLOYMENTS IN ERROR:
  Deployment "WSNativeDeploymentAspectInstallerPostJSE" is in error due to the following reason(s): java.lang.IllegalStateException: Cannot add deployment aspect(s)
WSDeploymentAspectManagerPreJSE provides: []
WSDeploymentAspectManagerPostJSE provides: [JAXBIntros]
   org.jboss.wsf.container.jboss50.deployment.RuntimeLoaderDeploymentAspect, requires: ContainerMetaData
   org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect, requires: RuntimeLoader, ContainerMetaData, URLPattern, VFSRoot, JAXBIntros
   org.jboss.wsf.framework.deployment.EndpointRecordProcessorDeploymentAspect, requires: RegisteredEndpoint
   org.jboss.wsf.framework.deployment.EndpointHandlerDeploymentAspect, requires: ContainerEndpointHandler, ContainerMetaData
   org.jboss.wsf.stack.jbws.PublishContractDeploymentAspect, requires: UnifiedMetaDataModel, JAXBIntros
   org.jboss.wsf.stack.jbws.EagerInitializeDeploymentAspect, requires: UnifiedMetaDataModel
   org.jboss.wsf.stack.jbws.ServiceEndpointInvokerDeploymentAspect, requires: UnifiedMetaDataModel
  Deployment "Ejb3Deployer" is in error due to the following reason(s): ** NOT FOUND Depends on 'Ejb3Deployer' **
  Deployment "org.jboss.ejb3.EjbReferenceResolver" is in error due to the following reason(s): ** NOT FOUND Depends on 'org.jboss.ejb3.EjbReferenceResolver' **

Resolution

When you remove EJB 2.x and EJB 3 services from EAP 5.1 but does not remove web services (JBossWS), you have to remove dependence on EJB deployers from JBossWS deployer.

Specifically, when you remove the followings:

  • Remove EJB 3 service:
    • $JBOSS_HOME/server/$PROFILE/deploy/ejb3-connectors-jboss-beans.xml
    • $JBOSS_HOME/server/$PROFILE/deploy/ejb3-container-jboss-beans.xml
    • $JBOSS_HOME/server/$PROFILE/deploy/ejb3-interceptors-aop.xml
    • $JBOSS_HOME/server/$PROFILE/deploy/ejb3-timerservice-jboss-beans.xml
    • $JBOSS_HOME/server/$PROFILE/deployers/jboss-ejb3-endpoint-deployer.jar
    • $JBOSS_HOME/server/$PROFILE/deployers/jboss-ejb3-metrics-deployer.jar
    • $JBOSS_HOME/server/$PROFILE/deployers/ejb3.deployer/
    • $JBOSS_HOME/server/$PROFILE/deployers/ejb3-deployers-jboss-beans.xml
  • Remove EJB 2.x service:
    • $JBOSS_HOME/server/$PROFILE/deploy/ejb2-container-jboss-beans.xml
    • $JBOSS_HOME/server/$PROFILE/deploy/ejb2-timer-service.xml
    • $JBOSS_HOME/server/$PROFILE/deployers/ejb-deployer-jboss-beans.xml

Please also modify $JBOSS_HOME/server/$PROFILE/deployers/jbossws.deployer/META-INF/jbossws-deployer-jboss-beans.xml to remove dependence on EJB deployers from JBossWS deployer:

  • Remove the following <depends> in <bean name="WebServiceDeployerEJB" class="org.jboss.wsf.container.jboss50.deployer.WebServiceDeployerEJB"> section:

    <depends>EJB2xDeployer</depends>
    <depends>Ejb3Deployer</depends>
    
  • Change the following "ejbReferenceResolver" property in <bean name="WSInjectionMetaDataDeploymentAspect" class="org.jboss.wsf.container.jboss50.deployment.metadata.InjectionMetaDataDeploymentAspect"> section from:

    <property name="ejbReferenceResolver"><inject bean="org.jboss.ejb3.EjbReferenceResolver"/></property>
    

    to:

    <property name="ejbReferenceResolver"><null/></property>
    

Root Cause

JBossWS deployer depends on EJB 2.x and EJB 3 deployers by default.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.