3 Replies Latest reply on Jun 9, 2003 12:16 PM by Adrian Brock

    HAVE BEEN WRESTLING WITH LOCAL INTERFACES FOR A WEEK...

    Pushpendra Newbie

      Hi,
      I am using Jboss 3.0 and am trying to deploy BMP Entity Beans with local interfaces. My beans get accessed by Servlet via Java beans. The EJB's are in AhmedabadSaleEJB.jar and Servlets and Java beans are in AhmedabadSaleWEB.war. Both these jar files are deployed in AhmedabadSale.ear. I read in mail-archives that to deploy local interfaces you need to have code in one ear.

      The error I am getting is as follows:

      10:18:57,260 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/AhmedabadSale.ear
      10:18:57,430 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/AhmedabadSale.ear
      10:19:01,440 INFO [EjbModule] Creating
      10:19:01,990 INFO [EjbModule] Deploying OfficeRentBean
      10:19:02,700 INFO [EjbModule] Created
      10:19:02,760 INFO [EjbModule] Starting
      10:19:03,300 INFO [EjbModule] Started
      10:19:04,620 INFO [EmbeddedCatalinaServiceSX] deploy, ctxPath=/servlets, warUrl=njar:file:/C:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/AhmedabadSale.ear/83.AhmedabadSale.ear^/AhmedabadSaleWEB.war
      10:19:05,940 ERROR [MainDeployer] could not start deployment: njar:file:/C:/jboss-3.0.0_tomcat-4.0.3/server/default/tmp/deploy/server/default/deploy/AhmedabadSale.ear/83.AhmedabadSale.ear^/AhmedabadSaleWEB.war
      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-local-ref: local/OfficeRentBean, target not found, add valid ejb-link) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:309)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:671)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      Caused by: javax.naming.NamingException: ejb-local-ref: local/OfficeRentBean, target not found, add valid ejb-link
      at org.jboss.web.AbstractWebContainer.linkEjbLocalRefs(AbstractWebContainer.java:651)
      at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:461)
      at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:944)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.initENC(EmbeddedCatalinaServiceSX.java:329)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.createWebContext(EmbeddedCatalinaServiceSX.java:316)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.performDeploy(EmbeddedCatalinaServiceSX.java:238)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
      ... 15 more
      10:19:05,940 ERROR [MainDeployer] could not start deployment: file:/C:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/AhmedabadSale.ear
      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-local-ref: local/OfficeRentBean, target not found, add valid ejb-link)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:309)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:671)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      Caused by: javax.naming.NamingException: ejb-local-ref: local/OfficeRentBean, target not found, add valid ejb-link
      at org.jboss.web.AbstractWebContainer.linkEjbLocalRefs(AbstractWebContainer.java:651)
      at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:461)
      at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:944)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.initENC(EmbeddedCatalinaServiceSX.java:329)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.createWebContext(EmbeddedCatalinaServiceSX.java:316)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.performDeploy(EmbeddedCatalinaServiceSX.java:238)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
      ... 15 more
      10:19:06,050 ERROR [URLDeploymentScanner] Failed to deploy: org.jboss.deployment.scanner.URLDeploymentScanner$DeployedURL@a295aa6f{ url=file:/C:/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/AhmedabadSale.ear, deployedLastModified=1054961110000 }
      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-local-ref: local/OfficeRentBean, target not found, add valid ejb-link)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:309)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:678)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:671)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:513)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:481)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
      at $Proxy4.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:405)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:515)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:202)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)
      Caused by: javax.naming.NamingException: ejb-local-ref: local/OfficeRentBean, target not found, add valid ejb-link
      at org.jboss.web.AbstractWebContainer.linkEjbLocalRefs(AbstractWebContainer.java:651)
      at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWebContainer.java:461)
      at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescriptors(AbstractWebContainer.java:944)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.initENC(EmbeddedCatalinaServiceSX.java:329)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.createWebContext(EmbeddedCatalinaServiceSX.java:316)
      at org.jboss.web.catalina.EmbeddedCatalinaServiceSX.performDeploy(EmbeddedCatalinaServiceSX.java:238)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
      ... 15 more


      The error is in my deployment descriptors especially in either web.xml or jboss-web.xml. The code for web.xml is as follows:

      <ejb-local-ref>
      <![CDATA[A reference to the OfficeRentBean EJB]]>
      <ejb-ref-name>local/OfficeRentBean</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>interfaces.OfficeRentHome</local-home>
      interfaces.OfficeRent
      <ejb-linl>AhmedabadSale.jar#OfficeRentBean</ejb-link>
      </ejb-local-ref>


      And corresponding jboss-web.xml code is:

      <ejb-local-ref>
      <ejb-ref-name>local/OfficeRentBean</ejb-ref-name>
      <local-jndi-name>DatabaseViewOfficeRent</local-jndi-name>
      </ejb-local-ref>


      I have gone through this forum and read many solutions to this problem and I tried all but all failed. Can anybody please help.

      Also there are no Xdoclet tags available for generating deployment descriptor code for local interfaces especially @jboss.ejb-local-ref tag is missing. Can any body shed light on this problem too.

      Regards,

      Pushpendra Raval