Title: RE: [castor-user] Classloader hell with juinit and castor

I'm using the <junit> taskdef in ant. I changed the fork attribute from "yes" to "no" and got a little further.
What added to the confusion, was that I had a problem of my own in my Castor mapping file and I was blaming it on classloader problems.

With fork="no" and my problem fixed... everything works.

Thank's for your reply Nick, it made me look into the problem into more detail.

-----Original Message-----
From: Nick Stuart [mailto:[EMAIL PROTECTED]]
Sent: Friday, 29 October, 2004 1:31 PM
To: [EMAIL PROTECTED]
Subject: Re: [castor-user] Classloader hell with juinit and castor



First, yes, I have. Second, it shouldn't matter what you are trying to
run, be it a web-app, text based app, or a swing/gui app, castor
should work given the required libraries in the classpath. It sounds
like something else is screwy with your classpath, and not junit, as
junit is just another java app. Nothing special about it.

Perhaps post how you are running junit. Are you using Ant tasks? Going
through an IDE? Command line?

-Nick


On Fri, 29 Oct 2004 09:47:28 -0700, Gilles Maurice
<[EMAIL PROTECTED]> wrote:


>
> I'm encountering some classloader problems when trying to run a junit test
> which calls the Castor marshaller.
>
> Here are the combinations that I have tried and their effect...
> 1) using xerces-api.jar in the class path: junit itself fails because it
> can't find a class which is in rt.jar
> 2) using ant's xml-apis.jar in the class path: junit runs, but my test case
> falis looking for org/apache/xml/serialize/XMLSerializer
>
> 3) moving ant's xml-apis.jar in my third party directory: same result as 1)
> 4) having both jar files in the class path i.e. 1) and 2) together: junit
> runs, castor finds XMLSerializer, but my test case fails because the class
> loader can't find my own classes. :(
>
> Has anyone been able to run a junit test which uses castor?
> Thanks,
> Gilles


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



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

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

Reply via email to