Error generating code when using an override template

56 views
Skip to first unread message

Oleg Cohen

unread,
Dec 23, 2013, 4:51:34 PM12/23/13
to sculptor...@googlegroups.com
Hello,

I am getting the following error when using a template override for Domain Object properties:

[DEBUG]     chaining with class 'class generator.DomainObjectPropertiesTmplOverride'
[ERROR] Running workflow failed
java.lang.RuntimeException: Problems running workflow org.sculptor.generator.SculptorGenerator:
[ERROR]: Error creating module 'null'(Element: -UNKNOWN-; Reported by: ChainOverrideAwareGuiceWorkflowComponent)
     java.lang.NoSuchMethodException: generator.DomainObjectPropertiesTmplOverride.<init>(org.sculptor.generator.template.domain.DomainObjectPropertiesTmpl, [Lorg.sculptor.generator.template.domain.DomainObjectPropertiesTmpl;)
    at java.lang.Class.getConstructor0(Class.java:2730)
    at java.lang.Class.getConstructor(Class.java:1676)
    at org.sculptor.generator.chain.ChainOverrideAwareModule.buildChainForInstance(ChainOverrideAwareModule.java:239)
    at org.sculptor.generator.chain.ChainOverrideAwareModule.buildChainForInstance(ChainOverrideAwareModule.java:260)
    at org.sculptor.generator.chain.ChainOverrideAwareModule.buildChainForInstance(ChainOverrideAwareModule.java:260)
    at org.sculptor.generator.chain.ChainOverrideAwareModule.buildChainForClass(ChainOverrideAwareModule.java:188)
    at org.sculptor.generator.chain.ChainOverrideAwareModule$5.apply(ChainOverrideAwareModule.java:125)
    at org.sculptor.generator.chain.ChainOverrideAwareModule$5.apply(ChainOverrideAwareModule.java:123)
    at org.eclipse.xtext.xbase.lib.IterableExtensions.forEach(IterableExtensions.java:399)
    at org.sculptor.generator.chain.ChainOverrideAwareModule.buildChainForClasses(ChainOverrideAwareModule.java:128)
    at org.sculptor.generator.chain.ChainOverrideAwareModule.buildChainForClasses(ChainOverrideAwareModule.java:133)
    at org.sculptor.generator.chain.ChainOverrideAwareModule.buildChainForClasses(ChainOverrideAwareModule.java:133)
    at org.sculptor.generator.chain.ChainOverrideAwareModule.configure(ChainOverrideAwareModule.java:108)
    at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
    at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
    at com.google.inject.spi.Elements.getElements(Elements.java:101)
    at com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:132)
    at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:103)
    at com.google.inject.Guice.createInjector(Guice.java:95)
    at com.google.inject.Guice.createInjector(Guice.java:72)
    at com.google.inject.Guice.createInjector(Guice.java:62)
    at org.sculptor.generator.mwe2.ChainOverrideAwareGuiceWorkflowComponent.invokeInternal(ChainOverrideAwareGuiceWorkflowComponent.java:110)

I looked at the examples and I am not seeing any constructors. Seems like it is looking for a particular one.

Would appreciate some pointers on how to overcome the problem!

Thank you,
Oleg

Torsten Juergeleit

unread,
Dec 23, 2013, 6:55:12 PM12/23/13
to sculptor...@googlegroups.com
I looked at the examples and I am not seeing any constructors. Seems like it is looking for a particular one.

These constructors are generated via Sculptors Xtend active anotation "@Override" (together with "@ChainOverridable").

I'm assuming you have the "sculptor-active-annotations" project (providing the implementations of Sculptors annotations of its template override feature) opened in your Eclipse workspace. If this project is open in the Eclipse workspace then strange side-effects are happening: Xtends incremental compiler is picking up the source code of the aforementioned annotations and compiles them together with the template extensions. This doesn't work. The annotations have to be compiled first and then the compiled annotation classes have to be available on the class path while compiling the extensions.

/Torsten
Reply all
Reply to author
Forward
0 new messages