I have an EAR file that contains multiple WAR files. I added an AOP interceptor to one of the war files and I get the following error when trying to deploy the wAR file. The EAR file deploys fine only if I remove the jboss-aop.xml from the META-INF directory of the offending WAR file. Any ideas? I'm using JBoss 5.1, JDK 1.6 and JBoss AOP 2.1.8.GA

org.jboss.deployers.spi.DeploymentException: Error during deploy: vfszip:/C:/jboss-5.1.0.GA/server/default/deploy/myEAR.ear/myWAR.war/ at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:177) at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157) at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210) at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781) at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702) at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117) at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70) at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53) at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822) at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553) at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306) at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271) at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461) at org.jboss.Main.boot(Main.java:221) at org.jboss.Main$1.run(Main.java:556) at java.lang.Thread.run(Thread.java:619)Caused by: java.lang.IllegalStateException: Should not have null domainName for scoped bean at org.jboss.aop.asintegration.jboss5.AopMetaDataDeployerOutput.setScopedInformation(AopMetaDataDeployerOutput.java:77) at org.jboss.aop.asintegration.jboss5.AbstractAopMetaDataDeployer.massageScopedDeployment(AbstractAopMetaDataDeployer.java:239) at org.jboss.aop.asintegration.jboss5.AbstractAopMetaDataDeployer.deploy(AbstractAopMetaDataDeployer.java:127) at org.jboss.aop.asintegration.jboss5.AOPDeploymentAopMetaDataDeployer.deploy(AOPDeploymentAopMetaDataDeployer.java:46) at org.jboss.aop.asintegration.jboss5.AOPDeploymentAopMetaDataDeployer.deploy(AOPDeploymentAopMetaDataDeployer.java:36) at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56) at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171) ... 30 more

Domains

The <domain ... /> elements configure the server side. There is a default domain for each bean type. This is where the server side interceptor chains are defined using the AOP Pointcut Language (i.e. <bind pointcut="..." />). Please see the AOP documentation for more information on the Pointcut Language. The Domains are also used to introduce default annotations and thus create default behavior for each of the bean types. For example, take a look at the "Stateless Bean" domain. Notice that through the <annotation expr="..." /> element, a default @org.jboss.annotation.ejb.PoolClass is created for each stateless session bean that does not explicitly define a @org.jboss.annotation.ejb.PoolClass annotation on the class.

Except the war file in question doesn't have any EJBs in it! It's just a resteasy servlet and supporting code.