4 Replies Latest reply on Oct 31, 2007 5:19 PM by raist_majere

    expectd one local home tag problem

    shogun1234

      I read the issue posted on jira. It seems like the Jboss (above 4.0.5) should support servlet 2.5. However, when call EJB3 from tomcat (jboss 4.2.2 version) I get the error saying " ... expected one local-home tag ..." where for EJB3 there should have no local home.

      How can I solve this problem?

      the content of web.xml
       <ejb-local-ref>
       <ejb-ref-name>ejb/TimeBean</ejb-ref-name>
       <ejb-ref-type>Session</ejb-ref-type>
       <local>net.sf.sample.TimeLocal</local>
       </ejb-local-ref>
      


      Thank you very much

        • 1. Re: expectd one local home tag problem
          shogun1234

          sorry the jira issue I read is from http://jira.jboss.com/jira/browse/JBWEB-55

          • 2. Re: expectd one local home tag problem
            raist_majere

            Are you setting the version attribute of web-app in web.xml to 2.5? Can you copy it here your web.xml file?

            • 3. Re: expectd one local home tag problem
              shogun1234

               

              "Raist_Majere" wrote:
              Are you setting the version attribute of web-app in web.xml to 2.5? Can you copy it here your web.xml file?


              the content of web.xml is as below:
              <?xml version="1.0" encoding="UTF-8"?>
              <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
               <display-name>Time</display-name>
               <welcome-file-list>
               <welcome-file>index.jsp</welcome-file>
               </welcome-file-list>
               <ejb-local-ref>
               <ejb-ref-name>ejb/TimeBean</ejb-ref-name>
               <ejb-ref-type>Entity</ejb-ref-type>
               <local>net.sf.sample.TimeLocal</local>
               </ejb-local-ref>
              </web-app>
              


              The xsd I use is 2.5 xsd, not 2.4. So previously I expect it should work, but it looks not so. There might have some other part I miss.

              Thanks for replying my message.

              • 4. Re: expectd one local home tag problem
                raist_majere

                You have to set the version to 2.5, not 2.4

                <?xml version="1.0" encoding="UTF-8"?>
                <web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
                 <display-name>Time</display-name>
                 <welcome-file-list>
                 <welcome-file>index.jsp</welcome-file>
                 </welcome-file-list>
                 <ejb-local-ref>
                 <ejb-ref-name>ejb/TimeBean</ejb-ref-name>
                 <ejb-ref-type>Entity</ejb-ref-type>
                 <local>net.sf.sample.TimeLocal</local>
                 </ejb-local-ref>
                </web-app>