geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sachin Patel <>
Subject SchemaConversions (was Re: [Fwd: Re: rid of all ns prefixes])
Date Thu, 13 Oct 2005 13:28:52 GMT

So an validation exception is being thrown on my call to 
SchemaConversionUtil.fixGeronimoSchema(...) and can't seem to figure out 
why... Perhaps you can shed some light?

I start with the following hand written plan...

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="" 

I then call the following snippet of code...

XmlObject plan = XmlBeansUtil.parse(dpFile.getLocation().toFile().toURL());
WebAppDocument webDoc = (WebAppDocument) 
WebAppType web = (WebAppType) 
SchemaConversionUtils.fixGeronimoSchema(webDoc, "web-app", 

The following exception is thrown although the converted plan in the 
exception seems to be correct...

org.apache.xmlbeans.XmlException: Invalid deployment descriptor: [error: 
cvc-complex-type.3.2.1: Attribute not allowed (no wildcards allowed): 
configId, error: cvc-complex-type.2.4a: Expected element 
'web-app@' instead of 
'context-root@' here, 
error: cvc-complex-type.2.4a: Expected element 
'web-app@' instead of 
here, error: cvc-complex-type.2.4a: Expected element 
'web-app@' instead of 
'resource-env-ref@' here, 
error: cvc-complex-type.2.4c: Expected element 
'web-app@' before the end of the content]

Descriptor: <xml-fragment configId="test/test" 

Any ideas as to what is wrong?



David Jencks wrote:
> On Oct 11, 2005, at 6:04 PM, Sachin Patel wrote:
>> David Jencks wrote:
>>> I'd have the issue say that the eclipse stuff should pre-convert the 
>>> plans using SchemaConversionUtils.  We'll find out soon enough what 
>>> needs to change :-)  Is there an easy to find point in the eclipse 
>>> stuff where you know what kind of plan it is and want to convert it?
>> Well when importing a J2EE app or module into WTP a new 
>> "project/component" is always created for every module in that 
>> application and so I'll know every module type and thus should 
>> automatically know the j2ee plan type during the import.  This import 
>> operation is extendable and I'll be able to do this conversion then 
>> for every module.  (With nested plans, it may be a little tricker, 
>> will have to put some thought into that...)
> An ear plan always has namespaces for the plans for the modules.  They 
> could be the old unversioned namespaces (missing -1.0 at the end) but 
> they are sufficient to identify what you should end up with.  The web 
> plans are a little trickier, since after figuring out which builder we 
> will use the generic geronimo-web docs are converted to 
> container-specific docs.  Are you planning to generate generic web 
> plans or container specific web plans or give the user a choice?
> An ear plan will still need some namespace conversion to get the 
> dependencies and gbeans.
> thanks
> david jencks

View raw message