ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: Junit Task, VerifyError, Log4J LogManager
Date Wed, 14 Aug 2002 12:17:03 GMT
Is there some other "optional.jar" there, perhaps?  maybe like an 
ant-optional.jar, that you'd need to remove?

James Krygowski wrote:
> Ok- so I rebuilt the ant and optional jars and still the problem persists.
> The funny part is that all the verify errors occur for classes in the ant
> jar.  **AND** the verify errors only occur if the optional jar is in the
> idea/lib directory!  The first verify error came with EmailTask.  I don't
> refer to that task anywhere in my build script.  As an experiment, I deleted
> the EmailTask from the jar.  Unfortunately, the AbstractCVSTask now fails to
> Verify.
> 
> This is a totally perplexing problem.  It seems like some kind of freaky
> class loader issue, but, when I put the ant 1.4 optional jar into the
> idea/lib directory, everything works fine (the sad thing is that this was
> all prompted by the fact that the optional junit task in 1.4 seemed to be
> having problems with verifying Log4J).  Which would make me think that I
> screwed up and had a 1.4 Ant jar in there all along.  However, I've gone
> through it several times and I have in fact, put a 1.5 jar.
> 
> This whole thing seems like it ought to be very simple.  What could IDEA be
> doing to screw this up??
> 
> 
> 
> 
>>-----Original Message-----
>>From: James Krygowski [mailto:james.krygowski@shaws.com]
>>Sent: Tuesday, August 13, 2002 3:31 PM
>>To: Ant Users List
>>Subject: RE: Junit Task, VerifyError, Log4J LogManager
>>
>>
>>Hi Erik-
>>
>>thanks for your quick replies-
>>
>>In answer to your question, yes i've done a complete cut and paste from my
>>ant1.5/lib dir to my idea/lib dir.  So, all the jar files (ant.jar,
>>optional.jar, etc.) are all up to date.  I'm considering rebuilding
>>optional.jar against the ant.jar in hopes that that clears up the problems
>>with the verifyerror.
>>
>>
>>>-----Original Message-----
>>>From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
>>>Sent: Tuesday, August 13, 2002 2:48 PM
>>>To: Ant Users List
>>>Subject: Re: Junit Task, VerifyError, Log4J LogManager
>>>
>>>
>>>Did you copy ant.jar also?  They come as a set!  :)
>>>
>>>James Krygowski wrote:
>>>
>>>>Hi Erik-
>>>>
>>>>when i copy my optional.jar over to my idea lib directory, i
>>>
>>>end up with a
>>>
>>>>verify error:
>>>>
>>>>java.lang.VerifyError: (class:
>>>>org/apache/tools/ant/taskdefs/email/EmailTask, method: execute
>>>
>>>signature:
>>>
>>>>()V) Incompatible object argument for function call
>>>>
>>>>which seems kind of strange.
>>>>
>>>>jk
>>>>
>>>>
>>>>
>>>>>-----Original Message-----
>>>>>From: Erik Hatcher [mailto:jakarta-ant@ehatchersolutions.com]
>>>>>Sent: Tuesday, August 13, 2002 2:32 PM
>>>>>To: Ant Users List
>>>>>Subject: Re: Junit Task, VerifyError, Log4J LogManager
>>>>>
>>>>>
>>>>>I'm running 1.5 (well, 1.6alpha, actually) in IDEA.  Just copy ant.jar
>>>>>and optional.jar over to IDEA's lib directory, and of course any other
>>>>>dependencies.  Basically my IDEA lib directory is mostly a
>>>>
>>mirror image
>>
>>>>>of my ANT_HOME/lib directory.  Ugly duplication, but it works
>>>>
>>>fine for me.
>>>
>>>>>James Krygowski wrote:
>>>>>
>>>>>
>>>>>>Check that--- i can get it to work using Ant 1.5, but not 1.4....
>>>>>>unfortunately I can't get 1.5 to run in IDEA
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>>-----Original Message-----
>>>>>>>From: James Krygowski [mailto:james.krygowski@shaws.com]
>>>>>>>Sent: Tuesday, August 13, 2002 2:00 PM
>>>>>>>To: Ant Users List
>>>>>>>Subject: RE: Junit Task, VerifyError, Log4J LogManager
>>>>>>>
>>>>>>>
>>>>>>>Hi -
>>>>>>>
>>>>>>>I am running with fork=true for my batchtest tag.  I've also
>>>>>>
>>>>>tried setting
>>>>>
>>>>>
>>>>>>>fork=true for the junit tag and all permutations between
>>>>>>
>>>junit/batchtest
>>>
>>>>>>>defining fork=true.  They all result in the same verify error.
>>>>>>>BTW this is
>>>>>>>true for 1.4 and 1.5.
>>>>>>>
>>>>>>>  <target depends="init,all" description="Execute all JUnit
Tests"
>>>>>>>name="junit">
>>>>>>>      <junit printsummary="yes" haltonfailure="yes">
>>>>>>>
>>>>>>>        <classpath>
>>>>>>>          <pathelement location="${build}" />
>>>>>>>          <pathelement path="${java.class.path}" />
>>>>>>>        </classpath>
>>>>>>>
>>>>>>>        <formatter type="plain" />
>>>>>>>
>>>>>>>        <batchtest fork="true" todir="${reports.tests}"
>>>>>>>haltonfailure="no"
>>>>>>>
>>>>>>>          <fileset dir="${src}">
>>>>>>>            <include name="**/*Test*.java" />
>>>>>>>            <exclude name="**/TestOfAllTest.java" />
>>>>>>>            <exclude name="**/PerformanceTest.java" />
>>>>>>>          </fileset>
>>>>>>>           <formatter type="xml" />
>>>>>>>        </batchtest>
>>>>>>>      </junit>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>>-----Original Message-----
>>>>>>>>From: Dominique Devienne [mailto:DDevienne@lgc.com]
>>>>>>>>Sent: Tuesday, August 13, 2002 1:46 PM
>>>>>>>>To: 'Ant Users List'
>>>>>>>>Subject: RE: Junit Task, VerifyError, Log4J LogManager
>>>>>>>>
>>>>>>>>
>>>>>>>>Add the fork=true to <junit>. It might solve it. --DD
>>>>>>>>
>>>>>>>>-----Original Message-----
>>>>>>>>From: James Krygowski [mailto:james.krygowski@shaws.com]
>>>>>>>>Sent: Tuesday, August 13, 2002 12:33 PM
>>>>>>>>To: ant-user@jakarta.apache.org
>>>>>>>>Subject: Junit Task, VerifyError, Log4J LogManager
>>>>>>>>
>>>>>>>>Hi All-
>>>>>>>>
>>>>>>>>I've got a suite of JUnit tests that I'd like to run in Ant
using
>>>>>>>>the JUNIT
>>>>>>>>task.  I've set up the task and it does run all my tests,
>>>>>>>>however, any tests
>>>>>>>>that include Log4J fail with the following (output from
>>>>>>>
>>the Ant Junit
>>
>>>>>>>>Report):
>>>>>>>>
>>>>>>>>Testcase: testGetInstanceOfFactory took 0.24 sec
>>>>>>>>	Caused an ERROR
>>>>>>>>(class: org/apache/log4j/LogManager, method: <clinit>
>>>>>>>
>>signature: ()V)
>>
>>>>>>>>Incompatible argument to function
>>>>>>>>java.lang.VerifyError: (class: org/apache/log4j/LogManager,
>>>>>>>>method: <clinit>
>>>>>>>>signature: ()V) Incompatible argument to function
>>>>>>>>
>>>>>>>>If I run the same tests outside of Ant they run just fine.
 I've
