JBoss Migration: Failed to find ContainerDependencyMetaData
hushen.savani May 9, 2012 6:22 AMHi Community,
I am migrating an OSS/BSS application from JBossAS-3.2.6 to JBossEAP-5.1.2. I am facing a problem here:
I have two application ears, say XYZ.ear and ABC.ear. Both have number of session beans as:
XYZ.ear
|- FooSessionBean
ABC.ear
|- BarSessionBean
Now, in XYZ.ear, FooSessionBean is referring to BarSessionBean using BarSessionBean's local interfaces.
E.g.:
/**
*
* @ejb.bean name="FooSessionBean"
* type="Stateless"
* view-type="both"
* jndi-name="FooSessionBean"
* local-jndi-name="ejb/FooSessionBeanLocal"
* transaction-type="Container"
*
* @ejb.transaction type="Required"
* @ejb.util generate="physical"
* @ejb.remote-facade
*
@ejb.ejb-external-ref ref-name = "ejb/BarSessionBeanLocal"
* type = "Session"
* view-type = "local"
* home = "com.elitecore.ejb.bar.interfaces.IBarSessionBeanLocalHome"
* business = "com.elitecore.ejb.bar.interfaces.IBarSessionBeanLocal"
* link = "BarSessionBean"
*
**/
public class FooSessionBean implements javax.ejb.SessionBean {
....
....
}
And the BarSessionBean in ABC.ear is declared as:
/**
* Session facade for BarSessionBean
* @ejb.bean name="BarSessionBean"
* type="Stateless"
* view-type="both"
* jndi-name="BarSessionBean"
* local-jndi-name="ejb/BarSessionBeanLocal"
* @ejb.transaction type="NotSupported"
* @ejb.util generate="physical"
* @ejb.remote-facade
*
*
*/
public class BarSessionBean implements javax.ejb.SessionBean{
....
....
}
Now, with JBossAS-3.2.6, it was working fine, but when using the same in JBossEAP-5.1.2, it throws following sort of error while deploying XYZ.ear:
17:19:54,121 ERROR [AbstractKernelController] Error installing to PostClassLoader: name=vfszip:/opt/jboss-as-all-in-one/server/billingbss/deploy/billing/XYZ.ear/ state=ClassLoader mode=Manual requiredState=PostClassLoader org.jboss.deployers.spi.DeploymentException: java.lang.IllegalStateException: Failed to find ContainerDependencyMetaData for interface: com.elitecore.ejb.bar.interfaces.IBarSessionBeanLocal at org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.internalDeploy(MappedReferenceMetaDataResolverDeployer.java:159) at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1454)
I tried exploring on the same issue, the similar kind of issue is registered on redhat knowledge base as:
https://access.redhat.com/knowledge/solutions/69530
So, I tried using the same thing as:
XYZ.ear
|- FooSessionBean-ejb.jar
|- BarSessionBean-client.jar
ABC.ear
|- BarSessionBean-ejb.jar
I have placed BarSessionBean-client.jar in XYZ.ear. This client jar contains interfaces of BarSessionBean. Now, since IBarSessionBeanLocal interface is refered in FooSessionBean, I have included entry of BarSessionBean-client.jar in the MANIFEST.MF Class-path of FooSessionBean-ejb.jar (which contains FooSessionBean). But, it did not work either.
Kindly suggest some pointers on the same.
Thanks.
Best Regards,
Hushen Savani