Hi Praveen,

I might have actually missed the Jira issue being created, but it looks like you actually have not created one. Is this correct ?

Regards
Werner

On 12.08.2010 19:15, Ralf Joachim wrote:
Hi Praveen,

as already suggested on IRC it will be best to create a new jira issue
for this and attach a minimal test case to reproduce the problem. Also
note that the failure is difficult to reproduce at it is caused by
processing sequence of complex types which depends on hash algorith of
HashTable. To me it sound reasonable to replace HashTable by
LinkedHashMap as you suggested. If possible also attach a patch for this
change.

Regards
Ralf

Gattu, Praveen schrieb:

http://www.mail-archive.com/[email protected]/msg01049.html

http://www.mail-archive.com/[email protected]/msg02437.html

I am facing similar issue that is described in the above two threads.
I debugged this issue and this is what I found.

When Castor is generating source code for the complex types in
org.exolab.castor.builder.SourceGenerator.java, it calls
getComplexTypes on org.exolab.castor.xml.schema.Schema. However the
list of complex types that are returned are not in any particular
order. In my case the order in which these complex types were
generated was such that, Complex type A is processed first which
contains complex type B. Type “B” is declared as abstract. However
source code for type “B” is not yet generated, so as far as castor
code is concerned it doesn’t know this is a abstract type.

Now when it generates the class descriptor class for type “A”  and
creates the XMLFieldHandler inner class  and implements the
newInstance method, it doesn’t know if “B” is abstract or not, and by
default it is false. As a result “B” is getting instantiated.

Once the class “B” is created, it is correctly identified as abstract,
and the class descriptor of “A” fails to compile.

Currently I fixed this issue by having code such that complex types
are processed in a predictable order.

Any pointers on how to fix this correctly? Isn’t it a good idea to
process the complex types in the order that was defined in the schema?

Thanks,

-Praveen

--

Syscon Ingenieurbüro für Meß- und Datentechnik GmbH
Ralf Joachim
Raiffeisenstraße 11
72127 Kusterdingen
Germany

Tel.   +49 7071 3690 52
Mobil: +49 173 9630135
Fax    +49 7071 3690 98

Internet:www.syscon.eu
E-Mail:[email protected]

Sitz der Gesellschaft: D-72127 Kusterdingen
Registereintrag: Amtsgericht Stuttgart, HRB 382295
Geschäftsleitung: Jens Joachim, Ralf Joachim

--------------------------------------------------------------------- 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