0 Replies Latest reply on Apr 11, 2005 12:50 AM by shanker

    javax.namingException ejb-link error please help

    shanker Newbie

      Please help me I am getting following errors.

      my ejb-jar.xmlcontains
      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE ejb-jar PUBLIC
      "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
      "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
      <ejb-jar>
      <enterprise-beans>

      <display-name>Employee</display-name>
      <ejb-name>Employee</ejb-name>
      com.employee.code.EmployeeHome
      com.employee.code.Employee
      <local-home>com.employee.code.EmployeeHomeLocal</local-home>
      com.employee.code.EmployeeLocal
      <ejb-class>com.employee.code.EmployeeBean</ejb-class>
      <persistence-type>Container</persistence-type>
      <prim-key-class>java.lang.Integer</prim-key-class>
      False
      <cmp-version>2.x</cmp-version>
      <abstract-schema-name>Employee</abstract-schema-name>
      <cmp-field><field-name>employeeName</field-name></cmp-field>
      <cmp-field><field-name>employeeId</field-name></cmp-field>
      <cmp-field><field-name>empEmailId</field-name></cmp-field>
      <cmp-field><field-name>dateOfJoining</field-name></cmp-field>
      <cmp-field><field-name>dateOfBirth</field-name></cmp-field>
      <cmp-field><field-name>isEmployeeNow</field-name></cmp-field>
      <cmp-field><field-name>isPermanent</field-name></cmp-field>
      <cmp-field><field-name>isOnContract</field-name></cmp-field>
      <cmp-field><field-name>isOnProbation</field-name></cmp-field>
      <primkey-field>employeeId</primkey-field>

      </enterprise-beans>
      </ejb-jar>


      my web.xml contains

      <?xml version="1.0" encoding="ISO-8859-1"?>
      <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
      <web-app>

      <!-- Action Servlet Configuration -->


      <ejb-ref>
      <ejb-ref-name>ejb/Employee</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      com.employee.code.EmployeeHome
      com.employee.code.Employee
      <ejb-link>Employee</ejb-link>
      </ejb-ref>

      <ejb-local-ref>
      <ejb-ref-name>ejb/EmployeeHomeLocal</ejb-ref-name>
      <ejb-ref-type>Entity</ejb-ref-type>
      <local-home>com.employee.code.EmployeeHomeLocal</local-home>
      com.employee.code.EmployeeLocal
      <ejb-link>Employee</ejb-link>
      </ejb-local-ref>

      </web-app>


      my output.war contains
      manifest.mf
      all class files
      web.xml

      my output.jar contains
      manifest.mf
      ejb-jar.xml
      and all class filesin the respective path


      my output.ear contains
      manifest.mf
      application.xml
      output.jar
      output.war


      08:08:05,265 INFO [Server] JBoss (MX MicroKernel) [3.2.0 (build: CVSTag=JBoss_3
      _2_0 date=200304110033)] Started in 20s:609ms
      08:10:05,234 INFO [MainDeployer] Starting deployment of package: file:/C:/jboss
      cmp/jboss-3.2.0_tomcat-4.1.24/server/default/deploy/output.ear
      08:10:05,234 INFO [EARDeployer] Init J2EE application: file:/C:/jbosscmp/jboss-
      3.2.0_tomcat-4.1.24/server/default/deploy/output.ear
      08:10:05,359 INFO [EmbeddedCatalinaService41] deploy, ctxPath=/ums, warUrl=file
      :/C:/jbosscmp/jboss-3.2.0_tomcat-4.1.24/server/default/tmp/deploy/server/default
      /deploy/output.ear/44.output.ear-contents/output.war
      08:10:05,375 ERROR [MainDeployer] could not start deployment: file:/C:/jbosscmp/
      jboss-3.2.0_tomcat-4.1.24/server/default/tmp/deploy/server/default/deploy/output
      .ear/44.output.ear-contents/output.war
      org.jboss.deployment.DeploymentException: Error during deploy; - nested throwabl
      e: (javax.naming.NamingException: ejb-ref: ejb/Employee, no ejb-link match, use
      jndi-name in jboss-web.xml)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:36
      9)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:613)
      at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
      nDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy7.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
      tScanner.java:280)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
      canner.java:421)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      doScan(AbstractDeploymentScanner.java:200)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      loop(AbstractDeploymentScanner.java:211)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
      run(AbstractDeploymentScanner.java:190)
      Caused by: javax.naming.NamingException: ejb-ref: ejb/Employee, no ejb-link matc
      h, use jndi-name in jboss-web.xml
      at org.jboss.web.AbstractWebContainer.linkEjbRefs(AbstractWebContainer.j
      ava:617)
      at org.jboss.web.AbstractWebContainer.parseWebAppDescriptors(AbstractWeb
      Container.java:523)
      at org.jboss.web.AbstractWebContainer$DescriptorParser.parseWebAppDescri
      ptors(AbstractWebContainer.java:934)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.initENC(EmbeddedCata
      linaService41.java:425)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(Emb
      eddedCatalinaService41.java:412)
      at org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(Embedd
      edCatalinaService41.java:266)
      at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:35
      7)
      ... 16 more

      thanks in advance.