Thanks, David. I'll be looking at this today ....

Werner

Karr, David wrote:
> I've managed to build a standalone test case for this, and I've filed an
> issue (CASTOR-1894).  I tried to find a similar issue, but it's hard to
> tell whether the existing issues that talk about "IDREF" are the same
> problem.
> 
> My schema guts are just:
> 
> <xs:complexType name="BarType">
>  </xs:complexType>
>  <xs:complexType name="FooType">
>   <xs:sequence>
>    <xs:element name="Bar" type="BarType"/>
>   </xs:sequence>
>   <xs:attribute name="Thing" type="xs:IDREF" use="required"/>
>  </xs:complexType>
>  <xs:element name="Foo" type="FooType"/>
> 
> And my Java code is just this:
> 
>         Foo foo = new Foo();
>         foo.setBar(new Bar());
>         foo.setThing("abc");
>         StringWriter    writer  = new StringWriter();
>         foo.marshal(writer); 
> 
> And this produces:
> 
> Unable to resolve ID for instance of class 'java.lang.String' due to the
> following error: Unable to resolve ClassDescriptor.
> 
>> -----Original Message-----
>> From: Karr, David 
>> Sent: Friday, March 02, 2007 10:16 AM
>> To: [email protected]
>> Subject: [castor-user] Getting "Unable to resolve ID for 
>> instance of class 'java.lang.String' due to the following 
>> error: Unable to resolve ClassDescriptor."
>>
>> V0.9.6, JDK 1.4.2.
>>
>> A colleague of mine is getting the following error when he 
>> marshals an object to XML:
>>
>> Unable to resolve ID for instance of class 'java.lang.String' 
>> due to the following error: Unable to resolve ClassDescriptor.
>>
>> He's using a pretty simple binding file to deal with some 
>> types and elements with the same name, so I don't think it's 
>> an issue with the binding file.
>>
>> I looked at the definition of the element associated with the 
>> object and followed the trail of definitions.  The only thing 
>> that strikes a chord with me is that one of the elements 
>> defines an attribute whose type is a restriction on xs:string 
>> (defines the maxlength and allowable patterns).
>> Does that point to the problem, or not?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to