0 Replies Latest reply on Oct 21, 2009 1:21 AM by Skopin Anton

    ejb-local-ref problem

    Skopin Anton Newbie

      Hello

      I have two jar files with session beans, in one of them in ejb-jar.xml i have ejb-local-ref tag to bean in second jar file, after deploying first jar file i deploy second jar file with ejb-local-ref tag and i have next error:

      (where archive1.jar its a first jar file with one session bean that have local interface, and
      archive2.jar its a second jar file with ejb-local-ref tag)

      16:36:13,955 ERROR [AbstractKernelController] Error installing to
      PostClassLoader:
      name=vfszip:/home/santon/jboss_510/server/default/deploy/th_web/archive2.jar/ state=ClassLoader mode=Manual requiredState=PostClassLoader
      org.jboss.deployers.spi.DeploymentException:
      java.lang.IllegalStateException: Failed to find
      ContainerDependencyMetaData for interface: model.Session1EJBLocal
       at
      org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.internalDeploy(MappedReferenceMetaDataResolverDeployer.java:159)
       at
      org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
       at
      org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
       at
      org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
       at
      org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentLast(DeployersImpl.java:1299)
       at
      org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1100)
       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.hotdeploy.HDScanner.scan(HDScanner.java:362)
       at
      org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
       at java.util.concurrent.Executors
      $RunnableAdapter.call(Executors.java:441)
       at java.util.concurrent.FutureTask
      $Sync.innerRunAndReset(FutureTask.java:317)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
       at java.util.concurrent.ScheduledThreadPoolExecutor
      $ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
       at java.util.concurrent.ScheduledThreadPoolExecutor
      $ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
       at java.util.concurrent.ScheduledThreadPoolExecutor
      $ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
       at java.util.concurrent.ThreadPoolExecutor
      $Worker.runTask(ThreadPoolExecutor.java:886)
       at java.util.concurrent.ThreadPoolExecutor
      $Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.IllegalStateException: Failed to find
      ContainerDependencyMetaData for interface: model.Session1EJBLocal
       at
      org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolveEjbInterface(MappedReferenceMetaDataResolverDeployer.java:1146)
       at
      org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolveEjbLocalRefs(MappedReferenceMetaDataResolverDeployer.java:877)
       at
      org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolve(MappedReferenceMetaDataResolverDeployer.java:743)
       at
      org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.resolve(MappedReferenceMetaDataResolverDeployer.java:768)
       at
      org.jboss.deployment.MappedReferenceMetaDataResolverDeployer.internalDeploy(MappedReferenceMetaDataResolverDeployer.java:155)
       ... 26 more
      16:36:14,001 WARN [HDScanner] Failed to process changes
      org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of
      incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      
      *** DEPLOYMENTS IN ERROR: Name -> Error
      
      vfszip:/home/santon/jboss_510/server/default/deploy/th_web/archive2.jar/
      -> org.jboss.deployers.spi.DeploymentException:
      java.lang.IllegalStateException: Failed to find
      ContainerDependencyMetaData for interface: model.Session1EJBLocal
      
      
      DEPLOYMENTS IN ERROR:
       Deployment
      "vfszip:/home/santon/jboss_510/server/default/deploy/th_web/archive2.jar/" is in error due to the following reason(s): java.lang.IllegalStateException: Failed to find ContainerDependencyMetaData for interface: model.Session1EJBLocal
      
       at
      org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
       at
      org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
       at
      org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
       at
      org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
       at
      org.jboss.system.server.profileservice.hotdeploy.HDScanner.scan(HDScanner.java:369)
       at
      org.jboss.system.server.profileservice.hotdeploy.HDScanner.run(HDScanner.java:255)
       at java.util.concurrent.Executors
      $RunnableAdapter.call(Executors.java:441)
       at java.util.concurrent.FutureTask
      $Sync.innerRunAndReset(FutureTask.java:317)
       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
       at java.util.concurrent.ScheduledThreadPoolExecutor
      $ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
       at java.util.concurrent.ScheduledThreadPoolExecutor
      $ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
       at java.util.concurrent.ScheduledThreadPoolExecutor
      $ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
       at java.util.concurrent.ThreadPoolExecutor
      $Worker.runTask(ThreadPoolExecutor.java:886)
       at java.util.concurrent.ThreadPoolExecutor
      $Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:619)
      


      ejb-jar.xml of archive1.jar

      <?xml version = '1.0' encoding = 'windows-1251'?>
      <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee">
       <enterprise-beans>
       <session>
       <description>Session Bean ( Stateless )</description>
       <display-name>Session1EJB</display-name>
       <ejb-name>Session1EJB</ejb-name>
       <home>model.Session1EJBHome</home>
       <remote>model.Session1EJB</remote>
       <local-home>model.Session1EJBLocalHome</local-home>
       <local>model.Session1EJBLocal</local>
       <ejb-class>model.Session1EJBBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
       <security-identity>
       <use-caller-identity/>
       </security-identity>
       </session>
       </enterprise-beans>
       <assembly-descriptor>
       <security-role>
       <role-name>marketing_user</role-name>
       </security-role>
       <method-permission>
       <role-name>marketing_user</role-name>
       <method>
       <ejb-name>Session1EJB</ejb-name>
       <method-name>*</method-name>
       </method>
       </method-permission>
       <container-transaction>
       <method>
       <ejb-name>Session1EJB</ejb-name>
       <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
       </container-transaction>
       </assembly-descriptor>
      </ejb-jar>
      
      


      ejb-jar.xml of archive2.jar file

      <?xml version = '1.0' encoding = 'windows-1251'?>
      <ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee">
       <enterprise-beans>
       <session>
       <description>Session Bean ( Stateless )</description>
       <display-name>Session2EJB</display-name>
       <ejb-name>Session2EJB</ejb-name>
       <home>model.Session2EJBHome</home>
       <remote>model.Session2EJB</remote>
       <ejb-class>model.Session2EJBBean</ejb-class>
       <session-type>Stateless</session-type>
       <transaction-type>Container</transaction-type>
       <ejb-local-ref>
       <ejb-ref-name>ejb/local/Session1EJB</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local-home>model.Session1EJBLocalHome</local-home>
       <local>model.Session1EJBLocal</local>
       <ejb-link>archive1.jar#Session1EJB</ejb-link>
       </ejb-local-ref>
       <security-identity>
       <use-caller-identity/>
       </security-identity>
       </session>
       </enterprise-beans>
       <assembly-descriptor>
       <security-role>
       <role-name>marketing_user</role-name>
       </security-role>
       <method-permission>
       <role-name>marketing_user</role-name>
       <method>
       <ejb-name>Session2EJB</ejb-name>
       <method-name>*</method-name>
       </method>
       </method-permission>
       <container-transaction>
       <method>
       <ejb-name>Session2EJB</ejb-name>
       <method-name>*</method-name>
       </method>
       <trans-attribute>Required</trans-attribute>
       </container-transaction>
       </assembly-descriptor>
      </ejb-jar>
      
      


      jboss.xml of this files
      <jboss>
       <security-domain>java:/jaas/test</security-domain>
      
       <enterprise-beans>
      
       <session>
       <ejb-name>Session1EJB</ejb-name>
       <jndi-name>ejb/web_shop/Session1EJB</jndi-name>
      </session>
      </enterprise-beans>
      </jboss>
      
      
      <jboss>
       <security-domain>java:/jaas/test</security-domain>
      
       <enterprise-beans>
      
       <session>
       <ejb-name>Session2EJB</ejb-name>
       <jndi-name>ejb/web_shop/Session2EJB</jndi-name>
      </session>
      </enterprise-beans>
      </jboss>
      
      


      all file names of classes located in proper dir in jar files, after remove ejb-local-ref tag,
      deploy of this two files work well.