You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Sachin Patel <sp...@gmail.com> on 2005/12/02 00:13:26 UTC

I'm deploying a simple web app with a dummpy resource-ref on a recent
snapshot and I'm unable to deploy as I get the exception below. If I remove
the target-name element, it deploys.

Why am I getting a "Element not allowed" validation error when this is a
valid element in the schema?


Caused by: org.apache.xmlbeans.XmlException: Invalid deployment descriptor:
[error: cvc-complex-type.2.4b: Element not allowed:
target-name@http://geronimo.apache.org/xml/ns/naming-1.0 in element
resource-ref@http://geronimo.apache.org/xml/ns/naming-1.0]
Descriptor:
<xml-fragment configId="test/test"
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
xmlns:jet="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">

<jet:context-root>/test</jet:context-root>

<jet:context-priority-classloader>false</jet:context-priority-classloader>

<nam:resource-ref>
    <nam:ref-name>foo</nam:ref-name>

<nam:resource-link>bar</nam:resource-link>
    <nam:target-name/>blah

</nam:resource-ref>
</xml-fragment>
    at
org.apache.geronimo.schema.SchemaConversionUtils.validateDD(SchemaConversion
Utils.java:594)
    at
org.apache.geronimo.jetty.deployment.JettyModuleBuilder.getJettyWebApp(Jetty
ModuleBuilder.java:321)
    ... 72 more



targetName problem [was Re: ]

Posted by Sachin Patel <sp...@gmail.com>.
Doh! Thanks.  Sorry for the <no subject>, was in a rush to head out the door
and hit send soon realizing I forgot the all important Subject :)


On 12/1/05 6:28 PM, "David Jencks" <da...@yahoo.com> wrote:

