5 Replies Latest reply on Sep 20, 2002 2:22 PM by Dain Sundstrom

    Error: Expected "</enterprise-beans>" to terminate element

    Praveen Newbie

      Hey Guys

      I am getting following error, when i am deploying my CMP EJB.

      ERROR:
      Expected "</enterprise-beans>" to terminate element starting on line 1,831

      any idea ?

      Thanks
      KPK

        • 1. Re: Error: Expected "</enterprise-beans>" to terminate eleme
          Dain Sundstrom Master

          Your ejb-jar.xml file is not well formed (tags don't match).

          • 2. Re: Error: Expected "</enterprise-beans>" to terminate eleme
            Vicky Kak Master

            Hi,
            I do get the same error can you tell me what is wrong in this ejb-jar.xml file:
            *********************************
            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/j2ee/dtd/ejb-jar_2_0.dtd">
            <ejb-jar>
            <enterprise-beans>

            <display-name>Gangster Entity Bean</display-name>
            <ejb-name>GangsterEJB</ejb-name>

            <local-home>GangsterHome</local-home>
            Gangster
            <ejb-class>GangsterBean</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>gangster</abstract-schema-name>

            <cmp-field><field-name>gangsterId</field-name></cmp-field>
            <cmp-field><field-name>name</field-name></cmp-field>
            <cmp-field><field-name>nickName</field-name></cmp-field>

            <primkey-field>gangsterId</primkey-field>

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

            *********************************
            I have followed all the steps mentioned in QuickStart pdf for Jboss3.0 but still failed.Can you sort out the problem.
            regards
            Vicky

            • 3. Re: Error: Expected "</enterprise-beans>" to terminate eleme
              Vicky Kak Master

              Hi,
              I do get the same error can you tell me what is wrong in this ejb-jar.xml file:
              *********************************
              <?xml version="1.0" encoding="UTF-8"?>
              <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/j2ee/dtd/ejb-jar_2_0.dtd">
              <ejb-jar>
              <enterprise-beans>

              <display-name>Gangster Entity Bean</display-name>
              <ejb-name>GangsterEJB</ejb-name>

              <local-home>GangsterHome</local-home>
              Gangster
              <ejb-class>GangsterBean</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>gangster</abstract-schema-name>

              <cmp-field><field-name>gangsterId</field-name></cmp-field>
              <cmp-field><field-name>name</field-name></cmp-field>
              <cmp-field><field-name>nickName</field-name></cmp-field>

              <primkey-field>gangsterId</primkey-field>

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

              *********************************
              I have followed all the steps mentioned in QuickStart pdf for Jboss3.0 but still failed.Can you sort out the problem.
              regards
              Vicky

              • 4. Re: Error: Expected "</enterprise-beans>" to terminate eleme
                Vicky Kak Master

                Hi,
                I do get the same error can you tell me what is wrong in this ejb-jar.xml file:
                *********************************
                <?xml version="1.0" encoding="UTF-8"?>
                <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/j2ee/dtd/ejb-jar_2_0.dtd">
                <ejb-jar>
                <enterprise-beans>

                <display-name>Gangster Entity Bean</display-name>
                <ejb-name>GangsterEJB</ejb-name>

                <local-home>GangsterHome</local-home>
                Gangster
                <ejb-class>GangsterBean</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>gangster</abstract-schema-name>

                <cmp-field><field-name>gangsterId</field-name></cmp-field>
                <cmp-field><field-name>name</field-name></cmp-field>
                <cmp-field><field-name>nickName</field-name></cmp-field>

                <primkey-field>gangsterId</primkey-field>

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

                *********************************
                I have followed all the steps mentioned in QuickStart pdf for Jboss3.0 but still failed.Can you sort out the problem.
                regards
                Vicky

                • 5. Re: Error: Expected "</enterprise-beans>" to terminate eleme
                  Dain Sundstrom Master

                  Let me restate the answer:

                  Your ejb-jar.xml file is not well formed (tags don't match).

                  Try opening your ejb-jar.xml (it could also be your jbosscmp-jdbc.xml file) in an xml editor and it will tell you what the problem is.