You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Mark Miller <ma...@gmail.com> on 2009/05/26 14:49:10 UTC

clustering unit test failures on ubuntu

 I'm on the latest Ubuntu and since last week the clustering tests have 
been failing for me. Not sure why.

[junit] Running org.apache.solr.handler.clustering.ClusteringComponentTest
   [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
   [junit] Test 
org.apache.solr.handler.clustering.ClusteringComponentTest FAILED
   [junit] Running 
org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngineTest
   [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
   [junit] Test 
org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngineTest 
FAILED


<error message="class 
&quot;junit.framework.JUnit4TestAdapter&quot;&apos;s signer information 
does not match signer information of other classes in the same package" 
type="java.lang.SecurityException">    at 
java.lang.ClassLoader.checkCerts(ClassLoader.java:792)
   at java.lang.ClassLoader.preDefineClass(ClassLoader.java:504)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:631)
   at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
   at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
   at java.lang.Class.forName0(Native Method)
   at java.lang.Class.forName(Class.java:186)
</error>

-- 
- Mark

http://www.lucidimagination.com

Re: clustering unit test failures on ubuntu

Posted by Mark Miller <ma...@gmail.com>.
Yeah, I'll double check soon. I think you are right about the two junit 
jars on my classpath.

- Mark

Dawid Weiss wrote:
>
> Just checked on plain Ubuntu 9.04 with apt-get install ant junit 
> subversion, all tests from the trunk pass for me (I believe OpenJDK is 
> used by default). Can you double check if it's something with your 
> configuration?
>
> Dawid
>
> Mark Miller wrote:
>> I'm on the latest Ubuntu and since last week the clustering tests 
>> have been failing for me. Not sure why.
>>
>> [junit] Running 
>> org.apache.solr.handler.clustering.ClusteringComponentTest
>>   [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
>>   [junit] Test 
>> org.apache.solr.handler.clustering.ClusteringComponentTest FAILED
>>   [junit] Running 
>> org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngineTest
>>   [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
>>   [junit] Test 
>> org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngineTest 
>> FAILED
>>
>>
>> <error message="class 
>> &quot;junit.framework.JUnit4TestAdapter&quot;&apos;s signer 
>> information does not match signer information of other classes in the 
>> same package" type="java.lang.SecurityException">    at 
>> java.lang.ClassLoader.checkCerts(ClassLoader.java:792)
>>   at java.lang.ClassLoader.preDefineClass(ClassLoader.java:504)
>>   at java.lang.ClassLoader.defineClass(ClassLoader.java:631)
>>   at 
>> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>>   at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
>>   at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
>>   at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
>>   at java.security.AccessController.doPrivileged(Native Method)
>>   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>>   at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
>>   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>>   at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
>>   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
>>   at java.lang.Class.forName0(Native Method)
>>   at java.lang.Class.forName(Class.java:186)
>> </error>
>>


-- 
- Mark

http://www.lucidimagination.com




Re: clustering unit test failures on ubuntu

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
Just checked on plain Ubuntu 9.04 with apt-get install ant junit subversion, all 
tests from the trunk pass for me (I believe OpenJDK is used by default). Can you 
double check if it's something with your configuration?

Dawid

Mark Miller wrote:
> I'm on the latest Ubuntu and since last week the clustering tests have 
> been failing for me. Not sure why.
> 
> [junit] Running org.apache.solr.handler.clustering.ClusteringComponentTest
>   [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
>   [junit] Test 
> org.apache.solr.handler.clustering.ClusteringComponentTest FAILED
>   [junit] Running 
> org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngineTest
>   [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
>   [junit] Test 
> org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngineTest 
> FAILED
> 
> 
> <error message="class 
> &quot;junit.framework.JUnit4TestAdapter&quot;&apos;s signer information 
> does not match signer information of other classes in the same package" 
> type="java.lang.SecurityException">    at 
> java.lang.ClassLoader.checkCerts(ClassLoader.java:792)
>   at java.lang.ClassLoader.preDefineClass(ClassLoader.java:504)
>   at java.lang.ClassLoader.defineClass(ClassLoader.java:631)
>   at 
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>   at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
>   at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
>   at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
>   at java.security.AccessController.doPrivileged(Native Method)
>   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
>   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>   at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
>   at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
>   at java.lang.Class.forName0(Native Method)
>   at java.lang.Class.forName(Class.java:186)
> </error>
> 

Re: clustering unit test failures on ubuntu

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
We've fixed the 1.5 compilation issue in Carrot2. As for this thing:

<error message="class &quot;junit.framework.JUnit4TestAdapter&quot;&apos;s 
signer information does not match signer information of other classes in the 
same package" type="java.lang.SecurityException">    at 
java.lang.ClassLoader.checkCerts(ClassLoader.java:792)
   at java.lang.ClassLoader.preDefineClass(ClassLoader.java:504)

it most likely means classes from within the same package are picked from two 
different locations -- one signed, one unsigned. Do you have junit.jar in ANT's 
classpath, by any chance? Is it signed? Can you pass me the output of this:

ant -diagnostics > ant.diags

(or see if there is any junit JAR that has signatures under META-INF/ inside the 
JAR).

Dawid

Mark Miller wrote:
> Stanislaw Osinski wrote:
>> Hi Mark,
>>
>>
>>  
>>> Weird.  I don't have Ubuntu handy, but it looks like it is having 
>>> problems
>>> with JUnit itself, unless I'm misreading the exception.
>>>     
>>
>>
>> Weird indeed. One thing that randomly springs to my mind is the 
>> reflection
>> magic Carrot2 is using here and there, which might be a problem when you
>> enable the security manager.
>>
>> For a quick test, could you try if Carrot2 tests pass on your machine 
>> (we're
>> using JUnit 4 too):
>>
>> svn co https://carrot2.svn.sourceforge.net/svnroot/carrot2/trunk
>> cd trunk
>> echo "external.api.tests.disabled=true" >local.properties
>> ant test
>>
>> Thanks,
>>
>> Staszek
>>
>>   
> Hmmm - followed directions and couldnt compile. Upgraded Junit to latest 
> 4 and still no dice:
> 
> compile.test:
>    [javac] Compiling 566 source files to /home/mark/test/trunk/tmp/classes
>    [javac] 
> /home/mark/test/trunk/core/carrot2-core/src/org/carrot2/core/test/assertions/Carrot2CoreAssertions.java:73: 
> name clash: assertThat(java.util.List<org.carrot2.core.Document>) and 
> assertThat(java.util.List<org.carrot2.core.Cluster>) have the same erasure
>    [javac]     public static DocumentListAssertion 
> assertThat(List<Document> actual)
>    [javac]                                         ^
>    [javac] 
> /home/mark/test/trunk/core/carrot2-core/src/org/carrot2/core/test/assertions/ClusterAssertion.java:66: 
> cannot find symbol
>    [javac] symbol  : method 
> isEquivalentTo(java.util.List<org.carrot2.core.Document>)
>    [javac] location: class org.fest.assertions.ListAssert
>    [javac]             assertThat(actualCluster.getDocuments()).as(
>    [javac]                       ^
>    [javac] 
> /home/mark/test/trunk/core/carrot2-util-xsltfilter/src/org/carrot2/util/xsltfilter/XSLTFilterServletResponse.java:528: 
> warning: [deprecation] setStatus(int,java.lang.String) in 
> javax.servlet.http.HttpServletResponse has been deprecated
>    [javac]     public void setStatus(int statusCode, String message)
>    [javac]                 ^
>    [javac] 
> /home/mark/test/trunk/core/carrot2-util-xsltfilter/src/org/carrot2/util/xsltfilter/XSLTFilterServletResponse.java:34: 
> warning: [deprecation] encodeRedirectUrl(java.lang.String) in 
> javax.servlet.http.HttpServletResponse has been deprecated
>    [javac] final class XSLTFilterServletResponse extends 
> HttpServletResponseWrapper
>    [javac]       ^
>    [javac] 
> /home/mark/test/trunk/core/carrot2-util-xsltfilter/src/org/carrot2/util/xsltfilter/XSLTFilterServletResponse.java:34: 
> warning: [deprecation] encodeUrl(java.lang.String) in 
> javax.servlet.http.HttpServletResponse has been deprecated
>    [javac] final class XSLTFilterServletResponse extends 
> HttpServletResponseWrapper
>    [javac]       ^
>    [javac] 
> /home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ClusterTest.java:314: 
> cannot find symbol
>    [javac] symbol  : method 
> isEquivalentTo(java.util.List<org.carrot2.core.Document>)
>    [javac] location: class org.fest.assertions.ListAssert
>    [javac]         
> assertThat(otherTopics.getDocuments()).isEquivalentTo(allDocuments);
>    [javac]                   ^
>    [javac] 
> /home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ClusterTest.java:334: 
> cannot find symbol
>    [javac] symbol  : method 
> isEquivalentTo(java.util.ArrayList<org.carrot2.core.Document>)
>    [javac] location: class org.fest.assertions.ListAssert
>    [javac]         
> assertThat(otherTopics.getDocuments()).isEquivalentTo(Lists.newArrayList(d1, 
> d3));
>    [javac]                   ^
>    [javac] 
> /home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ClusterTest.java:356: 
> cannot find symbol
>    [javac] symbol  : method 
> isEquivalentTo(java.util.ArrayList<org.carrot2.core.Document>)
>    [javac] location: class org.fest.assertions.ListAssert
>    [javac]         assertThat(otherTopics.getDocuments()).isEquivalentTo(
>    [javac]                   ^
>    [javac] 
> /home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ProcessingResultTest.java:146: 
> cannot find symbol
>    [javac] symbol  : method 
> assertThat(java.util.List<org.carrot2.core.Document>)
>    [javac] location: class org.carrot2.core.ProcessingResultTest
>    [javac]         
> assertThat(deserialized.getDocuments()).hasSize(documentCount);
>    [javac]         ^
>    [javac] 
> /home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ProcessingResultTest.java:305: 
> cannot find symbol
>    [javac] symbol  : method 
> assertThat(java.util.List<org.carrot2.core.Document>)
>    [javac] location: class org.carrot2.core.ProcessingResultTest
>    [javac]             
> assertThat(deserialized.getDocuments()).isEquivalentTo(
>    [javac]             ^
>    [javac] Note: Some input files use unchecked or unsafe operations.
>    [javac] Note: Recompile with -Xlint:unchecked for details.
>    [javac] 7 errors
>    [javac] 3 warnings
> 
> BUILD FAILED
> /home/mark/test/trunk/build.xml:225: Compile failed; see the compiler 
> error output for details.
> 
> 

Re: clustering unit test failures on ubuntu

Posted by Dawid Weiss <da...@cs.put.poznan.pl>.
Hi Mark,

Yep, confirmed -- this is something compiler-related. This class:

> carrot2-core/src/org/carrot2/core/test/assertions/Carrot2CoreAssertions.java:73: 

has two methods with the same type erasure:

public static ClusterListAssertion assertThat(List<Cluster> actual)
public static DocumentListAssertion assertThat(List<Document> actual)

Interestingly, SUN's Java 1.6 compiler in 1.5-compatibility mode and Eclipse's 
JDT accept this without a warning. SUN's 1.5 compiler bails with the exception 
you provided. I'm working on this.

Dawid

Re: clustering unit test failures on ubuntu

Posted by Mark Miller <ma...@gmail.com>.
Stanislaw Osinski wrote:
> Hi Mark,
>
>
>   
>> Weird.  I don't have Ubuntu handy, but it looks like it is having problems
>> with JUnit itself, unless I'm misreading the exception.
>>     
>
>
> Weird indeed. One thing that randomly springs to my mind is the reflection
> magic Carrot2 is using here and there, which might be a problem when you
> enable the security manager.
>
> For a quick test, could you try if Carrot2 tests pass on your machine (we're
> using JUnit 4 too):
>
> svn co https://carrot2.svn.sourceforge.net/svnroot/carrot2/trunk
> cd trunk
> echo "external.api.tests.disabled=true" >local.properties
> ant test
>
> Thanks,
>
> Staszek
>
>   
Hmmm - followed directions and couldnt compile. Upgraded Junit to latest 
4 and still no dice:

compile.test:
    [javac] Compiling 566 source files to /home/mark/test/trunk/tmp/classes
    [javac] 
/home/mark/test/trunk/core/carrot2-core/src/org/carrot2/core/test/assertions/Carrot2CoreAssertions.java:73: 
name clash: assertThat(java.util.List<org.carrot2.core.Document>) and 
assertThat(java.util.List<org.carrot2.core.Cluster>) have the same erasure
    [javac]     public static DocumentListAssertion 
assertThat(List<Document> actual)
    [javac]                                         ^
    [javac] 
/home/mark/test/trunk/core/carrot2-core/src/org/carrot2/core/test/assertions/ClusterAssertion.java:66: 
cannot find symbol
    [javac] symbol  : method 
isEquivalentTo(java.util.List<org.carrot2.core.Document>)
    [javac] location: class org.fest.assertions.ListAssert
    [javac]             assertThat(actualCluster.getDocuments()).as(
    [javac]                       ^
    [javac] 
/home/mark/test/trunk/core/carrot2-util-xsltfilter/src/org/carrot2/util/xsltfilter/XSLTFilterServletResponse.java:528: 
warning: [deprecation] setStatus(int,java.lang.String) in 
javax.servlet.http.HttpServletResponse has been deprecated
    [javac]     public void setStatus(int statusCode, String message)
    [javac]                 ^
    [javac] 
/home/mark/test/trunk/core/carrot2-util-xsltfilter/src/org/carrot2/util/xsltfilter/XSLTFilterServletResponse.java:34: 
warning: [deprecation] encodeRedirectUrl(java.lang.String) in 
javax.servlet.http.HttpServletResponse has been deprecated
    [javac] final class XSLTFilterServletResponse extends 
HttpServletResponseWrapper
    [javac]       ^
    [javac] 
/home/mark/test/trunk/core/carrot2-util-xsltfilter/src/org/carrot2/util/xsltfilter/XSLTFilterServletResponse.java:34: 
warning: [deprecation] encodeUrl(java.lang.String) in 
javax.servlet.http.HttpServletResponse has been deprecated
    [javac] final class XSLTFilterServletResponse extends 
HttpServletResponseWrapper
    [javac]       ^
    [javac] 
/home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ClusterTest.java:314: 
cannot find symbol
    [javac] symbol  : method 
isEquivalentTo(java.util.List<org.carrot2.core.Document>)
    [javac] location: class org.fest.assertions.ListAssert
    [javac]         
assertThat(otherTopics.getDocuments()).isEquivalentTo(allDocuments);
    [javac]                   ^
    [javac] 
/home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ClusterTest.java:334: 
cannot find symbol
    [javac] symbol  : method 
isEquivalentTo(java.util.ArrayList<org.carrot2.core.Document>)
    [javac] location: class org.fest.assertions.ListAssert
    [javac]         
assertThat(otherTopics.getDocuments()).isEquivalentTo(Lists.newArrayList(d1, 
d3));
    [javac]                   ^
    [javac] 
/home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ClusterTest.java:356: 
cannot find symbol
    [javac] symbol  : method 
isEquivalentTo(java.util.ArrayList<org.carrot2.core.Document>)
    [javac] location: class org.fest.assertions.ListAssert
    [javac]         assertThat(otherTopics.getDocuments()).isEquivalentTo(
    [javac]                   ^
    [javac] 
/home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ProcessingResultTest.java:146: 
cannot find symbol
    [javac] symbol  : method 
assertThat(java.util.List<org.carrot2.core.Document>)
    [javac] location: class org.carrot2.core.ProcessingResultTest
    [javac]         
assertThat(deserialized.getDocuments()).hasSize(documentCount);
    [javac]         ^
    [javac] 
/home/mark/test/trunk/core/carrot2-core/src-test/org/carrot2/core/ProcessingResultTest.java:305: 
cannot find symbol
    [javac] symbol  : method 
assertThat(java.util.List<org.carrot2.core.Document>)
    [javac] location: class org.carrot2.core.ProcessingResultTest
    [javac]             
assertThat(deserialized.getDocuments()).isEquivalentTo(
    [javac]             ^
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 7 errors
    [javac] 3 warnings

BUILD FAILED
/home/mark/test/trunk/build.xml:225: Compile failed; see the compiler 
error output for details.


-- 
- Mark

http://www.lucidimagination.com




Re: clustering unit test failures on ubuntu

Posted by Mark Miller <ma...@gmail.com>.
Stanislaw Osinski wrote:
> Hi Mark,
>
>
>   
>> Weird.  I don't have Ubuntu handy, but it looks like it is having problems
>> with JUnit itself, unless I'm misreading the exception.
>>     
>
>
> Weird indeed. One thing that randomly springs to my mind is the reflection
> magic Carrot2 is using here and there, which might be a problem when you
> enable the security manager.
>
> For a quick test, could you try if Carrot2 tests pass on your machine (we're
> using JUnit 4 too):
>
> svn co https://carrot2.svn.sourceforge.net/svnroot/carrot2/trunk
> cd trunk
> echo "external.api.tests.disabled=true" >local.properties
> ant test
>
> Thanks,
>
> Staszek
>
>   
Yes, I'll give it a shot.

And in response to Grant, it happens both with sun jdk 1.5.0.18 and 
OpenJDK 1.6.0.13.

-- 
- Mark

http://www.lucidimagination.com




Re: clustering unit test failures on ubuntu

Posted by Stanislaw Osinski <st...@osinski.name>.
Hi Mark,


> Weird.  I don't have Ubuntu handy, but it looks like it is having problems
> with JUnit itself, unless I'm misreading the exception.


Weird indeed. One thing that randomly springs to my mind is the reflection
magic Carrot2 is using here and there, which might be a problem when you
enable the security manager.

For a quick test, could you try if Carrot2 tests pass on your machine (we're
using JUnit 4 too):

svn co https://carrot2.svn.sourceforge.net/svnroot/carrot2/trunk
cd trunk
echo "external.api.tests.disabled=true" >local.properties
ant test

Thanks,

Staszek

Re: clustering unit test failures on ubuntu

Posted by Grant Ingersoll <gs...@apache.org>.
Weird.  I don't have Ubuntu handy, but it looks like it is having  
problems with JUnit itself, unless I'm misreading the exception.

What version of the JVM are you on?

On May 26, 2009, at 8:49 AM, Mark Miller wrote:

> I'm on the latest Ubuntu and since last week the clustering tests  
> have been failing for me. Not sure why.
>
> [junit] Running  
> org.apache.solr.handler.clustering.ClusteringComponentTest
>  [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
>  [junit] Test  
> org.apache.solr.handler.clustering.ClusteringComponentTest FAILED
>  [junit] Running  
> org.apache.solr.handler.clustering.carrot2.CarrotClusteringEngineTest
>  [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec
>  [junit] Test  
> org 
> .apache.solr.handler.clustering.carrot2.CarrotClusteringEngineTest  
> FAILED
>
>
> <error message="class  
> &quot;junit.framework.JUnit4TestAdapter&quot;&apos;s signer  
> information does not match signer information of other classes in  
> the same package" type="java.lang.SecurityException">    at  
> java.lang.ClassLoader.checkCerts(ClassLoader.java:792)
>  at java.lang.ClassLoader.preDefineClass(ClassLoader.java:504)
>  at java.lang.ClassLoader.defineClass(ClassLoader.java:631)
>  at  
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java: 
> 142)
>  at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
>  at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
>  at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
>  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
>  at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
>  at java.lang.Class.forName0(Native Method)
>  at java.lang.Class.forName(Class.java:186)
> </error>
>
> -- 
> - Mark
>
> http://www.lucidimagination.com