You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrf-dev@ws.apache.org by "Murray, Bryan P." <br...@hp.com> on 2005/03/25 09:03:21 UTC
MetaDataViolationException
I sent a GetResourceProperty request message to retrieve a property and
received a JAXRPCException with the following message: "Unexpected
error. Cause:
org.apache.ws.resource.properties.MetaDataViolationException: Property
element to add must be named ...". This is puzzling since I am just
reading a property.
The type for my property looks something like:
<xs:complexType name="FooType">
<xs:sequence>
<xs:element name="Spiffy" type="xs:hexBinary"
minOccurs="1" maxOccurs="unbounded"/>
<xs:element name="Type" type="x:TypeEnumeration"/>
<xs:element name="Name" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="Foo" type="x:FooType"/>
And the property is declared as follows in the resource property
document:
<xs:element ref="x:Foo"
minOccurs="0" maxOccurs="unbounded"/>
The documentation for MetaDataViolationException does not indicate the
conditions for which it will be thrown. The stack trace does not reach
my code, so I don't know what to change.
Can you help me understand why this exception is being thrown.
Thanks,
Bryan
---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org
Re: MetaDataViolationException
Posted by Ian Springer <ip...@apache.org>.
Hi Bryan,
It's too bad we're not logging the stack trace of the MDVE (I'll look at
remedying this). Looking at the source though, an MDVE with the message
"Property element to add must be named ..." is only thrown in one place
- XmlBeansResourceProperty#load(), which is only called in two places:
XmlBeansResourceProperty#add() and the constructor of
XmlBeansResourcePropertySet. Neither of these code paths should get
touched during processing of a GetRP request. Do you by any chance have
a ResourcePropertyCallback associated with the property? Perhaps in its
refreshProperty() impl you're calling XmlBeansResourceProperty#add()?
If none of the above helps you solve the problem, then it will be
necessary to attach to the JVM with a remote debugger and step through
the execution of the code. If you haven't done this before, I can help
you set it up; it's actually much easier than it sounds.
Ian
Murray, Bryan P. wrote:
>I sent a GetResourceProperty request message to retrieve a property and
>received a JAXRPCException with the following message: "Unexpected
>error. Cause:
>org.apache.ws.resource.properties.MetaDataViolationException: Property
>element to add must be named ...". This is puzzling since I am just
>reading a property.
>
>The type for my property looks something like:
> <xs:complexType name="FooType">
> <xs:sequence>
> <xs:element name="Spiffy" type="xs:hexBinary"
> minOccurs="1" maxOccurs="unbounded"/>
> <xs:element name="Type" type="x:TypeEnumeration"/>
> <xs:element name="Name" type="xs:string"/>
> </xs:sequence>
> </xs:complexType>
> <xs:element name="Foo" type="x:FooType"/>
>
>And the property is declared as follows in the resource property
>document:
> <xs:element ref="x:Foo"
> minOccurs="0" maxOccurs="unbounded"/>
>
>The documentation for MetaDataViolationException does not indicate the
>conditions for which it will be thrown. The stack trace does not reach
>my code, so I don't know what to change.
>
>Can you help me understand why this exception is being thrown.
>
>Thanks,
>Bryan
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: apollo-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: apollo-dev-help@ws.apache.org