3 Replies Latest reply on Oct 27, 2002 9:40 PM by au98

    Why I got an error?

    au98

      I know writting an ejb in jboss,I must deploy four files,include two ejb deployment files,ejb-jar.xml & jboss.xml,Others are two web application deployment files,such as web.xml & jboss-web.xml.There are my deployment files for my ejb below,but when I start my jboss,It give me a error:
      Error during deploy; - nested throwable: (javax.naming.NamingException: ejb-local-ref: ejb/local/Whoareu, target not found, add valid ejb-link)

      Someone else could be tell me what mistakes I made,I would appreciate if I can get some responses to these questions.by the way,my jboss version is jboss-3.0.3_tomcat-4.1.12.


      <!--ejb-jar.xml -->
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <ejb-jar>
      <enterprise-beans>
      <ejb-local-ref>
      <ejb-ref-name>ejb/local/Whoareu</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>com.javastudy.ejb.session.WhoareuHome</local-home>
      com.javastudy.ejb.session.Whoareu
      <ejb-link>Whoareu</ejb-link>
      </ejb-local-ref>
      </enterprise-beans>
      </ejb-jar>

      <!--jboss.xml-->
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <!DOCTYPE jboss PUBLIC
      "-//JBoss//DTD JBOSS 3.0//EN"
      "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">




      <!--web.xml -->
      <?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>
      <ejb-local-ref>
      <ejb-ref-name>ejb/local/Whoareu</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      <local-home>com.javastudy.ejb.session.WhoareuHome</local-home>
      com.javastudy.ejb.session.Whoareu
      <ejb-link>Whoareu</ejb-link>
      </ejb-local-ref>
      </web-app>

      <!--jboss-web.xml-->
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <!DOCTYPE jboss-web
      PUBLIC "-//JBoss//DTD Web Application 2.3//EN"
      "http://www.jboss.org/j2ee/dtds/jboss-web_3_0.dtd">

      <jboss-web>
      </jboss-web>

        • 1. Re: Why I got an error?
          gerwec

          I think you need something more in your jboss.xml:

          <enterprise-beans>

          <ejb-name>Whoareu</ejb-name>
          <jndi-name>ejb/local/Whoareu</jndi-name>
          <configuration-name>Standard Stateless SessionBean</configuration-name>
          false

          <enterprise-beans>


          maybe you have to change the configuration-name if you use a statfull session bean

          c.u.
          gernot

          • 2. Re: Why I got an error?
            au98

            Thank you very much.If I changed jboss.xml as your post,I got a syntax error,if u or someone have free time,pls give me an entire local ejb demo,Thanks a lot.

            Alan

            • 3. Re: Why I got an error?
              au98

              Thank you very much.If I changed jboss.xml as your post,I got a syntax error,if u or someone have free times,pls give me an entire local ejb demo,Thanks a lot.

              Alan