Search code examples
javaemfxpandoaw

Exception in thread "main" java.lang.NoSuchFieldError: ruleMemo


I am following a nice openArchitectureWare tutorial (It is about code generation with oAW from EMF models using Xpand).

At the final code generation step, when it is supposed to generate the code (when running workflow.oaw after defining the Root.xpt template), I get this error:

    0    INFO  WorkflowRunner     - --------------------------------------------------------------------------------------
9    INFO  WorkflowRunner     - openArchitectureWare 4.3.1, Build 20090107-2000PRD
9    INFO  WorkflowRunner     - (c) 2005-2008 openarchitectureware.org and contributors
10   INFO  WorkflowRunner     - --------------------------------------------------------------------------------------
11   INFO  WorkflowRunner     - running workflow: workflow.oaw
11   INFO  WorkflowRunner     - 
Exception in thread "main" java.lang.NoSuchFieldError: ruleMemo
    at org.openarchitectureware.xpand2.parser.XpandParser.<init>(XpandParser.java:63)
    at org.openarchitectureware.xpand2.parser.XpandParser.<init>(XpandParser.java:74)
    at org.openarchitectureware.xpand2.parser.XpandLocationAddingParser.<init>(XpandLocationAddingParser.java:32)
    at org.openarchitectureware.xpand2.parser.XpandParseFacade$2.<init>(XpandParseFacade.java:52)
    at org.openarchitectureware.xpand2.parser.XpandParseFacade.getParser(XpandParseFacade.java:52)
    at org.openarchitectureware.xpand2.parser.XpandParseFacade.file(XpandParseFacade.java:34)
    at org.openarchitectureware.xpand2.parser.XpandParseFacade.file(XpandParseFacade.java:21)
    at org.openarchitectureware.xpand2.Generator.getStatement(Generator.java:457)
    at org.openarchitectureware.xpand2.Generator.checkConfigurationInternal(Generator.java:497)
    at org.openarchitectureware.workflow.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:42)
    at org.openarchitectureware.workflow.container.CompositeComponent.checkConfiguration(CompositeComponent.java:169)
    at org.openarchitectureware.workflow.WorkflowRunner.prepare(WorkflowRunner.java:310)
    at org.openarchitectureware.workflow.WorkflowRunner.run(WorkflowRunner.java:258)
    at org.openarchitectureware.workflow.WorkflowRunner.main(WorkflowRunner.java:213)

I searched a lot for the solution. Most of them say that it is an incompatibility issue, for example having several versions of a special jar file in the class path but I can`t find any duplicate jar files at eclipse plugins folder. Is it really the cause? If so, what are the duplicate jar files in my case? and if not, any other solution?

(I have installed oAW 4.3.1 and Xpand 1.4.0 on eclipse-java-kepler-R-win32-x86_64)


Solution

  • Xpand was originally developed as part of openArchitectureWare project. But now, it is an independent component under eclipse and there is no need to install oaw first. So, Changing the whole idea and using this newer tutorial brought the satisfaction :)