Hi Ryan,

You need to add your namespace->package mappings in the
castor.properties file so that Castor can find the correct classes. This
way Castor knows how to find the classes based on their namespace.

If you've done that and you're still having problems, can you provide a
small-as-possible but complete example which demonstrates the issue so
that we can look into it here.

Thanks,

--Keith

Ryan Eberhard wrote:

>
>
> All,
>
> I'm seeing the following error unmarshaling a document immediately
> after marshaling that document with the same generated classes:
>
> org.exolab.castor.xml.MarshalException: unable to find FieldDescriptor
> for 'PolicyCacheControl' in ClassDescriptor of J2EEConfigType
>
> My document is based on two XML schemas, with one
> (xmlns="http://www.entegrity.com/assureaccess";) importing the other
> (xmlns="http://www.entegrity.com/assureservices";).  Using the source
> generator, I built classes for both schemas into two different Java
> packages and used castorbuilder.properties and the
> org.exolab.castor.builder.nspackages property to keep the packages
> straight (works great).
>
> Here is a simplified version of a document that exhibits the problem:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <AdapterConfigs xmlns="http://www.entegrity.com/assureaccess";>
>         <J2EEConfig>
>                 <ns1:PolicyCacheControl
> xmlns:ns1="http://www.entegrity.com/assureservices";>
> <ns1:PolicyCache>Forever</ns1:PolicyCache>
>
>                 </ns1:PolicyCacheControl>
>                 <URC>rootLDAP</URC>
>         </J2EEConfig>
> </AdapterConfigs>
>
> PolicyCacheControl and PolicyCache are indeed defined in
> "assureservices", while all of the other types are defined in
> "assureaccess".
>
> By trial and error, I found that removing the "ns1:" specifiers allows
> the document to parse, but I'm fairly sure this is not actually valid.
>
> I've seen variants on this question in the mailing list archives, but
> never the answer.  Can someone point me in the right direction or is
> this a known bug?
>
> Thanks,
> Ryan Eberhard
>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to