5 Replies Latest reply on Mar 22, 2004 2:25 AM by poweribo

    Migrating from 3.0.5 to 3.0.8 (redux!)

    poweribo

      i opted to try upgrading from 3.0.5 to 3.0.8 instead of 3.2.3 to minimize surprises. still i get some exceptions from an otherwise perfectly running enterprise application on 3.0.5.

      i get these messages, even after converting all xml encodings to "UTF-8" :

      [ObjectName: jboss.j2ee:jndiName=catalyst.PrivilegeHome,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Document root element
      is missing.; - nested throwable: (org.xml.sax.SAXParseException: Document root e
      lement is missing.), ObjectName: jboss.j2ee:jndiName=catalyst.ChangeRequestHome,
      service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Document root element
      is missing.; - nested throwable: (org.xml.sax.SAXParseException: Document root e
      lement is missing.), ObjectName: jboss.j2ee:jndiName=catalyst.UserHome,service=E
      JB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Document root element
      is missing.; - nested throwable: (org.xml.sax.SAXParseException: Document root e
      lement is missing.), ObjectName: jboss.j2ee:jndiName=catalyst.AttachmentHome,ser
      vice=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Document root element
      is missing.; - nested throwable: (org.xml.sax.SAXParseException: Document root e
      lement is missing.), ObjectName: jboss.j2ee:jndiName=catalyst.BugHome,service=EJ
      B
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Document root element
      is missing.; - nested throwable: (org.xml.sax.SAXParseException: Document root e
      lement is missing.)]

      what should i do to fix this? thanx!

        • 1. Re: Migrating from 3.0.5 to 3.0.8 (redux!)

          Your deployment descriptors don't appear to be valid.

          • 2. Re: Migrating from 3.0.5 to 3.0.8 (redux!)
            poweribo

            without changing a bit and replicating exact configuration, the web app works flawlessly in 3.0.5.
            does this mean 3.0.8 is not backward compatible? or has it introduced new format in xml configs?

            • 3. Re: Migrating from 3.0.5 to 3.0.8 (redux!)

              There's no new format, it appears your descriptors may have been flawed in the first place, but the deployment (or the parser) was more lenient before. It looks like SAX is not even able to find the root element. Try to validate your XML files and you'll see if there are any faults.

              • 4. Re: Migrating from 3.0.5 to 3.0.8 (redux!)
                poweribo

                >the deployment (or the parser) was more lenient before
                that what i thought so. ill check it out. the stack trace was not very helpful on pinpointing the exact prob though.

                btw, im looking at ejb-jar.xml, jboss.xml, jaws.xml. each ejb has its own, separate, set of config files. heres my sample ejb-jar descriptor for privilegeHome (reported as errorneous by jboss 3.0.8)

                ---------
                <?xml version="1.0" encoding="UTF-8"?>
                <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
                <ejb-jar>
                <enterprise-beans>

                <ejb-name>privilege</ejb-name>
                com.cyberj.catalyst.ejb.entitybean.privilege.PrivilegeHome
                com.cyberj.catalyst.ejb.entitybean.privilege.Privilege
                <ejb-class>com.cyberj.catalyst.ejb.entitybean.privilege.PrivilegeEJB</ejb-class>
                <persistence-type>Container</persistence-type>
                <prim-key-class>com.cyberj.catalyst.ejb.entitybean.privilege.PrivilegePK</prim-key-class>
                False

                <cmp-field>
                <field-name>userId</field-name>
                </cmp-field>
                <cmp-field>
                <field-name>projectId</field-name>
                </cmp-field>
                <cmp-field>
                <field-name>privilege</field-name>
                </cmp-field>


                </enterprise-beans>

                <assembly-descriptor>
                <security-role>
                <role-name>catalyst.consultant</role-name>
                </security-role>

                <method-permission>
                <role-name>catalyst.client</role-name>

                <ejb-name>privilege</ejb-name>
                <method-name>*</method-name>

                </method-permission>
                <method-permission>
                <role-name>catalyst.consultant</role-name>

                <ejb-name>privilege</ejb-name>
                <method-name>*</method-name>

                </method-permission>

                <method-permission>
                <role-name>catalyst.superuser</role-name>

                <ejb-name>privilege</ejb-name>
                <method-name>*</method-name>

                </method-permission>

                <method-permission>
                <role-name>catalyst.consultant</role-name>

                <ejb-name>privilege</ejb-name>
                <method-name>*</method-name>

                </method-permission>

                <method-permission>
                <role-name>catalyst.admin</role-name>

                <ejb-name>privilege</ejb-name>
                <method-name>*</method-name>

                </method-permission>

                <container-transaction>

                <ejb-name>privilege</ejb-name>
                <method-name>*</method-name>

                <trans-attribute>Required</trans-attribute>
                </container-transaction>

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

                am i looking at the right place? there are ejb references in web.xml too. any more ideas?

                • 5. Re: Migrating from 3.0.5 to 3.0.8 (redux!)
                  poweribo

                  Hi I'm back and still cant make my webapp work. I validated and corrected all xml config files using the DTDs from jboss but still wont work on 3.0.8. Ive actually tried it on 3.0.6 and 3.0.8.. same result.
                  basing from the stack traces, my untrained eye says that the prob is on the jaws.xml (the app is using ejb 1.1). here is the sample jaws.xml that i have (which jboss says erroneous)

                  2004-03-22 16:06:30,399 WARN [org.jboss.system.ServiceController] Problem creating service jboss.j2ee:jndiName=catalyst.PrivilegeHome,service=EJB
                  org.jboss.deployment.DeploymentException: Document root element is missing.; - nested throwable: (org.xml.sax.SAXParseException: Document root element is missing.)
                   at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:311)
                   at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:255)
                   at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:227)
                   at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:211)
                   at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:200)
                   at org.jboss.ejb.plugins.jaws.metadata.JawsXmlFileLoader.load(JawsXmlFileLoader.java:70)
                   at org.jboss.ejb.plugins.jaws.jdbc.JDBCCommandFactory.<init>(JDBCCommandFactory.java:144)
                   at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.create(JAWSPersistenceManager.java:104)


                  heres my sample jaws.xml thats causing the prob(?) :

                  <?xml version="1.0" encoding="UTF-8"?>
                  
                  <!DOCTYPE jaws PUBLIC
                   "-//JBoss//DTD JAWS 2.4//EN"
                   "http://www.jboss.org/j2ee/dtd/jaws_2_4.dtd">
                  
                  <jaws>
                   <datasource>CatalystDS</datasource>
                   <type-mapping>Oracle8</type-mapping>
                   <enterprise-beans>
                   <entity>
                   <ejb-name>privilege</ejb-name>
                  
                   <cmp-field>
                   <field-name>userId</field-name>
                   <column-name>USERID</column-name>
                   </cmp-field>
                   <cmp-field>
                   <field-name>projectId</field-name>
                   <column-name>PROJECTID</column-name>
                   </cmp-field>
                   <cmp-field>
                   <field-name>privilege</field-name>
                   <column-name>PRIVILEGE</column-name>
                   </cmp-field>
                  
                   <table-name>PRIVILEGE</table-name>
                   <create-table>false</create-table>
                   </entity>
                  
                   </enterprise-beans>
                  </jaws>
                  


                  any ideas? pls note that all xml descriptors was already validated and has no errors.