|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
NoSuchFieldError: NONEMoin,
I tried to compare a entity (plain pojo) with SamePropertyValuesAs but I got the error: java.lang.NoSuchFieldError: NONE at org.hamcrest.DiagnosingMatcher.matches(DiagnosingMatcher.java:11) at org.hamcrest.beans.SamePropertyValuesAs.hasMatchingValues(SamePropertyValuesAs.java:60) at org.hamcrest.beans.SamePropertyValuesAs.matchesSafely(SamePropertyValuesAs.java:35) at org.hamcrest.TypeSafeDiagnosingMatcher.matches(TypeSafeDiagnosingMatcher.java:54) at org.hamcrest.collection.IsArray.matchesSafely(IsArray.java:26) at org.hamcrest.collection.IsArray.matchesSafely(IsArray.java:14) at org.hamcrest.TypeSafeMatcher.matches(TypeSafeMatcher.java:64) at org.jmock.internal.InvocationExpectation.matches(InvocationExpectation.java:108) at org.jmock.internal.InvocationDispatcher.dispatch(InvocationDispatcher.java:51) at org.jmock.Mockery.dispatch(Mockery.java:204) at org.jmock.Mockery.access$000(Mockery.java:37) at org.jmock.Mockery$MockObject.invoke(Mockery.java:246) at org.jmock.internal.InvocationDiverter.invoke(InvocationDiverter.java:27) at org.jmock.internal.ProxiedObjectIdentity.invoke(ProxiedObjectIdentity.java:36) at org.jmock.lib.JavaReflectionImposteriser$1.invoke(JavaReflectionImposteriser.java:33) But I can't understand where this NONE come from... with kind regards Thomas |
|
|
Re: NoSuchFieldError: NONEcan you show us the pojo?
S On 16 Sep 2009, at 16:55, Thomas Richter wrote: > Moin, > I tried to compare a entity (plain pojo) with SamePropertyValuesAs > but I got > the error: > java.lang.NoSuchFieldError: NONE > at org.hamcrest.DiagnosingMatcher.matches(DiagnosingMatcher.java: > 11) > at > org > .hamcrest > .beans > .SamePropertyValuesAs.hasMatchingValues(SamePropertyValuesAs.java:60) > at > org > .hamcrest > .beans.SamePropertyValuesAs.matchesSafely(SamePropertyValuesAs.java: > 35) > at > org > .hamcrest > .TypeSafeDiagnosingMatcher.matches(TypeSafeDiagnosingMatcher.java:54) > at org.hamcrest.collection.IsArray.matchesSafely(IsArray.java:26) > at org.hamcrest.collection.IsArray.matchesSafely(IsArray.java:14) > at org.hamcrest.TypeSafeMatcher.matches(TypeSafeMatcher.java:64) > at > org > .jmock > .internal.InvocationExpectation.matches(InvocationExpectation.java: > 108) > at > org > .jmock > .internal.InvocationDispatcher.dispatch(InvocationDispatcher.java:51) > at org.jmock.Mockery.dispatch(Mockery.java:204) > at org.jmock.Mockery.access$000(Mockery.java:37) > at org.jmock.Mockery$MockObject.invoke(Mockery.java:246) > at > org.jmock.internal.InvocationDiverter.invoke(InvocationDiverter.java: > 27) > at > org > .jmock > .internal.ProxiedObjectIdentity.invoke(ProxiedObjectIdentity.java:36) > at > org.jmock.lib.JavaReflectionImposteriser > $1.invoke(JavaReflectionImposteriser.java:33) > > But I can't understand where this NONE come from... > > with kind regards Thomas Steve Freeman Winner of the Agile Alliance Gordon Pask award 2006 http://www.m3p.co.uk M3P Limited. Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ. Company registered in England & Wales. Number 03689627 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: NoSuchFieldError: NONEThat matcher works with Java Beans, not POJOs.
--Nat www.natpryce.com On 16 Sep 2009, at 16:55, Thomas Richter <tricpod@...> wrote: > Moin, > I tried to compare a entity (plain pojo) with SamePropertyValuesAs > but I got the error: > java.lang.NoSuchFieldError: NONE > at org.hamcrest.DiagnosingMatcher.matches(DiagnosingMatcher.java: > 11) > at org.hamcrest.beans.SamePropertyValuesAs.hasMatchingValues > (SamePropertyValuesAs.java:60) > at org.hamcrest.beans.SamePropertyValuesAs.matchesSafely > (SamePropertyValuesAs.java:35) > at org.hamcrest.TypeSafeDiagnosingMatcher.matches > (TypeSafeDiagnosingMatcher.java:54) > at org.hamcrest.collection.IsArray.matchesSafely(IsArray.java:26) > at org.hamcrest.collection.IsArray.matchesSafely(IsArray.java:14) > at org.hamcrest.TypeSafeMatcher.matches(TypeSafeMatcher.java:64) > at org.jmock.internal.InvocationExpectation.matches > (InvocationExpectation.java:108) > at org.jmock.internal.InvocationDispatcher.dispatch > (InvocationDispatcher.java:51) > at org.jmock.Mockery.dispatch(Mockery.java:204) > at org.jmock.Mockery.access$000(Mockery.java:37) > at org.jmock.Mockery$MockObject.invoke(Mockery.java:246) > at org.jmock.internal.InvocationDiverter.invoke > (InvocationDiverter.java:27) > at org.jmock.internal.ProxiedObjectIdentity.invoke > (ProxiedObjectIdentity.java:36) > at org.jmock.lib.JavaReflectionImposteriser$1.invoke > (JavaReflectionImposteriser.java:33) > > But I can't understand where this NONE come from... > > with kind regards Thomas > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: NoSuchFieldError: NONEIt's an hibernate entity bean:
* serialVersionUID without getter and setter * 10 field (String, Interger, Long) all with getter and setter * additional for each field a public static final String with the field name for HQL * toString implementation * and implements Serializable no Enums no arrays ... 2009/9/16 Nat Pryce <nat.pryce@...> That matcher works with Java Beans, not POJOs. |
|
|
Re: NoSuchFieldError: NONEThe fact that it's a NoSuchFieldError indicates that this is being
thrown by the JVM because of a link-time failure. There was a static field called NONE in an older version of Hamcrest that has been moved and renamed in a later version. Have you compiled your code against one version of Hamcrest but are running against another? Or have you mixed up different versions of the Hamcrest JARs, combining Hamcrest 1.1 and 1.2 JARs? The JUnit JAR itself contains a version of Hamcrest. If you're mixing Hamcrest 1.2 with junit.jar you might get link errors. To avoid them, use junit-deps.jar which actually contains JUnit *without* it's dependencies! --Nat 2009/9/17 Thomas Richter <tricpod@...>: > It's an hibernate entity bean: > * serialVersionUID without getter and setter > * 10 field (String, Interger, Long) all with getter and setter > * additional for each field a public static final String with the field name > for HQL > * toString implementation > * and implements Serializable > no Enums no arrays ... > > 2009/9/16 Nat Pryce <nat.pryce@...> >> >> That matcher works with Java Beans, not POJOs. >> >> --Nat >> >> www.natpryce.com >> >> On 16 Sep 2009, at 16:55, Thomas Richter <tricpod@...> wrote: >> >>> Moin, >>> I tried to compare a entity (plain pojo) with SamePropertyValuesAs but I >>> got the error: >>> java.lang.NoSuchFieldError: NONE >>> at org.hamcrest.DiagnosingMatcher.matches(DiagnosingMatcher.java:11) >>> at >>> org.hamcrest.beans.SamePropertyValuesAs.hasMatchingValues(SamePropertyValuesAs.java:60) >>> at >>> org.hamcrest.beans.SamePropertyValuesAs.matchesSafely(SamePropertyValuesAs.java:35) >>> at >>> org.hamcrest.TypeSafeDiagnosingMatcher.matches(TypeSafeDiagnosingMatcher.java:54) >>> at org.hamcrest.collection.IsArray.matchesSafely(IsArray.java:26) >>> at org.hamcrest.collection.IsArray.matchesSafely(IsArray.java:14) >>> at org.hamcrest.TypeSafeMatcher.matches(TypeSafeMatcher.java:64) >>> at >>> org.jmock.internal.InvocationExpectation.matches(InvocationExpectation.java:108) >>> at >>> org.jmock.internal.InvocationDispatcher.dispatch(InvocationDispatcher.java:51) >>> at org.jmock.Mockery.dispatch(Mockery.java:204) >>> at org.jmock.Mockery.access$000(Mockery.java:37) >>> at org.jmock.Mockery$MockObject.invoke(Mockery.java:246) >>> at >>> org.jmock.internal.InvocationDiverter.invoke(InvocationDiverter.java:27) >>> at >>> org.jmock.internal.ProxiedObjectIdentity.invoke(ProxiedObjectIdentity.java:36) >>> at >>> org.jmock.lib.JavaReflectionImposteriser$1.invoke(JavaReflectionImposteriser.java:33) >>> >>> But I can't understand where this NONE come from... >>> >>> with kind regards Thomas >>> >> >> --------------------------------------------------------------------- >> To unsubscribe from this list, please visit: >> >> http://xircles.codehaus.org/manage_email >> >> > > -- http://www.natpryce.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |