3 Replies Latest reply on Jul 23, 2003 4:12 PM by David Newman

    no ejb-link match, use jndi-name in jboss-web.xml

    David Newman Newbie


      I am getting the following error. I have also seen others posts with this error, but no one has tried to answer.

      org.jboss.deployment.DeploymentException:
      Error during deploy; - nested throwable:
      javax.naming.NamingException: ejb-ref: 'XmlAdapter', no ejb-link match, use jndi-name in jboss-web.xml)

      I am trying to access an EJB from a servlet in the same JVM.
      I am running boss-3.2.2RC1_tomcat-4.1.24.

      The EJB is deployed in a .jar file, and the servlet is deployed in a .war
      file. The EJB successfully deploys, but the servlet via the .war file fails to deploy with the above error.

      I am using the following config files:

      ejb-jar.xml

      <ejb-jar>
      <enterprise-beans>

      <ejb-name>XXXAdapter</ejb-name>
      com.xxx.XXXAdapterHome
      com.xxx.XXXAdapter
      <ejb-class>com.xxx.XXXAdapterBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>

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

      jboss.xml


      <enterprise-beans>

      <ejb-name>XXXAdapter</ejb-name>
      <jndi-name>XXXAdapter</jndi-name>

      </enterprise-beans>


      web.xml

      <web-app>
      <display-name>xxxadapter</display-name>

      <servlet-name>xxxadapter</servlet-name>
      <servlet-class>com.xxx.XXXAdapterServlet</servlet-class>
      <init-param>
      <param-name>XXXAdapterBeanName</param-name>
      <param-value>java:comp/env/XXXAdapter</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>

      <servlet-mapping>
      <servlet-name>xxxadapter</servlet-name>
      <url-pattern>/xxxadapter</url-pattern>
      </servlet-mapping>
      <ejb-ref>
      XXXAdapter Bean
      <ejb-ref-name>XXXAdapter</ejb-ref-name>
      <ejb-link>XXXAdapter</ejb-link>
      <ejb-ref-type>Session</ejb-ref-type>
      com.xxx.XXXAdapterHome
      com.xxx.XXXAdapter
      </ejb-ref>
      </web-app>

      jboss-web.xml

      <jboss-web>
      <enterprise-beans>

      <ejb-ref>
      <ejb-ref-name>XXXAdapter</ejb-ref-name>
      <jndi-name>XXXAdapter</jndi-name>
      </ejb-ref>

      </enterprise-beans>
      </jboss-web>

      Anything obviously wrong with above files?

      Thanks,

      David