ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Munz" <mm...@apelon.com>
Subject RE: Classloader problem - ZipException with Log4j, Junit, and Ant
Date Mon, 02 Jun 2003 21:03:42 GMT
Antoine,
 
  Thanks for your help.  I was able to solve this by modifying the junit classpath, which
I had misconfigured.   I must say that I'm a bit concerned by the fact that all of these OSS
projects use different classloaders, especially considering that two of them are Apache projects...
 
  - Matt

	-----Original Message----- 
	From: Antoine Levy-Lambert [mailto:levylambert@tiscali-dsl.de] 
	Sent: Mon 6/2/2003 4:15 PM 
	To: Ant Users List 
	Cc: 
	Subject: Re: Classloader problem - ZipException with Log4j, Junit, and Ant
	
	

	Hi Matt,
	
	Try to run ant with the -verbose command line switch turned on, maybe you
	can find out which zip file or jar file ant has a problem opening.
	
	Could you let us know :
	
	where is located your junit.jar file ?
	where is your log4j.jar ?
	where did you install ant ?
	send us the output of ant -verbose, and the part of your build file which
	invokes JUnit too.
	
	Background info :
	------------------
	Have a look at this URL
	http://ant.apache.org/faq.html#delegating-classloader which mentions some
	special classpath requirements concerning junit.
	
	To oversimplify the situation, my understanding is that you have to have
	junit.jar under $ANT_HOME/lib for junit to run properly.
	
	From this URL
	http://news.gmane.org/thread.php?group=gmane.comp.jakarta.ant.user you can
	do searches in the user list.
	Also read this :
	http://article.gmane.org/gmane.comp.jakarta.ant.user/14671/match=junit+class
	path
	
	
	If you absolutely want to enter a new bug report :
	--------------------------------------------------
	(I would wait a bit at this stage)
	If you think that these classpath issues/informations are not related to
	your problem or cannot help you solve it, then search on
	http://nagoya.apache.org/bugzilla to see whether someone has already had a
	similar problem. I just have had a look myself and I do not see anything
	similar.
	
	Cheers
	
	Antoine
	
	----- Original Message -----
	From: "Matt Munz" <mmunz@apelon.com>
	To: <user@ant.apache.org>
	Sent: Monday, June 02, 2003 8:35 PM
	Subject: Classloader problem - ZipException with Log4j, Junit, and Ant
	
	
	> Hi all,
	>
	>   Thanks for making this useful tool available.
	>
	>   I am running into some repetitive (recursive?) code that puts my build
	into an infinite loop that I must terminate manually.  I see the following
	output over and over.
	>
	>   This is apparently a disagreement between Ant, Log4j, and Junit, as this
	error occurs when trying to create a new Log4j Logger from within a Junit
	class, invoked from Ant using the JUnit task.
	>
	>   Any ideas?  Should I enter this in the bug tracking system?  I am also
	curious about the executeInVM() call, since I set "Fork" to true on the
	JUnit Task...
	>
	>   Any help would be greatly appreciated.
	>
	> java.util.zip.ZipException: error in opening zip file
	>       at java.util.zip.ZipFile.open(Native Method)
	>       at java.util.zip.ZipFile.<init>(ZipFile.java:112)
	>       at java.util.zip.ZipFile.<init>(ZipFile.java:128)
	>       at
	org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:867)
	>       at
	org.apache.tools.ant.AntClassLoader.getResource(AntClassLoader.java:796)
	>       at org.apache.log4j.helpers.Loader.getResource(Loader.java:78)
	>       at org.apache.log4j.LogManager.<clinit>(LogManager.java:94)
	>       at org.apache.log4j.Logger.getLogger(Logger.java:94)
	>       at
	com.apelon.skunkworks.lexnet.indexcreator.Indexer.<init>(Indexer.java:25)
	>       at
	com.apelon.skunkworks.lexnet.test.DatabaseTestSetup.setUp(DatabaseTestSetup.
	java:49)
	>       at junit.extensions.TestSetup$1.protect(TestSetup.java:18)
	>       at junit.framework.TestResult.runProtected(TestResult.java:124)
	>       at junit.extensions.TestSetup.run(TestSetup.java:23)
	>       at junit.framework.TestSuite.runTest(TestSuite.java:208)
	>       at junit.framework.TestSuite.run(TestSuite.java:203)
	>       at
	org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRu
	nner.java:325)
	>       at
	org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeInVM(JUnitTask
	.java:848)
	>       at
	org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav
	a:556)
	>       at
	org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.jav
	a:532)
	>       at
	com.apelon.emr.projectbuilder.core.RunTestsTask.execute(RunTestsTask.java:26
	)
	>       at
	com.apelon.emr.projectbuilder.core.EmrTaskInvoker.execute(EmrTaskInvoker.jav
	a:69)
	>       at
	org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:193)
	>       at org.apache.tools.ant.Task.perform(Task.java:341)
	>       at org.apache.tools.ant.Target.execute(Target.java:309)
	>       at org.apache.tools.ant.Target.performTasks(Target.java:336)
	>       at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
	>       at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
	>       at org.apache.tools.ant.Main.runBuild(Main.java:609)
	>       at org.apache.tools.ant.Main.start(Main.java:196)
	>       at org.apache.tools.ant.Main.main(Main.java:235)
	>
	>   - Matt Munz
	>      mmunz@apelon.com
	>
	>
	
	
	
	---------------------------------------------------------------------
	To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
	For additional commands, e-mail: user-help@ant.apache.org
	
	

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message