NoClassDefFoundError: org/hamcrest/MatcherAssert

525 views
Skip to first unread message

Eric

unread,
Nov 8, 2010, 5:21:04 AM11/8/10
to narrative-users
Well, this is no doubt related to my previous email.

So I get this exception:

java.lang.NoClassDefFoundError: org/hamcrest/MatcherAssert
at com.youdevise.test.narrative.Then$TypedMatcher.should(Then.java:
37)
at com.youdevise.test.narrative.Then$TypedMatcher.should_be(Then.java:
29)
at
com.algodeal.web.backtests.results.BackTestResultControllerTestFunctional.canLoadChartsForDefaultSymbolAndCurrencyAndBarType_WITH_NARRATIVE(BackTestResultControllerTestFunctional.java:
62)

What was the version of Hamcrest you used?

Eric

Douglas Squirrel

unread,
Nov 8, 2010, 5:28:36 AM11/8/10
to narrati...@googlegroups.com
Hi Eric

Can you try Hamcrest 1.2 and see whether that works? Good to uncover these dependencies and fix them!

squirrel

Eric Lefevre-Ardant

unread,
Nov 8, 2010, 6:08:49 AM11/8/10
to narrati...@googlegroups.com
Right. The tests now pass (I had to explicitly exclude the previous version of Hamcrest from the JUnit dependency declared in our pom).

On to make my test more canonical.

Thanks for the help

Eric

Douglas Squirrel

unread,
Nov 8, 2010, 6:13:07 AM11/8/10
to narrati...@googlegroups.com

Good to hear it Eric! youDevisers, is there something we should do to help users like Eric - either explain how to use the right version of Hamcrest, or make our code work better with other (perhaps more standard?) versions?

Jason Larsen

unread,
Nov 8, 2010, 8:00:26 AM11/8/10
to narrative-users
For people Maven-comfortable, we could (and should) post the jar to a
public Maven repo, (ideally Maven Central.)
For people who aren't using Maven or its build-dependency brethren,
then we should update the "Installation section" in the readme.

I can update the readme quickly, as a first step.


On Nov 8, 6:13 am, Douglas Squirrel <douglas.squir...@youdevise.com>
wrote:
> Good to hear it Eric! youDevisers, is there something we should do to help users like Eric - either explain how to use the right version of Hamcrest, or make our code work better with other (perhaps more standard?) versions?
>
> From: narrati...@googlegroups.com [mailto:narrati...@googlegroups.com] On Behalf Of Eric Lefevre-Ardant
> Sent: 08 November 2010 11:09
> To: narrati...@googlegroups.com
> Subject: Re: NoClassDefFoundError: org/hamcrest/MatcherAssert
>
> Right. The tests now pass (I had to explicitly exclude the previous version of Hamcrest from the JUnit dependency declared in our pom).
>
> On to make my test more canonical.
>
> Thanks for the help
>
> Eric

Eric Lefevre-Ardant

unread,
Nov 8, 2010, 8:10:40 AM11/8/10
to narrati...@googlegroups.com
FYI, I applied a technique where Maven uses a repository local to my project. So I could test without touching our global Maven repo. 
Details here:
Reply all
Reply to author
Forward
0 new messages