{"id":96,"date":"2008-05-22T21:21:17","date_gmt":"2008-05-23T01:21:17","guid":{"rendered":"http:\/\/danielroop.com\/blog\/2008\/05\/22\/easymock-exception-when-calling-createmock\/"},"modified":"2008-05-22T21:21:17","modified_gmt":"2008-05-23T01:21:17","slug":"easymock-exception-when-calling-createmock","status":"publish","type":"post","link":"http:\/\/danielroop.com\/blog\/2008\/05\/22\/easymock-exception-when-calling-createmock\/","title":{"rendered":"EasyMock Exception when calling createMock"},"content":{"rendered":"<p>I admit this is probably an obscure error, but I didn&#8217;t find anyone else talking about it.  So, in an effort to help some other poor sap like me out&#8230;<\/p>\n<p>If you receive this error in <a href=\"http:\/\/easymock.org\/\">EasyMock<\/a> 2.3<\/p>\n<pre>\r\njava.lang.NoSuchMethodError: org.easymock.internal.RecordState.<init>(Lorg\/easymock\/internal\/IMocksBehavior;)V\r\n\tat org.easymock.internal.MocksControl.reset(MocksControl.java:62)\r\n\tat org.easymock.internal.MocksControl.<init>(MocksControl.java:26)\r\n\tat org.easymock.classextension.internal.MocksClassControl.<init>(MocksClassControl.java:19)\r\n\tat org.easymock.classextension.EasyMock.createControl(EasyMock.java:108)\r\n\tat org.easymock.classextension.EasyMock.createMock(EasyMock.java:46)\r\n<\/pre>\n<p>It is most likely because you have an older version of EasyMock in your classpath.  In my case a referencing eclipse project had it, and in my project &#8220;order and export&#8221; tab I had the Project Higher on the Export list than the new version of EasyMock.  the easy way to fix this is just bump the newer EasyMock jars ahead of the older ones, or remove the older jars.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I admit this is probably an obscure error, but I didn&#8217;t find anyone else talking about it. So, in an effort to help some other poor sap like me out&#8230; If you receive this error in EasyMock 2.3 java.lang.NoSuchMethodError: org.easymock.internal.RecordState.(Lorg\/easymock\/internal\/IMocksBehavior;)V &hellip; <a href=\"http:\/\/danielroop.com\/blog\/2008\/05\/22\/easymock-exception-when-calling-createmock\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,108],"tags":[111,112,109,110],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-programming","category-troubleshoot","tag-bug","tag-exception","tag-mock","tag-test"],"_links":{"self":[{"href":"http:\/\/danielroop.com\/blog\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/danielroop.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/danielroop.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/danielroop.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/danielroop.com\/blog\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":0,"href":"http:\/\/danielroop.com\/blog\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"wp:attachment":[{"href":"http:\/\/danielroop.com\/blog\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/danielroop.com\/blog\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/danielroop.com\/blog\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}