Got it

Not a pblm with JiBX as thought but I'm posting the solution as someone else might 
face the same problem :)

It was a ClassLoader issue : when using a GUI JUnit uses a specific classloader to 
load the classes. A solution is to use the junit.textui.TestRunner instead of 
junit.swingui.TestRunner

Gilles

-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Dennis Sosnoski
Envoy� : mercredi 13 octobre 2004 16:51
� : [EMAIL PROTECTED]
Objet : Re: [jibx-users] JiBX and JUnit testing

It sounds like a classpath problem, though I don't understand offhand how it could 
create this particular error. The marshaller/unmarshaller classes are created by the 
binding compile so they'll always implement this interface. Having one fail this cast 
seems to say that you're somehow getting the JiBX classes loaded by two separate 
classloaders.

  - Dennis

Gilles Devaux wrote:

> Hello,
>  
> I've writen a few JUnit tests for my application, If I run the test 
> integrated into Eclipse JUnit manager it works perferctly, but if I 
> run it as a standalone application I get the following error:
>  
> "Unable to create marshaller of class" (ClassCastException in
> MarsahllingContext:887)
>  
> The line is:
> IMarshaller m = (IMarshaller)clas.newInstance();
>  
> When I try to debug this, the clas object reprensents the same class 
> name (the JiBX generated class) in both case. So I don't really 
> understand what's going wrong.
>  
> Thanks for your help
> Gilles



-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT 
products in your business? Tell us what you think of them. Give us Your Opinions, Get 
Free ThinkGeek Gift Certificates! Click to find out more 
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to