{"action":"created","issue":{"url":"https://api.github.com/repos/jayway/powermock/issues/542","labels_url":"https://api.github.com/repos/jayway/powermock/issues/542/labels{/name}","comments_url":"https://api.github.com/repos/jayway/powermock/issues/542/comments","events_url":"https://api.github.com/repos/jayway/powermock/issues/542/events","html_url":"https://github.com/jayway/powermock/issues/542","id":97197485,"number":542,"title":"PowerMockRule doesn't work on IntelliJ Idea","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":3,"created_at":"2015-07-25T06:01:57Z","updated_at":"2015-07-25T06:02:10Z","closed_at":null,"body":"_From [iir...@gmail.com](https://code.google.com/u/113896979631297957884/) on October 15, 2014 10:25:22_\n\nI get error: PowerMockRule can only be used with the system classloader but was loaded by java.net.URLClassLoader\r\n\r\nit's due to code:\r\n\r\nstatic {\r\n        if ( PowerMockRule .class.getClassLoader() != ClassLoader.getSystemClassLoader()) {\r\n            throw new IllegalStateException(\" PowerMockRule can only be used with the system classloader but was loaded by \" + PowerMockRule .class.getClassLoader());\r\n        } PowerMockAgent .initializeIfPossible();\r\n    }\n\n_Original issue: http://code.google.com/p/powermock/issues/detail?id=522_"},"comment":{"url":"https://api.github.com/repos/jayway/powermock/issues/comments/124805995","html_url":"https://github.com/jayway/powermock/issues/542#issuecomment-124805995","issue_url":"https://api.github.com/repos/jayway/powermock/issues/542","id":124805995,"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-25T06:02:09Z","updated_at":"2015-07-25T06:02:09Z","body":"_From [iir...@gmail.com](https://code.google.com/u/113896979631297957884/) on June 16, 2015 06:03:34_\n\nPossible workarounds:\r\n- open .idea/workspace.xml and set dynamic.classpath to false (may not work if your classpath is too long)\r\n- start tests not with idea but with idea Maven integration\r\n- use something else for patching (eg AspectJ)"}}