>>>>>>>>checked my
>>>>>>>>classpath and there is only one instance of the Log4J jar
on the
>>>>>>>>classpath.
>>>>>>>>The classpath being used by Ant is identical to the classpath
in
>>>>>>>>the IDE I'm
>>>>>>>>using to run the unit tests.
>>>>>>>>
>>>>>>>>Is this some kind of strange Ant class loader issue?  Does
>>>>>>>
>>>>>anyone have a
>>>>>
>>>>>
>>>>>>>>suggestion for fixing this?
>>>>>>>>
>>>>>>>>thanks,
>>>>>>>>
>>>>>>>>jk
>>>>>>>>
>>>>>>>>
>>>>>>>>--
>>>>>>>>To unsubscribe, e-mail:
>>>>>>>
>>>>>><mailto:ant-user-unsubscribe@jakarta.apache.org>
>>>>>>
>>>>>>>For additional commands, e-mail:
>>>>>>
>>>><mailto:ant-user-help@jakarta.apache.org>
>>>>
>>>>>>--
>>>>>>To unsubscribe, e-mail:
>>>>>
>><mailto:ant-user-unsubscribe@jakarta.apache.org>
>>
>>>>>For additional commands, e-mail:
>>>>
>><mailto:ant-user-help@jakarta.apache.org>
>>
>>>>>
>>>>--
>>>>To unsubscribe, e-mail:
>>>
> <mailto:ant-user-unsubscribe@jakarta.apache.org>
> 
>>>For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>>>
>>>
>>>
>>>--
>>>To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
>>>For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>>>
>>>
>>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>>
>>
>>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
> 
> 
> 



--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message