[jboss-dev] changes in parsing with xb

David M. Lloyd david.lloyd at redhat.com
Tue Apr 7 14:01:56 EDT 2009


Just the fact that there's a bunch of descriptors that we've distributed 
which don't even conform to the schema really, really sucks.

For one thing, there are lots of XML editors out there which will tell you 
if you've violated the schema.  For another thing, if the violating 
descriptors still deploy, then maybe the XSD are more strict than they 
ought to be (I already mentioned one case of this here: 
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=153482 ).

I think that since compatibility with prior versions is a concern, the only 
logical course of action is to modify the XSD to be more lenient.

- DML

On 04/07/2009 12:55 PM, Carlo de Wolf wrote:
> Testsuite shows a 100% regression as minimal fails to boot up.
> 
> Failed to boot JBoss:
> org.jboss.xb.binding.JBossXBException: Failed to parse source: 
> file:/home/hudson/.hudson/jobs/JBoss-AS-5.x-TestSuite-sun15/workspace/Branch_5_x/build/output/jboss-5.1.0.CR1/server/minimal/conf/bootstrap/deployers.xml at 46,56 
> 
> Caused by: org.jboss.xb.binding.JBossXBRuntimeException: 
> {urn:jboss:bean-deployer:2.0}incallback cannot appear in this position. 
> Expected content of {urn:jboss:bean-deployer:2.0}bean is sequence: 
> {urn:jboss:bean-deployer:2.0}alias* 
> {urn:jboss:bean-deployer:2.0}related-class* 
> {urn:jboss:bean-deployer:2.0}annotation* 
> {urn:jboss:bean-deployer:2.0}classloader? 
> {urn:jboss:bean-deployer:2.0}constructor? 
> {urn:jboss:bean-deployer:2.0}property* 
> {urn:jboss:bean-deployer:2.0}create? {urn:jboss:bean-deployer:2.0}start? 
> {urn:jboss:bean-deployer:2.0}stop? {urn:jboss:bean-deployer:2.0}destroy? 
> {urn:jboss:bean-deployer:2.0}depends* 
> {urn:jboss:bean-deployer:2.0}demand* 
> {urn:jboss:bean-deployer:2.0}supply* 
> {urn:jboss:bean-deployer:2.0}install* 
> {urn:jboss:bean-deployer:2.0}uninstall* 
> {urn:jboss:bean-deployer:2.0}incallback* 
> {urn:jboss:bean-deployer:2.0}uncallback*
> 
> I'm inclined to do a rollback, because anything coming in *must* be 
> backwards compatible.
> A log.warn instead of a failure would have been better.
> 
> I'll give it 24 hours to be fixed.
> 
> Your friendly BOFH,
> 
> Carlo
> 
> Alexey Loubyansky wrote:
>> There have been many fixes in the last two beta releases of XB that 
>> will affect AS and other users.
>> Most noticeable changes/fixes are related to internal navigation 
>> across schema structures during XML parsing. In simple words, XB is 
>> now (much) more sensitive to validation issues (incorrect element 
>> order, etc).
>> Some files that could be parsed before, now (with default settings) 
>> won't. WRT AS it would be e.g. vfs, aop xml etc.
>>
>> To workaround this, you can set system property 
>> xb.builder.useUnorderedSequence to true. This will make the order in 
>> which elements from a sequence appear in xml not important.
>> Alternatively, you can call 
>> JBossXBBuilder.setUseUnorderedSequence(boolean value) or use 
>> annotation 
>> @JBossXmlModelGroup(kind=JBossXmlConstants.MODEL_GROUP_UNORDERED_SEQUENCE) 
>> to bind classes to unordered sequences.
>>
>> But this has to remain a workaround, not the default. There has to be 
>> a good reason to use unordered sequences. Fix your XML and binding now.
>>
>> The latest XB has not been integrated into the AS yet (although, I ran 
>> some tests from the AS testsuite locally) due to dependency on changes 
>> in VFS and deployers:
>> https://jira.jboss.org/jira/browse/JBVFS-99
>> https://jira.jboss.org/jira/browse/JBDEPLOY-173
>>
>> The latest metadata release (1.0.0.CR17) requires at least XB 
>> 2.0.1.Beta3.
>>
>> If you are using XB, please, try the latest beta.
>>
>> Here are release notes for XB 2.0.1.Beta3
>> https://jira.jboss.org/jira/secure/ReleaseNote.jspa?version=12313320&styleName=Html&projectId=10069 
>>
>>
>> and XB 2.0.1.Beta2
>> https://jira.jboss.org/jira/secure/ReleaseNote.jspa?version=12313217&styleName=Html&projectId=10069 
>>
>> _______________________________________________
>> jboss-development mailing list
>> jboss-development at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-development
> 
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development



More information about the jboss-development mailing list