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.
I see so I think I need to look at the dtd to figure out where it has to go?
The dtd actually says nothing about the app-name. So I am still puzzled!
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.
The app I am deploying is basically a manual ear of Pentaho Bi Server 3.6.0. That's the latest build.
The jboss-app.xml looks like this:
<!-- add datasources -->
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.
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.
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!
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.