[JBoss/Spring Integration] - Re: JBOSS5 + Spring Deployer version confusion
by dlmiles
"alesj" wrote : "dlmiles" wrote :
| | Surely there is some other qualifying requirement too. For example the *.deployer file name as well as requiring a META-INF/spring-deployers-beans.xml with outer element ?
| |
| The file has to be in metadata path, recognized by StructureDeployers.
|
| I don't know what you mean by *.deployers file name and requiring spring-deployers-beans.xml.
|
| To require exact outer element, it means it would always have to parse the file, to see what is the first element.
| I think the name + suffix are good enough to distinct deployment types.
| And with the new aspectized deployers, it's easy to swap out the behavior / add additional constraints.
|
The point I was getting at, is that no deployer should mindlessly attempt to deploy all files it finds at any nesting depth ending in *-beans.xml. This is mindless madness.
But I would be happy for it to have a look at all files and then attempt to parse the file as a JBoss specific deployment descriptor. Now during this process it should immediately see that my file has an XML Schema that belongs to Spring Framework. Upon seeing this the deployer should stop considering that file as a JBoss deployment descriptor and no exception should be thrown.
This is the point of having XSDs to ensure an application that is not meant to process some data, does not attempt to process it!
The JBoss deployer does not own all the files ending in *-beans.xml that the JBoss VFS can find, it only own those files that also match the DTD/XSD schemes that JBoss understands.
Of course it has to parse the file, its bl**dy well doing that now is not it! The error I reported is due to a deployment failure because the contents of the XML appeared to be garbage to the MBean deployer when it attempted deployment.
Renaming my file in my WAR from /WEB-INF/spring-beans.xml to /WEB-INF/spring-context.xml did the trick.
"dlmiles" wrote : I'm pretty sure this has been fixed in the Servlet web.xml DTD/XSD for a few years now, don't you just love validating parsers. Yes the plus character "+" is valid in a MIME type.
I have researched this issue and Tomcat 5.5.x has an updated web-app_2_4.xsd in servlet-api.jar but Tomcat 6.0.14 (the version I checked and the version shipped with JBoss AS 5.0.x) has not been updated. The Bugzilla ticket is at https://issues.apache.org/bugzilla/show_bug.cgi?id=44517 "web-app_2_4.xsd not up-to-date in TC6 servlet-api.jar"
For now I shall manually fix servlet-api.jar!javax/servlet/resources/web-app_2_4.xsd in my JBoss installation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133473#4133473
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133473
18 years, 1 month
[JBoss/Spring Integration] - Re: JBOSS5 + Spring Deployer version confusion
by alesj
"dlmiles" wrote :
| I'm surprised it could find it, none of my containment files are exploded.
|
It's called JBoss VFS. ;-)
"dlmiles" wrote :
| Surely there is some other qualifying requirement too. For example the *.deployer file name as well as requiring a META-INF/spring-deployers-beans.xml with outer element ?
|
The file has to be in metadata path, recognized by StructureDeployers.
I don't know what you mean by *.deployers file name and requiring spring-deployers-beans.xml.
To require exact outer element, it means it would always have to parse the file, to see what is the first element.
I think the name + suffix are good enough to distinct deployment types.
And with the new aspectized deployers, it's easy to swap out the behavior / add additional constraints.
"dlmiles" wrote :
| Now the next thing in the saga (not really spring related) :
|
| vfsfile:/data/opt/jboss-5.0.0.Beta4/server/default/deploy/Service.ear -> org.xml.sax.SAXException: cvc-pattern-valid: Value 'application/xhtml+xml' is not facet-valid with respect to pattern '
| | [\p{L}\-\p{Nd}]+/[\p{L}\-\p{Nd}\.]+' for type 'null'. @ *unknown*[164,47][/core]
| |
| | I'm pretty sure this has been fixed in the Servlet web.xml DTD/XSD for a few years now, don't you just love validating parsers. Yes the plus character "+" is valid in a MIME type.
I think you can always say to the parsing deployer that it should not validate.
And this info should be delegated fwd.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133472#4133472
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133472
18 years, 1 month
[JBoss/Spring Integration] - Re: JBOSS5 + Spring Deployer version confusion
by dlmiles
Thank you for your replies again.
Picks up ? Ah I see the error is from the deployer trying to deploy something as a JBoss service which is actually contained inside my EAR which has a WAR and in my /WEB-INF/spring.beans.xml. I'm surprised it could find it, none of my containment files are exploded.
Surely there is some other qualifying requirement too. For example the *.deployer file name as well as requiring a META-INF/spring-deployers-beans.xml with outer element ?
I'm thinking that just having the name should never be enough but being the correct name and having a well formed data inside qualifies it for being picked up and special treatment. Anything not matching all of the requirements should elicit a warning and then be put back down (and ignored for further pickups until its timestamp changes again). The warning would be along the lines of foobar-bean.xml file does not contain outer element, ignoring file and returning.
Also if there is a clearly DTD or XSD described in the *-beans.xml for which the deployer does not understand then no warning should be emitted for INFO log level. But possible to see the attempted pickup at DEBUG level.
Now the next thing in the saga (not really spring related) :
vfsfile:/data/opt/jboss-5.0.0.Beta4/server/default/deploy/Service.ear -> org.xml.sax.SAXException: cvc-pattern-valid: Value 'application/xhtml+xml' is not facet-valid with respect to pattern '
| [\p{L}\-\p{Nd}]+/[\p{L}\-\p{Nd}\.]+' for type 'null'. @ *unknown*[164,47][/core]
|
| I'm pretty sure this has been fixed in the Servlet web.xml DTD/XSD for a few years now, don't you just love validating parsers. Yes the plus character "+" is valid in a MIME type.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4133467#4133467
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4133467
18 years, 1 month