{"action":"created","issue":{"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/7572","repository_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j","labels_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/7572/labels{/name}","comments_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/7572/comments","events_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/7572/events","html_url":"https://github.com/deeplearning4j/deeplearning4j/issues/7572","id":434605014,"node_id":"MDU6SXNzdWU0MzQ2MDUwMTQ=","number":7572,"title":"SameDiff doesn't run on Java 12","user":{"login":"treo","id":509379,"node_id":"MDQ6VXNlcjUwOTM3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/509379?v=4","gravatar_id":"","url":"https://api.github.com/users/treo","html_url":"https://github.com/treo","followers_url":"https://api.github.com/users/treo/followers","following_url":"https://api.github.com/users/treo/following{/other_user}","gists_url":"https://api.github.com/users/treo/gists{/gist_id}","starred_url":"https://api.github.com/users/treo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treo/subscriptions","organizations_url":"https://api.github.com/users/treo/orgs","repos_url":"https://api.github.com/users/treo/repos","events_url":"https://api.github.com/users/treo/events{/privacy}","received_events_url":"https://api.github.com/users/treo/received_events","type":"User","site_admin":false},"labels":[{"id":965529641,"node_id":"MDU6TGFiZWw5NjU1Mjk2NDE=","url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/labels/SameDiff","name":"SameDiff","color":"c2e0c6","default":false}],"state":"closed","locked":false,"assignee":{"login":"AlexDBlack","id":2360237,"node_id":"MDQ6VXNlcjIzNjAyMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/2360237?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexDBlack","html_url":"https://github.com/AlexDBlack","followers_url":"https://api.github.com/users/AlexDBlack/followers","following_url":"https://api.github.com/users/AlexDBlack/following{/other_user}","gists_url":"https://api.github.com/users/AlexDBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexDBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexDBlack/subscriptions","organizations_url":"https://api.github.com/users/AlexDBlack/orgs","repos_url":"https://api.github.com/users/AlexDBlack/repos","events_url":"https://api.github.com/users/AlexDBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AlexDBlack/received_events","type":"User","site_admin":false},"assignees":[{"login":"AlexDBlack","id":2360237,"node_id":"MDQ6VXNlcjIzNjAyMzc=","avatar_url":"https://avatars0.githubusercontent.com/u/2360237?v=4","gravatar_id":"","url":"https://api.github.com/users/AlexDBlack","html_url":"https://github.com/AlexDBlack","followers_url":"https://api.github.com/users/AlexDBlack/followers","following_url":"https://api.github.com/users/AlexDBlack/following{/other_user}","gists_url":"https://api.github.com/users/AlexDBlack/gists{/gist_id}","starred_url":"https://api.github.com/users/AlexDBlack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlexDBlack/subscriptions","organizations_url":"https://api.github.com/users/AlexDBlack/orgs","repos_url":"https://api.github.com/users/AlexDBlack/repos","events_url":"https://api.github.com/users/AlexDBlack/events{/privacy}","received_events_url":"https://api.github.com/users/AlexDBlack/received_events","type":"User","site_admin":false}],"milestone":null,"comments":12,"created_at":"2019-04-18T06:08:29Z","updated_at":"2019-05-18T12:56:26Z","closed_at":"2019-04-18T11:25:05Z","author_association":"MEMBER","body":"The following simple application runs fine on Java 8 but throws an exception with Java 12.\r\n\r\n```java\r\nimport org.nd4j.autodiff.samediff.SDVariable;\r\nimport org.nd4j.autodiff.samediff.SameDiff;\r\nimport org.nd4j.linalg.factory.Nd4j;\r\n\r\npublic class App\r\n{\r\n    public static void main( String[] args )\r\n    {\r\n        SameDiff sd = SameDiff.create();\r\n        SDVariable one = sd.var(\"one\", Nd4j.ones(1,2,3));\r\n        one.plus(one).sum(\"out\");\r\n        sd.exec(null, \"out\");\r\n    }\r\n}\r\n```\r\n\r\nException:\r\n```\r\nException in thread \"main\" java.lang.NullPointerException\r\n\tat org.nd4j.autodiff.functions.DifferentialFunction.propertiesForFunction(DifferentialFunction.java:157)\r\n\tat org.nd4j.autodiff.functions.DifferentialFunction.resolvePropertiesFromSameDiffBeforeExecution(DifferentialFunction.java:544)\r\n\tat org.nd4j.autodiff.samediff.internal.InferenceSession.getAndParameterizeOp(InferenceSession.java:622)\r\n\tat org.nd4j.autodiff.samediff.internal.InferenceSession.getAndParameterizeOp(InferenceSession.java:37)\r\n\tat org.nd4j.autodiff.samediff.internal.AbstractSession.output(AbstractSession.java:249)\r\n\tat org.nd4j.autodiff.samediff.SameDiff.exec(SameDiff.java:3932)\r\n\tat tech.dubs.App.main(App.java:27)\r\n```\r\n\r\nThe issue is due to Guavas ClassPath returning an empty List in https://github.com/deeplearning4j/deeplearning4j/blob/master/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/imports/converters/DifferentialFunctionClassHolder.java#L167 on the newer java version.\r\n\r\nAccording to https://github.com/google/guava/issues/3249 we would have to change to use both `ClassLoader.getSystemClassLoader()` here AND use a newer guava version (min 23.1).\r\n\r\nAs Guava > 20 requires Java 8, and has been split into JRE and Android artifacts, and we don't have full classpath control in environments like Spark, it may be a good idea to investigate a different solution."},"comment":{"url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/comments/493675180","html_url":"https://github.com/deeplearning4j/deeplearning4j/issues/7572#issuecomment-493675180","issue_url":"https://api.github.com/repos/deeplearning4j/deeplearning4j/issues/7572","id":493675180,"node_id":"MDEyOklzc3VlQ29tbWVudDQ5MzY3NTE4MA==","user":{"login":"lock[bot]","id":33595554,"node_id":"MDM6Qm90MzM1OTU1NTQ=","avatar_url":"https://avatars1.githubusercontent.com/in/6672?v=4","gravatar_id":"","url":"https://api.github.com/users/lock%5Bbot%5D","html_url":"https://github.com/apps/lock","followers_url":"https://api.github.com/users/lock%5Bbot%5D/followers","following_url":"https://api.github.com/users/lock%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/lock%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/lock%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lock%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/lock%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/lock%5Bbot%5D/repos","events_url":"https://api.github.com/users/lock%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/lock%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2019-05-18T12:56:26Z","updated_at":"2019-05-18T12:56:26Z","author_association":"NONE","body":"This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs."}}
{"actor":{"display_login":"lock"}}