Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337440 - New NoSuchFieldError "ruleMemo" on ATL_ANTLR3Lexer.java
Summary: New NoSuchFieldError "ruleMemo" on ATL_ANTLR3Lexer.java
Status: CLOSED FIXED
Alias: None
Product: MMT.ATL
Classification: Modeling
Component: Engine (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: mmt-atl.toolkit-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 344097 337431 342811
  Show dependency tree
 
Reported: 2011-02-17 09:13 EST by Fabien Giquel CLA
Modified: 2011-05-02 05:34 EDT (History)
2 users (show)

See Also:


Attachments
Stack trace (4.47 KB, text/plain)
2011-02-17 09:13 EST, Fabien Giquel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabien Giquel CLA 2011-02-17 09:13:15 EST
Hi,

Our non-reg JUnit tests on MoDisco project (Indigo nighlty build) encounters some regression with recent ATL libraries (org.Eclipse.m2m.atl  3.2.0.v20110201-0921).

Our test calls the ATLParser.parseToModel service. The test code has not changed recently but encounters now the following error :

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
...
	at org.eclipse.m2m.atl.dsls.tcs.injector.wrappers.antlr3.ParserWrapper.parse(ParserWrapper.java:85)
...
	at org.eclipse.m2m.atl.engine.parser.AtlParser.parseToModel(AtlParser.java:258)

Caused by: java.lang.NoSuchFieldError: ruleMemo
	at org.eclipse.m2m.atl.dsls.tcs.injector.ATL_ANTLR3Lexer.<init>(ATL_ANTLR3Lexer.java:148)
Comment 1 Fabien Giquel CLA 2011-02-17 09:13:44 EST
Created attachment 189185 [details]
Stack trace
Comment 2 Fabien Giquel CLA 2011-03-07 12:05:54 EST
The issue does not occur anymore. Mark the bug as resolved.
Comment 3 Nicolas Bros CLA 2011-04-15 05:50:45 EDT
The problem is happening again with 3.7M6 and with MoDisco (which depends on ATL).

ATL appears to be incompatible with the latest version of Antlr (3.2.0). It works only with Antlr 3.0.0.

In our installations, we can see two versions of Antlr:
org.antlr.runtime_3.0.0.v200803061811
org.antlr.runtime_3.2.0.v201101311130

But at runtime, ATL uses version 3.2.0, which leads to this "NoSuchFieldError: ruleMemo" error.

ATL uses version 3.2.0 because it does not specify a version range, so OSGi picks the latest available version, which is 3.2.0.

In the Manifest.MF of org.eclipse.m2m.atl.dsls, I see:

Require-Bundle: [...],org.antlr.runtime;visibility:=reexport,[...]

I propose to replace it with:

Require-Bundle: [...],org.antlr.runtime;bundle-version="[3.0.0,3.1.0)";visibility:=reexport,[...]

With this change, org.eclipse.m2m.atl.dsls compiles in my workspace with both org.antlr.runtime 3.0.0 and 3.2.0 installed.


Eclipse SDK
Version: 3.7.0
Build id: I20110310-1119

org.eclipse.m2m.atl.sdk.feature.group
3.2.0.v20110315-0927
Comment 4 William Piers CLA 2011-05-02 05:34:00 EDT
I changed the manifest.mf in the latest build (http://www.eclipse.org/modeling/download.php?file=/modeling/m2m/atl/downloads/drops/3.2.0/S201105020337/m2m-atl-Update-3.2.0M7.zip). Thanks for reporting it !