{"action":"created","issue":{"url":"https://api.github.com/repos/sbt/sbt/issues/3306","repository_url":"https://api.github.com/repos/sbt/sbt","labels_url":"https://api.github.com/repos/sbt/sbt/issues/3306/labels{/name}","comments_url":"https://api.github.com/repos/sbt/sbt/issues/3306/comments","events_url":"https://api.github.com/repos/sbt/sbt/issues/3306/events","html_url":"https://github.com/sbt/sbt/issues/3306","id":240947519,"number":3306,"title":"classloader errors between test runs","user":{"login":"simao","id":203575,"avatar_url":"https://avatars1.githubusercontent.com/u/203575?v=3","gravatar_id":"","url":"https://api.github.com/users/simao","html_url":"https://github.com/simao","followers_url":"https://api.github.com/users/simao/followers","following_url":"https://api.github.com/users/simao/following{/other_user}","gists_url":"https://api.github.com/users/simao/gists{/gist_id}","starred_url":"https://api.github.com/users/simao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simao/subscriptions","organizations_url":"https://api.github.com/users/simao/orgs","repos_url":"https://api.github.com/users/simao/repos","events_url":"https://api.github.com/users/simao/events{/privacy}","received_events_url":"https://api.github.com/users/simao/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-07-06T12:56:24Z","updated_at":"2017-07-07T09:17:51Z","closed_at":"2017-07-06T18:37:29Z","body":"I am observing some strange classpath/classloader issues when running `sbt test`.\r\n\r\nI keep getting errors equivalent to the following: \r\n\r\n`[info]   java.lang.ClassCastException: net.i2p.crypto.eddsa.EdDSAPublicKey cannot be cast to net.i2p.crypto.eddsa.EdDSAPublicKey`\r\n\r\nThe first test execution always works correctly, but subsequent executions fail with errors of this nature.\r\n\r\nWhich suggest sbt is somehow messing with the classloader between test executions, which makes `asInstanceOf` and equivalent statements to not work properly.\r\n\r\n## steps\r\n\r\nI created a [small project](https://github.com/simao/sbt-classloader-issue\r\n) that reproduces this issue. You can follow the following steps to reproduce the problem:\r\n\r\n```\r\ngit clone https://github.com/simao/sbt-classloader-issue\r\ncd sbt-classloader-issue\r\nsbt\r\ntest\r\ntest\r\n```\r\n\r\nThe output of these commands is available at: https://github.com/simao/sbt-classloader-issue/blob/master/sbt_output.txt\r\n\r\n## problem\r\n\r\nThe first execution is green, while subsequent executions are red. \r\n\r\n## expectation\r\nI expect all test executions to have the same green result.\r\n\r\n## notes\r\n\r\nsbt version: 0.13.5\r\n"},"comment":{"url":"https://api.github.com/repos/sbt/sbt/issues/comments/313631519","html_url":"https://github.com/sbt/sbt/issues/3306#issuecomment-313631519","issue_url":"https://api.github.com/repos/sbt/sbt/issues/3306","id":313631519,"user":{"login":"simao","id":203575,"avatar_url":"https://avatars1.githubusercontent.com/u/203575?v=3","gravatar_id":"","url":"https://api.github.com/users/simao","html_url":"https://github.com/simao","followers_url":"https://api.github.com/users/simao/followers","following_url":"https://api.github.com/users/simao/following{/other_user}","gists_url":"https://api.github.com/users/simao/gists{/gist_id}","starred_url":"https://api.github.com/users/simao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simao/subscriptions","organizations_url":"https://api.github.com/users/simao/orgs","repos_url":"https://api.github.com/users/simao/repos","events_url":"https://api.github.com/users/simao/events{/privacy}","received_events_url":"https://api.github.com/users/simao/received_events","type":"User","site_admin":false},"created_at":"2017-07-07T09:17:51Z","updated_at":"2017-07-07T09:17:51Z","body":"Thank you all for your help fixing the issue. Forking the jvm or using `testOptions in Test += Tests.Cleanup(() => java.security.Security.removeProvider(\"BC\"))` works."}}
{"actor":{"display_login":"simao"}}