{"action":"created","issue":{"url":"https://api.github.com/repos/jayway/powermock/issues/329","labels_url":"https://api.github.com/repos/jayway/powermock/issues/329/labels{/name}","comments_url":"https://api.github.com/repos/jayway/powermock/issues/329/comments","events_url":"https://api.github.com/repos/jayway/powermock/issues/329/events","html_url":"https://github.com/jayway/powermock/issues/329","id":97063857,"number":329,"title":"Test mechanism failure, failed to clean up state under Eclipse PDE","user":{"login":"johanhaleby","id":187029,"avatar_url":"https://avatars.githubusercontent.com/u/187029?v=3","gravatar_id":"","url":"https://api.github.com/users/johanhaleby","html_url":"https://github.com/johanhaleby","followers_url":"https://api.github.com/users/johanhaleby/followers","following_url":"https://api.github.com/users/johanhaleby/following{/other_user}","gists_url":"https://api.github.com/users/johanhaleby/gists{/gist_id}","starred_url":"https://api.github.com/users/johanhaleby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanhaleby/subscriptions","organizations_url":"https://api.github.com/users/johanhaleby/orgs","repos_url":"https://api.github.com/users/johanhaleby/repos","events_url":"https://api.github.com/users/johanhaleby/events{/privacy}","received_events_url":"https://api.github.com/users/johanhaleby/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jayway/powermock/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/jayway/powermock/labels/imported","name":"imported","color":"FFFFFF"},{"url":"https://api.github.com/repos/jayway/powermock/labels/Priority-Medium","name":"Priority-Medium","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-24T14:21:11Z","updated_at":"2015-07-24T14:21:12Z","closed_at":null,"body":"_From [dmeibu...@gmail.com](https://code.google.com/u/114749889682194643641/) on January 25, 2011 07:34:33_\n\nWhat steps will reproduce the problem? 1. Run a JUnit test case with @PowerMockRunner as Eclipse PDE plugin test. What is the expected output? What do you see instead? Expected to see test run successfully. Test ran, but post test failure from PowerMock clean up. What version of the product are you using? On what operating system? PowerMock 1.4.7 EasyMock 3.0\r\nEclipse 3.5\r\nWindows XP\r\nJava 1.6 Please provide any additional information below. Stack trace is attached.\r\n\r\nKey lines in the trace:\r\njava.lang.RuntimeException: Failed to clean up state\r\n        at org.powermock.api.easymock.PowerMock$EasyMockStateCleaner.invokeReportLastControlFromSystemCL(PowerMock.java:2310)\r\n        at org.powermock.api.easymock.PowerMock$EasyMockStateCleaner.run(PowerMock.java:2298)\r\n        at org.powermock.core.MockRepository.clear(MockRepository.java:125)\r\n        at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source)\r\n        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)\r\n...\r\norg.eclipse.ui.internal.testing.WorkbenchTestable$1.run(WorkbenchTestable.java:71)\r\n        at java.lang.Thread.run(Thread.java:619)\r\nCaused by: java.lang.ClassNotFoundException: org.easymock.internal.LastControl\r\n        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)\r\n        at java.security.AccessController.doPrivileged(Native Method)\r\n        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)\r\n        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)\r\n        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)\r\n        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)\r\n        at java.lang.Class.forName0(Native Method)\r\n        at java.lang.Class.forName(Class.java:247)\r\n        at org.powermock.api.easymock.PowerMock$EasyMockStateCleaner.invokeReportLastControlFromSystemCL(PowerMock.java:2304)\r\n        ... 30 more\r\n\r\nI suspect that the OSGi class loading framework is not compatible with the technique being used in test finish method to clean up EasyMock state.\n\n**Attachment:** [powermock-1.4.7-failed-cleanup-stacktrace](http://code.google.com/p/powermock/issues/detail?id=309)\n\n_Original issue: http://code.google.com/p/powermock/issues/detail?id=309_"},"comment":{"url":"https://api.github.com/repos/jayway/powermock/issues/comments/124539196","html_url":"https://github.com/jayway/powermock/issues/329#issuecomment-124539196","issue_url":"https://api.github.com/repos/jayway/powermock/issues/329","id":124539196,"user":{"login":"johanhaleby","id":187029,"avatar_url":"https://avatars.githubusercontent.com/u/187029?v=3","gravatar_id":"","url":"https://api.github.com/users/johanhaleby","html_url":"https://github.com/johanhaleby","followers_url":"https://api.github.com/users/johanhaleby/followers","following_url":"https://api.github.com/users/johanhaleby/following{/other_user}","gists_url":"https://api.github.com/users/johanhaleby/gists{/gist_id}","starred_url":"https://api.github.com/users/johanhaleby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johanhaleby/subscriptions","organizations_url":"https://api.github.com/users/johanhaleby/orgs","repos_url":"https://api.github.com/users/johanhaleby/repos","events_url":"https://api.github.com/users/johanhaleby/events{/privacy}","received_events_url":"https://api.github.com/users/johanhaleby/received_events","type":"User","site_admin":false},"created_at":"2015-07-24T14:21:12Z","updated_at":"2015-07-24T14:21:12Z","body":"_From [johan.ha...@gmail.com](https://code.google.com/u/105676376875942041029/) on February 09, 2011 23:07:57_\n\nThanks for reporting. Could you please attach a small example that demonstrates the issue? Otherwise it's hard to debug and to know when it's fixed (I don't even have Eclipse anymore)."}}