[ 
https://issues.apache.org/jira/browse/DRILL-2130?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14332415#comment-14332415
 ] 

Daniel Barclay (Drill) edited comment on DRILL-2130 at 2/22/15 11:26 PM:
-------------------------------------------------------------------------

{{mvn dependency:tree}} seem to shows that the package/artifact 
{{com.thoughtworks.paranamer:paranamer}} brings in {{org.mockito:mockito-all}}:

{noformat}
...
[INFO] +- org.apache.drill.exec:drill-java-exec:jar:0.8.0-SNAPSHOT:compile
...
[INFO] |  +- com.thoughtworks.paranamer:paranamer:jar:2.5.6:compile
[INFO] |  |  \- org.mockito:mockito-all:jar:1.9.0:compile
...
{noformat}

Note that that's mockito-all, not mockito-core.  That mockito-all includes a 
version of Hamcrest.




was (Author: dsbos):
{{mvn dependency:tree}} seem to shows that the package/artifact 
{{com.thoughtworks.paranamer:paranamer}} brings in {{org.mockito:mockito-all}}:

{noformat}
...
[INFO] +- org.apache.drill.exec:drill-java-exec:jar:0.8.0-SNAPSHOT:compile
...
[INFO] |  +- com.thoughtworks.paranamer:paranamer:jar:2.5.6:compile
[INFO] |  |  \- org.mockito:mockito-all:jar:1.9.0:compile
...
{noformat}

Note that that's mockito-all, not mockito-core.  That mockito-all includes a 
version of Hamcrest, 



> old version Hamcrest on classpath before new cause test failures to fail with 
> NoSuchMethodError
> -----------------------------------------------------------------------------------------------
>
>                 Key: DRILL-2130
>                 URL: https://issues.apache.org/jira/browse/DRILL-2130
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Tools, Build & Test
>            Reporter: Daniel Barclay (Drill)
>            Assignee: Jacques Nadeau
>            Priority: Minor
>             Fix For: 1.0.0
>
>
> Apparently we have included multiple versions of JUnit and/or Hamcrest, and 
> the new versions are not first on the class path.
> This means that when an assertThat call tries to report that an actual value 
> mismatches an expected value, it dies with a NoSuchMethod error.
> That in turn means that what would have been an informative test-failure 
> message turns into a confusing crash.  
> It seems that something like this is happening:  The unit test is calling the 
> new version of some JUnit or Hamcrest class.  That class is calling a method 
> in another class (in Hamcrest), but the old version of the class gets loaded, 
> so the call fails with NoSuchMethodError. 
> Here's a sample stacktrace:
> java.lang.NoSuchMethodError: 
> org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V
>       at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)
>       at 
> org.apache.drill.jdbc.test.DatabaseMetaDataTest.test_getColumns_resultSetMetadataIsCorrect(DatabaseMetaDataTest.java:179)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at java.lang.reflect.Method.invoke(Method.java:606)
>       at 
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
>       at 
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
>       at 
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to