> resource link and target name are exclusive choices, not a sequence or
> all.
> 
> david jencks
> 
> On Dec 1, 2005, at 3:13 PM, Sachin Patel wrote:
> 
>> I'm deploying a simple web app with a dummpy resource-ref on a recent
>> snapshot and I'm unable to deploy as I get the exception below. If I
>> remove
>> the target-name element, it deploys.
>> 
>> Why am I getting a "Element not allowed" validation error when this is
>> a
>> valid element in the schema?
>> 
>> 
>> Caused by: org.apache.xmlbeans.XmlException: Invalid deployment
>> descriptor:
>> [error: cvc-complex-type.2.4b: Element not allowed:
>> target-name@http://geronimo.apache.org/xml/ns/naming-1.0 in element
>> resource-ref@http://geronimo.apache.org/xml/ns/naming-1.0]
>> Descriptor:
>> <xml-fragment configId="test/test"
>> xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
>> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
>> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
>> xmlns:jet="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">
>> 
>> <jet:context-root>/test</jet:context-root>
>> 
>> <jet:context-priority-classloader>false</jet:context-priority-
>> classloader>
>> 
>> <nam:resource-ref>
>>     <nam:ref-name>foo</nam:ref-name>
>> 
>> <nam:resource-link>bar</nam:resource-link>
>>     <nam:target-name/>blah
>> 
>> </nam:resource-ref>
>> </xml-fragment>
>>     at
>> org.apache.geronimo.schema.SchemaConversionUtils.validateDD(SchemaConve
>> rsion
>> Utils.java:594)
>>     at
>> org.apache.geronimo.jetty.deployment.JettyModuleBuilder.getJettyWebApp(
>> Jetty
>> ModuleBuilder.java:321)
>>     ... 72 more
>> 
>> 
> 



Re:

Posted by David Jencks <da...@yahoo.com>.
resource link and target name are exclusive choices, not a sequence or  
all.

david jencks

On Dec 1, 2005, at 3:13 PM, Sachin Patel wrote:

> I'm deploying a simple web app with a dummpy resource-ref on a recent
> snapshot and I'm unable to deploy as I get the exception below. If I  
> remove
> the target-name element, it deploys.
>
> Why am I getting a "Element not allowed" validation error when this is  
> a
> valid element in the schema?
>
>
> Caused by: org.apache.xmlbeans.XmlException: Invalid deployment  
> descriptor:
> [error: cvc-complex-type.2.4b: Element not allowed:
> target-name@http://geronimo.apache.org/xml/ns/naming-1.0 in element
> resource-ref@http://geronimo.apache.org/xml/ns/naming-1.0]
> Descriptor:
> <xml-fragment configId="test/test"
> xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
> xmlns:jet="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">
>
> <jet:context-root>/test</jet:context-root>
>
> <jet:context-priority-classloader>false</jet:context-priority- 
> classloader>
>
> <nam:resource-ref>
>     <nam:ref-name>foo</nam:ref-name>
>
> <nam:resource-link>bar</nam:resource-link>
>     <nam:target-name/>blah
>
> </nam:resource-ref>
> </xml-fragment>
>     at
> org.apache.geronimo.schema.SchemaConversionUtils.validateDD(SchemaConve 
> rsion
> Utils.java:594)
>     at
> org.apache.geronimo.jetty.deployment.JettyModuleBuilder.getJettyWebApp( 
> Jetty
> ModuleBuilder.java:321)
>     ... 72 more
>
>


Re:

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
On 12/1/05, Aaron Mulder <am...@alumni.princeton.edu> wrote:
> I would guess because you have "<target-name />blah" instead of
> "<target-name>blah</target-name>"

Ah - I guess David had the better answer.  :)

Aaron

> On 12/1/05, Sachin Patel <sp...@gmail.com> wrote:
> > I'm deploying a simple web app with a dummpy resource-ref on a recent
> > snapshot and I'm unable to deploy as I get the exception below. If I remove
> > the target-name element, it deploys.
> >
> > Why am I getting a "Element not allowed" validation error when this is a
> > valid element in the schema?
> >
> >
> > Caused by: org.apache.xmlbeans.XmlException: Invalid deployment descriptor:
> > [error: cvc-complex-type.2.4b: Element not allowed:
> > target-name@http://geronimo.apache.org/xml/ns/naming-1.0 in element
> > resource-ref@http://geronimo.apache.org/xml/ns/naming-1.0]
> > Descriptor:
> > <xml-fragment configId="test/test"
> > xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
> > xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
> > xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
> > xmlns:jet="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">
> >
> > <jet:context-root>/test</jet:context-root>
> >
> > <jet:context-priority-classloader>false</jet:context-priority-classloader>
> >
> > <nam:resource-ref>
> >     <nam:ref-name>foo</nam:ref-name>
> >
> > <nam:resource-link>bar</nam:resource-link>
> >     <nam:target-name/>blah
> >
> > </nam:resource-ref>
> > </xml-fragment>
> >     at
> > org.apache.geronimo.schema.SchemaConversionUtils.validateDD(SchemaConversion
> > Utils.java:594)
> >     at
> > org.apache.geronimo.jetty.deployment.JettyModuleBuilder.getJettyWebApp(Jetty
> > ModuleBuilder.java:321)
> >     ... 72 more
> >
> >
> >
>

Re:

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
I would guess because you have "<target-name />blah" instead of
"<target-name>blah</target-name>"

Aaron

On 12/1/05, Sachin Patel <sp...@gmail.com> wrote:
> I'm deploying a simple web app with a dummpy resource-ref on a recent
> snapshot and I'm unable to deploy as I get the exception below. If I remove
> the target-name element, it deploys.
>
> Why am I getting a "Element not allowed" validation error when this is a
> valid element in the schema?
>
>
> Caused by: org.apache.xmlbeans.XmlException: Invalid deployment descriptor:
> [error: cvc-complex-type.2.4b: Element not allowed:
> target-name@http://geronimo.apache.org/xml/ns/naming-1.0 in element
> resource-ref@http://geronimo.apache.org/xml/ns/naming-1.0]
> Descriptor:
> <xml-fragment configId="test/test"
> xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0"
> xmlns:sec="http://geronimo.apache.org/xml/ns/security-1.1"
> xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.0"
> xmlns:jet="http://geronimo.apache.org/xml/ns/j2ee/web/jetty-1.0">
>
> <jet:context-root>/test</jet:context-root>
>
> <jet:context-priority-classloader>false</jet:context-priority-classloader>
>
> <nam:resource-ref>
>     <nam:ref-name>foo</nam:ref-name>
>
> <nam:resource-link>bar</nam:resource-link>
>     <nam:target-name/>blah
>
> </nam:resource-ref>
> </xml-fragment>
>     at
> org.apache.geronimo.schema.SchemaConversionUtils.validateDD(SchemaConversion
> Utils.java:594)
>     at
> org.apache.geronimo.jetty.deployment.JettyModuleBuilder.getJettyWebApp(Jetty
> ModuleBuilder.java:321)
>     ... 72 more
>
>
>