Incremental build failure when adding new Java class in editor/java/LANG/strategies
Initial state: project is built
Step 1: add a Java file ineditor/java/LANG/strategies
Step 2: add a reference to that class ineditor/java/LANG/strategies/InteropRegisterer.java
Step 3: build the project
Actual state: build failure withjava.lang.ClassNotFoundException
for the newly added class
Expected state: incremental build successFull error example:
10:36 | INFO | s.e.m.b.GenerateSourcesBuilder - Generating sources for language project eclipse:///paplj.full 10:36 | INFO | o.m.c.build.Builder - Building eclipse:///paplj.full 10:36 | INFO | o.m.c.build.Builder - Building 1 sources, 0 includes of language impl. org.metaborg:org.metaborg.meta.lang.esv:1.5.0-SNAPSHOT 10:36 | INFO | o.m.c.build.Builder - Building eclipse:///paplj.full 10:36 | INFO | o.m.c.build.Builder - Building 1 sources, 0 includes of language impl. org.metaborg:org.metaborg.meta.lang.esv:1.5.0-SNAPSHOT 10:36 | INFO | o.m.s.e.m.b.PreJavaBuilder - Building language project eclipse:///paplj.full 10:36 | INFO | Build log - Incrementally rebuild inconsistent units 10:36 | INFO | o.m.s.e.m.b.PostJavaBuilder - Packaging language project eclipse:///paplj.full 10:36 | INFO | Build log - Incrementally rebuild inconsistent units 10:36 | INFO | Build log - Requirement inconsistent: FileReq(/Users/vladvergu/tud/slde/publications/declare-your-language/paplj/paplj.full/target/classes/paplj/full/strategies/InteropRegisterer.class) 10:36 | INFO | Build log - > Creating JAR file 10:36 | INFO | o.m.s.e.m.b.PostJavaBuilder - Refreshing language project eclipse:///paplj.full 10:36 | INFO | o.m.s.e.m.b.PostJavaBuilder - Reloading language project eclipse:///paplj.full 10:36 | ERROR | o.m.s.e.e.EditorUpdateJob - Failed to update editor for eclipse:///paplj.examples/program/test09.pj org.metaborg.core.MetaborgException: Creating outline failed at org.metaborg.spoofax.core.outline.OutlineService.outline(OutlineService.java:80) ~[org.metaborg.spoofax.core_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] at org.metaborg.spoofax.eclipse.editor.EditorUpdateJob.outline(EditorUpdateJob.java:302) ~[org.metaborg.spoofax.eclipse_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] at org.metaborg.spoofax.eclipse.editor.EditorUpdateJob.update(EditorUpdateJob.java:208) ~[org.metaborg.spoofax.eclipse_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] at org.metaborg.spoofax.eclipse.editor.EditorUpdateJob.run(EditorUpdateJob.java:119) ~[org.metaborg.spoofax.eclipse_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) [org.eclipse.core.jobs_3.6.1.v20141014-1248.jar:na] Caused by: org.metaborg.core.MetaborgException: Failed to load JAR at org.metaborg.spoofax.core.stratego.StrategoRuntimeService.loadJars(StrategoRuntimeService.java:171) ~[org.metaborg.spoofax.core_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] at org.metaborg.spoofax.core.stratego.StrategoRuntimeService.loadFiles(StrategoRuntimeService.java:154) ~[org.metaborg.spoofax.core_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] at org.metaborg.spoofax.core.stratego.StrategoRuntimeService.createPrototype(StrategoRuntimeService.java:133) ~[org.metaborg.spoofax.core_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] at org.metaborg.spoofax.core.stratego.StrategoRuntimeService.runtime(StrategoRuntimeService.java:69) ~[org.metaborg.spoofax.core_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] at org.metaborg.spoofax.core.outline.OutlineService.outline(OutlineService.java:71) ~[org.metaborg.spoofax.core_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] ... 4 common frames omitted Caused by: org.strategoxt.IncompatibleJarException: Incompatible Stratego jar: file:/Users/vladvergu/tud/slde/publications/declare-your-language/paplj/paplj.full/include/paplj-java.jar (paplj/full/strategies/runprograms_0_0) at org.strategoxt.HybridInterpreter.registerJar(HybridInterpreter.java:356) ~[org.strategoxt.strj_1.5.0.20160111-153712-new-spoofax-plugin/:na] at org.strategoxt.HybridInterpreter.loadJars(HybridInterpreter.java:291) ~[org.strategoxt.strj_1.5.0.20160111-153712-new-spoofax-plugin/:na] at org.metaborg.spoofax.core.stratego.StrategoRuntimeService.loadJars(StrategoRuntimeService.java:169) ~[org.metaborg.spoofax.core_1.5.0.20160111-153712-new-spoofax-plugin.jar:na] ... 8 common frames omitted Caused by: java.lang.NoClassDefFoundError: paplj/full/strategies/runprograms_0_0 at paplj.full.strategies.InteropRegisterer.<init>(InteropRegisterer.java:8) ~[na:na] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_60] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_60] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_60] at java.lang.reflect.Constructor.newInstance(Constructor.java:422) ~[na:1.8.0_60] at java.lang.Class.newInstance(Class.java:442) ~[na:1.8.0_60] at org.strategoxt.HybridInterpreter.registerJar(HybridInterpreter.java:338) ~[org.strategoxt.strj_1.5.0.20160111-153712-new-spoofax-plugin/:na] ... 10 common frames omitted Caused by: java.lang.ClassNotFoundException: paplj.full.strategies.runprograms_0_0 at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_60] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_60] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_60] ... 17 common frames omitted
Spoofax version:
Submitted by Vlad Vergu on 12 January 2016 at 10:51Eclipse: org.eclipse.epp.package.standard.feature.feature.group 4.4.2.20150219-0708 Spoofax: org.metaborg.spoofax.eclipse 1.5.0.20160111-153712-new-spoofax-plugin System: Mac OS X x86_64 10.11.2
Issue Log
On 12 January 2016 at 11:13 Gabriël Konat commented:
Thanks for the report, I think https://github.com/metaborg/spoofax/commit/b501f29828121b5180304ea54ae37163781cd1a4 will fix it.
On 12 January 2016 at 13:21 Vlad Vergu commented:
Indeed it works as expected now.
On 12 January 2016 at 13:52 Gabriël Konat commented:
Great :)
On 12 January 2016 at 13:52 Gabriël Konat closed this issue.
Log in to post comments