You get a default constructor in Java only if there are no constructors explicitly defined. As soon as you declare 1 or more explicit constructors then the compiler no longer inserts the default constructor.
When you said changing the code would be a nightmare, I took that to mean you had access to change the source, I did not realize that this is not an option for you. I also didn't realize you were marshalling only. Have you tried using direction="output" in your binding element? Mocky -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kumar Sent: Tuesday, August 02, 2005 6:32 AM To: [email protected] Subject: [jibx-users] JiBXException: Need no-argument constructor or factory for Hi Mocky, Thank you for the response. Your response holds good as long as I have control over the code which in my case is not and is from a third party. Also, I am not understanding why JiBX needs a no-argument constructor. If it is not explicitly there in the class then by default we always have one in java. Also according to the JiBX documentation, the no-arg constructor is used only during unmarshalling in my case I am using only to marshall and still the binding compiler complains with exception "org.jibx.runtime.JiBXException: Need no-argument constructor or factory for com.supz.Token". So in a nutshell if we dont have control on the thirdy party code that provides object instantiation not by using no-arg constructors then does it mean that we cannot use JiBX. Please correct me if my understanding is wrong. Thanks & Regards, Kr. ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=ick _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click _______________________________________________ jibx-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jibx-users
