Re: tests failing w/ illegal access error
Stefan Bodewig wrote: On Tue, 20 Apr 2004, Steve Loughran [EMAIL PROTECTED] wrote: Anyone else seen this? Something like this in strange classloader setups. Are you forking junit? Are parts of Ant or build/classes or build/testcases on your CLASSPATH? You get a method like this when a class tries to invoke a protected method on another class in the same package (legal, so it compiles) but the two classes have been loaded by different classloaders (so they actually are not in the same package). The Ant tests we don't run unless tests.and.ant.share.classloader is set suffer from this problem. This is me running build.sh test or ant test from ant CVS_HEAD; CLASSPATH is empty. or should be. I will take a look. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tests failing w/ illegal access error
On Wed, 21 Apr 2004, Steve Loughran [EMAIL PROTECTED] wrote: This is me running build.sh test or ant test from ant CVS_HEAD; CLASSPATH is empty. or should be. I will take a look. CLASSPATH points to lib/optional/junit.jar, Sun's JDK 1.4.2_04 on RedHat 7.3 (yes, outdated, I know), no problems. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tests failing w/ illegal access error
Steve Loughran wrote: This is me running build.sh test or ant test from ant CVS_HEAD; CLASSPATH is empty. or should be. I will take a look. Did you do rm -rf bootstrap build before doing ./build.sh test Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tests failing w/ illegal access error
Peter Reilly wrote: Steve Loughran wrote: This is me running build.sh test or ant test from ant CVS_HEAD; CLASSPATH is empty. or should be. I will take a look. Did you do rm -rf bootstrap build before doing ./build.sh test not the bootstrap, but I just did that and got the same result. hmmm. Ok. here is the fix, Stefan's multiple classloader trick was the one. 1. delete ant-testutils.jar from ANT_HOME/lib 2. rm -rf bootstrap buld 3. build.sh test I had copied the testutils jar into the lib dir so that I can (easily) run unit tests of other projects containing ant tasks. And that was causing confusion. tests all running happily now. -Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tests failing w/ illegal access error
Anyone else seen this? [junit] Testcase: testDuplicateTargetsImport(org.apache.tools.ant.ProjectTes t): Caused an ERROR [junit] tried to access method org.apache.tools.ant.BuildFileTest.expectLog( Ljava/lang/String;Ljava/lang/String;)V from class org.apache.tools.ant.ProjectTe st [junit] java.lang.IllegalAccessError: tried to access method org.apache.tool s.ant.BuildFileTest.expectLog(Ljava/lang/String;Ljava/lang/String;)V from class org.apache.tools.ant.ProjectTest [junit] at org.apache.tools.ant.ProjectTest.testDuplicateTargetsImport(P rojectTest.java:221) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces sorImpl.java:39) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccessorImpl.java:25) [junit] at java.lang.reflect.Method.invoke(Method.java:324) [junit] at junit.framework.TestCase.runTest(TestCase.java:154) [junit] at junit.framework.TestCase.runBare(TestCase.java:127) [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at junit.framework.TestResult.run(TestResult.java:109) [junit] at junit.framework.TestCase.run(TestCase.java:118) [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208) [junit] at junit.framework.TestSuite.run(TestSuite.java:203) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. I switched from javac to jikes to see if it made it go away, and nope. Rh9.0; Java1.4.2 BTW. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tests failing w/ illegal access error
Never seen anything like it... but am I crazy here? I thought Ljava/lang/String would be referring to a String[], but there is no such method void expectLog(String[], String[]), only void expectLog(String, String). If I am not mistaken about the significance of the L, I suppose this would be significant of some kind of weird compilation problem as you suggest... :( -Matt --- Steve Loughran [EMAIL PROTECTED] wrote: Anyone else seen this? [junit] Testcase: testDuplicateTargetsImport(org.apache.tools.ant.ProjectTes t): Caused an ERROR [junit] tried to access method org.apache.tools.ant.BuildFileTest.expectLog( Ljava/lang/String;Ljava/lang/String;)V from class org.apache.tools.ant.ProjectTe st [junit] java.lang.IllegalAccessError: tried to access method org.apache.tool s.ant.BuildFileTest.expectLog(Ljava/lang/String;Ljava/lang/String;)V from class org.apache.tools.ant.ProjectTest [junit] at org.apache.tools.ant.ProjectTest.testDuplicateTargetsImport(P rojectTest.java:221) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces sorImpl.java:39) [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet hodAccessorImpl.java:25) [junit] at java.lang.reflect.Method.invoke(Method.java:324) [junit] at junit.framework.TestCase.runTest(TestCase.java:154) [junit] at junit.framework.TestCase.runBare(TestCase.java:127) [junit] at junit.framework.TestResult$1.protect(TestResult.java:106) [junit] at junit.framework.TestResult.runProtected(TestResult.java:124) [junit] at junit.framework.TestResult.run(TestResult.java:109) [junit] at junit.framework.TestCase.run(TestCase.java:118) [junit] at junit.framework.TestSuite.runTest(TestSuite.java:208) [junit] at junit.framework.TestSuite.run(TestSuite.java:203) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner. I switched from javac to jikes to see if it made it go away, and nope. Rh9.0; Java1.4.2 BTW. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tests failing w/ illegal access error
From: Matt Benson [mailto:[EMAIL PROTECTED] I thought Ljava/lang/String would be referring to a String[], but there is no such method void expectLog(String[], String[]), only void expectLog(String, String). If I am not mistaken about the significance of the L, I suppose this would be significant of some kind of weird compilation problem as you suggest... :( No Ljava/lang/String; is String, whereas [Ljava/lang/String; is String[]. --DD - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tests failing w/ illegal access error
--- Dominique Devienne [EMAIL PROTECTED] wrote: From: Matt Benson [mailto:[EMAIL PROTECTED] I thought Ljava/lang/String would be referring to a String[], but there is no such method No Ljava/lang/String; is String, whereas [Ljava/lang/String; is String[]. --DD Gotcha, thanks. -Matt __ Do you Yahoo!? Yahoo! Photos: High-quality 4x6 digital prints for 25¢ http://photos.yahoo.com/ph/print_splash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
tests failing
i have been lax on running tests for a while; now I am seeing (on winXP, single CPU) :- Testcase: testCreateWithEmptyFileset(org.apache.tools.ant.taskdefs.JarTest Caused an ERROR null java.lang.NullPointerException at org.apache.tools.ant.taskdefs.Zip.isEmpty(Zip.java:1082) at org.apache.tools.ant.taskdefs.Zip.executeMain(Zip.java:388) at org.apache.tools.ant.taskdefs.Zip.execute(Zip.java:323) at org.apache.tools.ant.Task.perform(Task.java:388) 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:1394)
Re: tests failing
On Sun, 9 Mar 2003, Steve Loughran [EMAIL PROTECTED] wrote: i have been lax on running tests for a while; now I am seeing (on winXP, single CPU) Is this from CVS HEAD? Looks like the bug Nico's patch was supposed to fix (i.e. http://cvs.apache.org/viewcvs/ant/src/main/org/apache/tools/ant/taskdefs/Zip.java.diff?r1=1.97r2=1.98). But then again Nico reported he still had problems with the test and he's using Windows AFAIK. Needless to say it passes on my machines (Linux, MacOS X and Solaris) and seems to pass in Gump (running on Linux and Solaris) as well. Stefan
Re: tests failing
I also have the tests failing under Windows 2000/Cygwin Amazingly, the tests work if I start them from a debugger where I have written a small wrapper to run the main ant build script with target=run-single-test-only The tests also work from the debugger if I directly invoke testCreateWithEmptyFileset by wrapping the src/etc/testcases/taskdefs/Jar.xml in a small java main. Antoine - Original Message - From: Stefan Bodewig [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, March 10, 2003 9:22 AM Subject: Re: tests failing On Sun, 9 Mar 2003, Steve Loughran [EMAIL PROTECTED] wrote: i have been lax on running tests for a while; now I am seeing (on winXP, single CPU) Is this from CVS HEAD? Looks like the bug Nico's patch was supposed to fix (i.e. http://cvs.apache.org/viewcvs/ant/src/main/org/apache/tools/ant/taskdefs/Zi p.java.diff?r1=1.97r2=1.98). But then again Nico reported he still had problems with the test and he's using Windows AFAIK. Needless to say it passes on my machines (Linux, MacOS X and Solaris) and seems to pass in Gump (running on Linux and Solaris) as well. Stefan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tests failing : red herring
Now I found the culprit for these failing tests. I was starting the tests on the cygwin prompt with ./build.sh run-single-test It seems that the tests were then done with the bootstrap directory, which was old. I removed my bootstrap directory, rebuilt everything, and now everything is fine. Yours Antoine