8 Replies Latest reply on Aug 18, 2010 2:37 PM by sapozpa

    app-name error in Jboss 5.1.0.GA

    sapozpa

      Hi

       

      I am trying to deploy something to jboss 5.1.0.GA and I am getting this error:

       

      app-name not found as a child of jboss-app in unordered_sequence: module* security-role* jmx-name? loader-repository? ...

       

      Does anybody know about this particular error? I went into jboss-app.xml and indeed app-name is a child of jboss-app. So I am not sure what its complaining about.

       

      Any help will be greately appreciated.

       

      Thanks

      Pavel

        • 1. Re: app-name error in Jboss 5.1.0.GA
          peterj

          The error means that the DTD does not support the app-name entry where you have it. The DTD file is at docs/dtd/jboss-app_5.0.dtd. AS 5.x is much pickier about well-formed XML files than were previous versions.

          • 2. Re: app-name error in Jboss 5.1.0.GA
            sapozpa

            I see so I think I need to look at the dtd to figure out where it has to go?

            • 3. Re: app-name error in Jboss 5.1.0.GA
              sapozpa

              Hi Peter

               

              The dtd actually says nothing about the app-name. So I am still puzzled!

              • 4. Re: app-name error in Jboss 5.1.0.GA
                peterj

                That means that app-name is not a valid construct in jboss-app.xml. Could you post your jboss-app.xml file and tell us a little bit about the app that you are deploying.

                • 5. Re: app-name error in Jboss 5.1.0.GA
                  sapozpa

                  Hi Peter

                   

                  The app I am deploying is basically a manual ear of Pentaho Bi Server 3.6.0. That's the latest build.

                   

                  http://sourceforge.net/projects/pentaho/files/

                   

                  The jboss-app.xml looks like this:

                   

                  <jboss-app>

                    <app-name>pentaho</app-name>

                   

                    <module>

                      <service>quartz-ds.xml</service>

                    </module>

                   

                    <module>

                      <service>PentahoHibernate-ds.xml</service>

                    </module>

                   

                    <module>

                      <service>sampledata-ds.xml</service>

                    </module>

                   

                    <!-- add datasources -->

                  </jboss-app>

                   

                  I tried adding the

                   

                  <!DOCTYPE jboss-app PUBLIC
                      "-//JBoss//DTD J2EE Application 4.2//EN"
                      "http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd"> or the 5.0 version

                   

                  to the top but that didn't help either although it gave me different error:

                   

                  JBossXBException: Failed to parse source: Element type "app-name" msut be declared. @ *unkown*[5,13] - thats after adding the above line. I also didn't touch the definition of dtd in fact if I am pointing to http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd I couldn't have changed it.

                   

                  Don't forget this same jboss-app.xml works fine in jboss 4.2.2 or 4.2.3 but not later then that.

                   

                  -p

                  • 6. Re: app-name error in Jboss 5.1.0.GA
                    peterj

                    Adding the jboss-app_4_2.dtd will not help - even that DTD does not define an app-name entry.

                     

                    >>Don't forget this same jboss-app.xml works fine in jboss 4.2.2 or 4.2.3 but not later then that.

                    As I wrote earlier, AS 5.x is pickier about conforming to the DTD. Essentially, the jboss-app.xml file you posted was always invalid; it is just that versions of AS before 5.0.0 did not care.

                     

                    My suggestion: remove the app-name entry.

                    • 7. Re: app-name error in Jboss 5.1.0.GA
                      peterj

                      Interestingly enough, the jboss-app_2_6.dtd file, which is used by JBoss Portal, defines an app-name entry. It just so happens that the app-name entry is the only entry allowed within jboss-app. In addition, this jboss-app.xml file must appear in the WEB-INF directory of a WAR containing portal code. I find it amazing that the JBoss dev team would name two completely different configuration files jboss-app.xml!

                      • 8. Re: app-name error in Jboss 5.1.0.GA
                        sapozpa

                        Peter

                         

                        Thank you! And this is quiet interesting. It did pass that validation by removing app-name. So what it was basically doing is it was validating the xml against the dtd - makes sense and dtd no where defined this app-name. So it couldn't validate. The only reason why jboss 4.2.2 worked is because it didn't validate properly? My jboss-app.xml actually lives in META-INF and not WEB-INF. In my WEB-INF I think there are no jboss-app.xml.