[
https://jira.jboss.org/jira/browse/JBAS-4193?page=com.atlassian.jira.plug...
]
Alexey Loubyansky commented on JBAS-4193:
-----------------------------------------
I am not sure whether it still makes sense to keep this issue open since there is a
property in parsing deployers that enable/disable validation. E.g. here is a snippet from
ear-deployer-jboss-beans.xml
<bean name="EARStructureDeployer"
class="org.jboss.deployment.EARStructure">
<property
name="comparatorClassName">org.jboss.system.deployers.LegacyDeploymentContextComparator</property>
<!-- uncomment to disable xml validation property
name="useValidation">false</property -->
</bean>
<!-- application.xml parsing deployer -->
<bean name="AppParsingDeployer"
class="org.jboss.deployment.AppParsingDeployer">
<property name="useValidation"><inject
bean="EARStructureDeployer"
property="useValidation"/></property>
<!-- in case xml validation is disabled, it's also better to turn off schema
validation property name="useSchemaValidation">false</property -->
</bean>
In addition, looking at the current testsuite resources, all the application.xml
descriptors that used to have this issue now contain module elements listing SARs in
<java>. E.g.
<application version="1.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/application_1_4.xsd"
<module>
<ejb>Atestdeployerorder-jbas2904.sar</ejb>
</module>
<module>
<ejb>Btestdeployerorder-jbas2904.sar</ejb>
</module>
</application>
Validation requirement should come from the model factory
---------------------------------------------------------
Key: JBAS-4193
URL:
https://jira.jboss.org/jira/browse/JBAS-4193
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Deployers, XML services
Reporter: Scott M Stark
Assignee: Alexey Loubyansky
Fix For: JBossAS-6.0.0.M3
A regression relative to how we parse application.xml without validation jbossas4.2 and
earlier is showing up in placeholder application.xml deployments like:
<!DOCTYPE application PUBLIC
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
"http://java.sun.com/dtd/application_1_3.dtd">
<application>
<display-name>Resource Loading Ear</display-name>
</application>
This fails because this dtd requires at least one module as well:
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: vfsfil
e:/C:/home/svn/JBossHead/jboss-head/testsuite/output/lib/unpacked/loadingresourc
e2.ear/META-INF/application.xml@7,15
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars
er.java:173)
at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java
:180)
at org.jboss.deployers.plugins.deployers.helpers.ObjectModelFactoryDeplo
yer.parse(ObjectModelFactoryDeployer.java:83)
... 70 more
Caused by: org.xml.sax.SAXException: The content of element type "application"
i
s incomplete, it must match "(icon?,display-name,description?,module+,security-r
ole*)". @ vfsfile:/C:/home/svn/JBossHead/jboss-head/testsuite/output/lib/unpacke
d/loadingresource2.ear/META-INF/application.xml[7,15]
at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler
.error(SaxJBossXBParser.java:406)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown S
To allow for similar behavior, we need to allow the ObjectModelFactory used by the
deployer to indicate whether validation is needed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira