You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Joe San <co...@gmail.com> on 2012/08/24 19:02:22 UTC

Type Conversion Exception

Guys,

I have an xml for which I generated the xsd and using this xsd, I generated
my model objects using xjc.

When I tried them using my route, I got the following exception:

org.apache.camel.TypeConversionException: Error during type conversion from
type: com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl to the
required type: org.example.filexml.model.FileName with value [pss:person:
null] due null

Sounds to me like it has got something to do with the namespaces. What I
did was I created the xsd for the subset of my xml that I extracted from my
original xml. Could this be a reason to this?

Regards,
Jothi

RE: Type Conversion Exception

Posted by DEPREZ Arnaud AWL-IT <ar...@atos.net>.
Yes JAXB is namespace aware.

So your model classes (and so your xsd because you generated your model classes from your xsd), must have the same namespaces.

If you don't find any solution, please provide us an xml sample and your xsd.

KR,


Arnaud Deprez
Analyst-Programmer
Acquiring Back-Office
+32 2 727 72 09
arnaud.deprez@atos.net
Chaussee de Haecht 1442 Haachtsesteenweg
1130 Brussels
Belgium
atosworldline.be

 please don't print unless you really need to


-----Original Message-----
From: Joe San [mailto:codeintheopen@gmail.com]
Sent: vendredi 24 août 2012 19:02
To: users@camel.apache.org
Subject: Type Conversion Exception

Guys,

I have an xml for which I generated the xsd and using this xsd, I generated
my model objects using xjc.

When I tried them using my route, I got the following exception:

org.apache.camel.TypeConversionException: Error during type conversion from
type: com.sun.org.apache.xerces.internal.dom.DeferredElementNSImpl to the
required type: org.example.filexml.model.FileName with value [pss:person:
null] due null

Sounds to me like it has got something to do with the namespaces. What I
did was I created the xsd for the subset of my xml that I extracted from my
original xml. Could this be a reason to this?

Regards,
Jothi


Atos Worldline SA/NV - Chaussee de Haecht 1442 Haachtsesteenweg
- 1130 Brussels - Belgium
RPM-RPR Bruxelles-Brussel - TVA-BTW BE 0418.547.872
Bankrekening-Compte Bancaire-Bank Account 310-0269424-44
BIC BBRUBEBB - IBAN BE55 3100 2694 2444

"The information contained in this e-mail and any attachment thereto is confidential and may contain information which is protected by intellectual property rights.
This information is intended for the exclusive use of the recipient(s) named above.
This e-mail does not constitute any binding relationship or offer toward any of the addressees.
If you are not one of the addressees , one of their employees or a proxy holder entitled to hand over this message to the addressee(s), any use of the information contained herein (e.g. reproduction, divulgation, communication or distribution,...) is prohibited.
If you have received this message in error, please notify the sender and destroy it immediately after.
The integrity and security of this message cannot be guaranteed and it may be subject to data corruption, interception and unauthorized amendment, for which we accept no liability."