{"action":"created","issue":{"url":"https://api.github.com/repos/oracle/graal/issues/612","repository_url":"https://api.github.com/repos/oracle/graal","labels_url":"https://api.github.com/repos/oracle/graal/issues/612/labels{/name}","comments_url":"https://api.github.com/repos/oracle/graal/issues/612/comments","events_url":"https://api.github.com/repos/oracle/graal/issues/612/events","html_url":"https://github.com/oracle/graal/issues/612","id":349756007,"node_id":"MDU6SXNzdWUzNDk3NTYwMDc=","number":612,"title":"Cannot initialize main class while compiling base Clojure 1.9; 1.8 ok.","user":{"login":"ghadishayban","id":829803,"node_id":"MDQ6VXNlcjgyOTgwMw==","avatar_url":"https://avatars1.githubusercontent.com/u/829803?v=4","gravatar_id":"","url":"https://api.github.com/users/ghadishayban","html_url":"https://github.com/ghadishayban","followers_url":"https://api.github.com/users/ghadishayban/followers","following_url":"https://api.github.com/users/ghadishayban/following{/other_user}","gists_url":"https://api.github.com/users/ghadishayban/gists{/gist_id}","starred_url":"https://api.github.com/users/ghadishayban/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ghadishayban/subscriptions","organizations_url":"https://api.github.com/users/ghadishayban/orgs","repos_url":"https://api.github.com/users/ghadishayban/repos","events_url":"https://api.github.com/users/ghadishayban/events{/privacy}","received_events_url":"https://api.github.com/users/ghadishayban/received_events","type":"User","site_admin":false},"labels":[{"id":837757615,"node_id":"MDU6TGFiZWw4Mzc3NTc2MTU=","url":"https://api.github.com/repos/oracle/graal/labels/substrate","name":"substrate","color":"e2c102","default":false}],"state":"open","locked":false,"assignee":{"login":"cstancu","id":1731630,"node_id":"MDQ6VXNlcjE3MzE2MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1731630?v=4","gravatar_id":"","url":"https://api.github.com/users/cstancu","html_url":"https://github.com/cstancu","followers_url":"https://api.github.com/users/cstancu/followers","following_url":"https://api.github.com/users/cstancu/following{/other_user}","gists_url":"https://api.github.com/users/cstancu/gists{/gist_id}","starred_url":"https://api.github.com/users/cstancu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstancu/subscriptions","organizations_url":"https://api.github.com/users/cstancu/orgs","repos_url":"https://api.github.com/users/cstancu/repos","events_url":"https://api.github.com/users/cstancu/events{/privacy}","received_events_url":"https://api.github.com/users/cstancu/received_events","type":"User","site_admin":false},"assignees":[{"login":"cstancu","id":1731630,"node_id":"MDQ6VXNlcjE3MzE2MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1731630?v=4","gravatar_id":"","url":"https://api.github.com/users/cstancu","html_url":"https://github.com/cstancu","followers_url":"https://api.github.com/users/cstancu/followers","following_url":"https://api.github.com/users/cstancu/following{/other_user}","gists_url":"https://api.github.com/users/cstancu/gists{/gist_id}","starred_url":"https://api.github.com/users/cstancu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstancu/subscriptions","organizations_url":"https://api.github.com/users/cstancu/orgs","repos_url":"https://api.github.com/users/cstancu/repos","events_url":"https://api.github.com/users/cstancu/events{/privacy}","received_events_url":"https://api.github.com/users/cstancu/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-08-11T18:56:32Z","updated_at":"2019-03-15T01:12:30Z","closed_at":null,"author_association":"NONE","body":"### Reproducible Steps\r\n1. clone https://github.com/ghadishayban/clojure/tree/graal-test\r\n2. `mvn -Plocal clean package -Dmaven.test.skip=true`\r\n3. `graalvm-ce-1.0.0-rc5/bin/native-image -cp clojure.jar clojure.main`\r\n\r\nThe branch above has a necessary fix for re-balancing monitorenter/exit, unrelated to the encountered error.\r\n\r\n### Error output\r\n```\r\n➜  clojure git:(monitor-unbalanced) ✗ graalvm-ce-1.0.0-rc5/bin/native-image -cp clojure.jar clojure.main             \r\nBuild on Server(pid: 13403, port: 41481)\r\n   classlist:     952.32 ms\r\n       (cap):     609.66 ms\r\n       setup:     793.01 ms\r\n    analysis:   2,750.15 ms\r\nerror: Bytecode parsing error: java.lang.NoClassDefFoundError: Could not initialize class clojure.main\r\nDetailed message:\r\nError: Bytecode parsing error: java.lang.NoClassDefFoundError: Could not initialize class clojure.main\r\nTrace: \r\n\tat parsing com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:177)\r\nCall path from entry point to com.oracle.svm.core.JavaMainWrapper.run(int, CCharPointerPointer): \r\n\tat com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:148)\r\n\tat com.oracle.svm.core.code.CEntryPointCallStubs.com_002eoracle_002esvm_002ecore_002eJavaMainWrapper_002erun_0028int_002corg_002egraalvm_002enativeimage_002ec_002etype_002eCCharPointerPointer_0029(generated:0)\r\nOriginal exception that caused the problem: java.lang.NoClassDefFoundError: Could not initialize class clojure.main\r\n\tat sun.misc.Unsafe.ensureClassInitialized(Native Method)\r\n\tat jdk.vm.ci.hotspot.HotSpotResolvedObjectTypeImpl.initialize(HotSpotResolvedObjectTypeImpl.java:389)\r\n\tat com.oracle.graal.pointsto.meta.AnalysisUniverse.createType(AnalysisUniverse.java:213)\r\n\tat com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:193)\r\n\tat com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:170)\r\n\tat com.oracle.graal.pointsto.meta.AnalysisMethod.getDeclaringClass(AnalysisMethod.java:296)\r\n\tat com.oracle.graal.pointsto.meta.AnalysisMethod.getSignature(AnalysisMethod.java:273)\r\n\tat com.oracle.graal.pointsto.flow.MethodFlowsGraph.<init>(MethodFlowsGraph.java:98)\r\n\tat com.oracle.graal.pointsto.flow.MethodTypeFlow.<init>(MethodTypeFlow.java:75)\r\n\tat com.oracle.graal.pointsto.meta.AnalysisMethod.<init>(AnalysisMethod.java:127)\r\n\tat com.oracle.graal.pointsto.meta.AnalysisUniverse.createMethod(AnalysisUniverse.java:399)\r\n\tat com.oracle.graal.pointsto.meta.AnalysisUniverse.lookupAllowUnresolved(AnalysisUniverse.java:387)\r\n\tat com.oracle.graal.pointsto.meta.AnalysisUniverse.lookup(AnalysisUniverse.java:364)\r\n\tat com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.lookup(IntrinsifyMethodHandlesInvocationPlugin.java:428)\r\n\tat com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.processInvokeWithMethodHandle(IntrinsifyMethodHandlesInvocationPlugin.java:394)\r\n\tat com.oracle.svm.hosted.phases.IntrinsifyMethodHandlesInvocationPlugin.handleInvoke(IntrinsifyMethodHandlesInvocationPlugin.java:153)\r\n\tat org.graalvm.compiler.java.BytecodeParser.tryNodePluginForInvocation(BytecodeParser.java:2163)\r\n\tat org.graalvm.compiler.java.BytecodeParser.appendInvoke(BytecodeParser.java:1674)\r\n\tat org.graalvm.compiler.java.BytecodeParser.genDynamicInvokeHelper(BytecodeParser.java:1527)\r\n\tat org.graalvm.compiler.java.BytecodeParser.genInvokeVirtualHelper(BytecodeParser.java:1553)\r\n\tat org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1534)\r\n\tat org.graalvm.compiler.java.BytecodeParser.genInvokeVirtual(BytecodeParser.java:1480)\r\n\tat com.oracle.svm.hosted.phases.SharedGraphBuilderPhase$SharedBytecodeParser.genInvokeVirtual(SharedGraphBuilderPhase.java:177)\r\n\tat org.graalvm.compiler.java.BytecodeParser.processBytecode(BytecodeParser.java:4848)\r\n\tat org.graalvm.compiler.java.BytecodeParser.iterateBytecodesForBlock(BytecodeParser.java:3135)\r\n\tat org.graalvm.compiler.java.BytecodeParser.processBlock(BytecodeParser.java:2944)\r\n\tat org.graalvm.compiler.java.BytecodeParser.build(BytecodeParser.java:888)\r\n\tat org.graalvm.compiler.java.BytecodeParser.buildRootMethod(BytecodeParser.java:782)\r\n\tat org.graalvm.compiler.java.GraphBuilderPhase$Instance.run(GraphBuilderPhase.java:95)\r\n\tat org.graalvm.compiler.phases.Phase.run(Phase.java:49)\r\n\tat org.graalvm.compiler.phases.BasePhase.apply(BasePhase.java:197)\r\n\tat org.graalvm.compiler.phases.Phase.apply(Phase.java:42)\r\n\tat org.graalvm.compiler.phases.Phase.apply(Phase.java:38)\r\n\tat com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.parse(MethodTypeFlowBuilder.java:196)\r\n\tat com.oracle.graal.pointsto.flow.MethodTypeFlowBuilder.apply(MethodTypeFlowBuilder.java:315)\r\n\tat com.oracle.graal.pointsto.flow.MethodTypeFlow.doParse(MethodTypeFlow.java:310)\r\n\tat com.oracle.graal.pointsto.flow.MethodTypeFlow.ensureParsed(MethodTypeFlow.java:300)\r\n\tat com.oracle.graal.pointsto.flow.MethodTypeFlow.addContext(MethodTypeFlow.java:107)\r\n\tat com.oracle.graal.pointsto.flow.StaticInvokeTypeFlow.update(InvokeTypeFlow.java:346)\r\n\tat com.oracle.graal.pointsto.BigBang$2.run(BigBang.java:502)\r\n\tat com.oracle.graal.pointsto.util.CompletionExecutor.lambda$execute$0(CompletionExecutor.java:174)\r\n\tat java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)\r\n\tat java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)\r\n\tat java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)\r\n\tat java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)\r\n\tat java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)\r\n\r\nError: Processing image build request failed\r\n```"},"comment":{"url":"https://api.github.com/repos/oracle/graal/issues/comments/473122700","html_url":"https://github.com/oracle/graal/issues/612#issuecomment-473122700","issue_url":"https://api.github.com/repos/oracle/graal/issues/612","id":473122700,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MzEyMjcwMA==","user":{"login":"cstancu","id":1731630,"node_id":"MDQ6VXNlcjE3MzE2MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/1731630?v=4","gravatar_id":"","url":"https://api.github.com/users/cstancu","html_url":"https://github.com/cstancu","followers_url":"https://api.github.com/users/cstancu/followers","following_url":"https://api.github.com/users/cstancu/following{/other_user}","gists_url":"https://api.github.com/users/cstancu/gists{/gist_id}","starred_url":"https://api.github.com/users/cstancu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cstancu/subscriptions","organizations_url":"https://api.github.com/users/cstancu/orgs","repos_url":"https://api.github.com/users/cstancu/repos","events_url":"https://api.github.com/users/cstancu/events{/privacy}","received_events_url":"https://api.github.com/users/cstancu/received_events","type":"User","site_admin":false},"created_at":"2019-03-15T01:12:30Z","updated_at":"2019-03-15T01:12:30Z","author_association":"MEMBER","body":"The reported error has been fixed. Now you can successfully build an image with `native-image --report-unsupported-elements-at-runtime  -cp clojure.jar clojure.main`:\r\n```\r\n$ native-image --report-unsupported-elements-at-runtime  -cp clojure.jar clojure.main\r\nBuild on Server(pid: 1448, port: 43927)\r\n[clojure.main:1448]    classlist:   1,309.32 ms\r\n[clojure.main:1448]        (cap):     562.67 ms\r\n[clojure.main:1448]        setup:     826.73 ms\r\nWarning: class initialization of class clojure.main failed with exception java.lang.ExceptionInInitializerError. This class will be initialized at run time because either option --report-unsupported-elements-at-runtime or option --allow-incomplete-classpath is used for image building. Use the option --delay-class-initialization-to-runtime=clojure.main to explicitly request delayed initialization of this class.\r\nWarning: class initialization of class clojure.lang.RT failed with exception java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT. This class will be initialized at run time because either option --report-unsupported-elements-at-runtime or option --allow-incomplete-classpath is used for image building. Use the option --delay-class-initialization-to-runtime=clojure.lang.RT to explicitly request delayed initialization of this class.\r\nWarning: class initialization of class clojure.lang.Numbers failed with exception java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT. This class will be initialized at run time because either option --report-unsupported-elements-at-runtime or option --allow-incomplete-classpath is used for image building. Use the option --delay-class-initialization-to-runtime=clojure.lang.Numbers to explicitly request delayed initialization of this class.\r\nWarning: class initialization of class clojure.lang.Numbers$BigDecimalOps failed with exception java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.Numbers$BigDecimalOps. This class will be initialized at run time because either option --report-unsupported-elements-at-runtime or option --allow-incomplete-classpath is used for image building. Use the option --delay-class-initialization-to-runtime=clojure.lang.Numbers$BigDecimalOps to explicitly request delayed initialization of this class.\r\nWarning: class initialization of class clojure.lang.PersistentTreeMap failed with exception java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT. This class will be initialized at run time because either option --report-unsupported-elements-at-runtime or option --allow-incomplete-classpath is used for image building. Use the option --delay-class-initialization-to-runtime=clojure.lang.PersistentTreeMap to explicitly request delayed initialization of this class.\r\nWarning: class initialization of class clojure.lang.Intrinsics failed with exception java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT. This class will be initialized at run time because either option --report-unsupported-elements-at-runtime or option --allow-incomplete-classpath is used for image building. Use the option --delay-class-initialization-to-runtime=clojure.lang.Intrinsics to explicitly request delayed initialization of this class.\r\n[clojure.main:1448]   (typeflow):   3,510.91 ms\r\n[clojure.main:1448]    (objects):   2,536.23 ms\r\n[clojure.main:1448]   (features):     131.02 ms\r\n[clojure.main:1448]     analysis:   6,311.87 ms\r\n[clojure.main:1448]     universe:     258.28 ms\r\n[clojure.main:1448]      (parse):     774.44 ms\r\n[clojure.main:1448]     (inline):     776.89 ms\r\n[clojure.main:1448]    (compile):   7,304.44 ms\r\n[clojure.main:1448]      compile:   9,331.61 ms\r\n[clojure.main:1448]        image:     850.60 ms\r\n[clojure.main:1448]        write:     147.98 ms\r\n[clojure.main:1448]      [total]:  19,104.10 ms\r\n```\r\n\r\n However, running it will yield:\r\n```\r\n$ ./clojure.main \r\nException in thread \"main\" java.lang.ExceptionInInitializerError\r\n\tat com.oracle.svm.core.hub.ClassInitializationInfo.initialize(ClassInitializationInfo.java:281)\r\n\tat java.lang.Class.ensureInitialized(DynamicHub.java:402)\r\n\tat clojure.main.<clinit>(main.java:20)\r\n\tat com.oracle.svm.core.hub.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:341)\r\n\tat com.oracle.svm.core.hub.ClassInitializationInfo.initialize(ClassInitializationInfo.java:261)\r\n\tat java.lang.Class.ensureInitialized(DynamicHub.java:402)\r\nCaused by: java.io.FileNotFoundException: Could not locate clojure/core__init.class or clojure/core.clj on classpath.\r\n\tat clojure.lang.RT.load(RT.java:463)\r\n\tat clojure.lang.RT.load(RT.java:426)\r\n\tat clojure.lang.RT.doInit(RT.java:468)\r\n\tat clojure.lang.RT.<clinit>(RT.java:336)\r\n\tat com.oracle.svm.core.hub.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:341)\r\n\tat com.oracle.svm.core.hub.ClassInitializationInfo.initialize(ClassInitializationInfo.java:261)\r\n\t... 5 more\r\n```"}}
{"actor":{"display_login":"cstancu"}}