Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 314398

Summary: [Xtext] Running MWE2 workflow fails due to missing AntlrToolRunner
Product: [Modeling] TMF Reporter: Johan Wannheden <johan.wannheden>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sven.efftinge
Version: 0.7.0Flags: sven.efftinge: helios+
Target Milestone: RC2   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Johan Wannheden CLA 2010-05-26 03:12:45 EDT
Build Identifier: 20100218-1602

I'm creating a MyDsl project and trying to run the MWE2 workflow. After answering 'y' in the console regarding download of the Antlr generator the following stack trace is printed:

0    [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering platform uri '/Users/johan/Development/migration%20workspaces/XtextRC2'

*ATTENTION*
It is recommended to use the ANTLR 3 parser generator (BSD licence - http://www.antlr.org/license.html).
Do you agree to download it (size 1MB) from 'http://download.itemis.com/antlr-generator-3.0.1.jar'? (type 'y' or 'n' and hit enter)y
14521 [main] INFO  erator.parser.antlr.AntlrToolFacade  - downloading file from 'http://download.itemis.com/antlr-generator-3.0.1.jar' ...
18284 [main] INFO  erator.parser.antlr.AntlrToolFacade  - finished downloading.
18285 [main] ERROR erator.parser.antlr.AntlrToolFacade  - de.itemis.xtext.antlr.AntlrToolRunner
18285 [main] ERROR erator.parser.antlr.AntlrToolFacade  - Loaded jar doesn't contain
18304 [main] ERROR erator.parser.antlr.AntlrToolFacade  - de.itemis.xtext.antlr.AntlrToolRunner
18305 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems running workflow org.xtext.example.mydsl.MyDsl: 
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
java.lang.RuntimeException: Problems running workflow org.xtext.example.mydsl.MyDsl: 
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:82)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
Caused by: java.lang.RuntimeException: 
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.handleIssues(Mwe2Bridge.java:56)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:66)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:197)
	at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:25)
	at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:18)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:80)
	... 3 more


Reproducible: Always
Comment 1 Sven Efftinge CLA 2010-05-26 04:03:13 EDT
It seems that it has to do with the whitespace in the path. Can you confirm this, i.e. does it work if you remove the whitespace in the path?
Comment 2 Johan Wannheden CLA 2010-05-26 04:22:20 EDT
No, unfortunately I'm getting the same problem in a workspace with a filesystem path without whitespaces.

And also, while I'm at it, I'm getting the following error when trying to generate an existing project:

0    [main] INFO  eclipse.emf.mwe.core.WorkflowRunner  - --------------------------------------------------------------------------------------
12   [main] INFO  eclipse.emf.mwe.core.WorkflowRunner  - EMF Modeling Workflow Engine 1.0.0, Build v201005250425
13   [main] INFO  eclipse.emf.mwe.core.WorkflowRunner  - (c) 2005-2009 openarchitectureware.org and contributors
13   [main] INFO  eclipse.emf.mwe.core.WorkflowRunner  - --------------------------------------------------------------------------------------
13   [main] INFO  eclipse.emf.mwe.core.WorkflowRunner  - running workflow: /Users/johan/Development/migration/XtextRC2/some/project/and/path/GenerateAbc.mwe
14   [main] INFO  eclipse.emf.mwe.core.WorkflowRunner  - 
709  [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering platform uri '/Users/johan/Development/migration/XtextRC2'
Exception in thread "main" java.lang.SecurityException: class "de.itemis.xtext.antlr.AntlrToolRunner"'s signer information does not match signer information of other classes in the same package
	at java.lang.ClassLoader.checkCerts(ClassLoader.java:807)
	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:488)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
	at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.getToolClass(AntlrToolFacade.java:48)
	at org.eclipse.xtext.generator.parser.antlr.AntlrToolFacade.isWorkable(AntlrToolFacade.java:133)
	at org.eclipse.xtext.generator.parser.antlr.AbstractAntlrGeneratorFragment.checkConfiguration(AbstractAntlrGeneratorFragment.java:42)
	at org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment.checkConfiguration(XtextAntlrGeneratorFragment.java:52)
	at org.eclipse.xtext.generator.CompositeGeneratorFragment.checkConfiguration(CompositeGeneratorFragment.java:211)
	at org.eclipse.xtext.generator.LanguageConfig.checkConfiguration(LanguageConfig.java:74)
	at org.eclipse.xtext.generator.Generator.checkConfigurationInternal(Generator.java:83)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent2.checkConfiguration(AbstractWorkflowComponent2.java:21)
	at org.eclipse.emf.mwe.core.container.CompositeComponent.checkConfiguration(CompositeComponent.java:142)
	at org.eclipse.emf.mwe.core.WorkflowRunner.prepare(WorkflowRunner.java:346)
	at org.eclipse.emf.mwe.core.WorkflowRunner.run(WorkflowRunner.java:290)
	at org.eclipse.emf.mwe.core.WorkflowRunner.main(WorkflowRunner.java:241)
2870 [main] INFO  ipse.xtext.generator.LanguageConfig  - No explicit fileExtensions configured. Using '*.abc'.

How do I solve that? If it's a bug and not related to this, I can create another issue.
Comment 3 Sven Efftinge CLA 2010-05-26 04:26:38 EDT
I could reproduce the first issue and am pretty sure it had to do with special characters in the URL.
Could you please double check the URL or post it here?
We are aware of the second problem, which is why we have to do an RC2a tonight. :-(
Comment 4 Johan Wannheden CLA 2010-05-26 04:30:08 EDT
This is the output of the first problem (workspace path without spaces):

0    [main] INFO  lipse.emf.mwe.utils.StandaloneSetup  - Registering platform uri '/Users/johan/Development/migration/XtextRC2'

*ATTENTION*
It is recommended to use the ANTLR 3 parser generator (BSD licence - http://www.antlr.org/license.html).
Do you agree to download it (size 1MB) from 'http://download.itemis.com/antlr-generator-3.0.1.jar'? (type 'y' or 'n' and hit enter)y
4843 [main] INFO  erator.parser.antlr.AntlrToolFacade  - downloading file from 'http://download.itemis.com/antlr-generator-3.0.1.jar' ...
6669 [main] INFO  erator.parser.antlr.AntlrToolFacade  - finished downloading.
6675 [main] ERROR erator.parser.antlr.AntlrToolFacade  - de.itemis.xtext.antlr.AntlrToolRunner
6675 [main] ERROR erator.parser.antlr.AntlrToolFacade  - Loaded jar doesn't contain
6677 [main] ERROR erator.parser.antlr.AntlrToolFacade  - de.itemis.xtext.antlr.AntlrToolRunner
6678 [main] ERROR mf.mwe2.launch.runtime.Mwe2Launcher  - Problems running workflow org.xtext.example.mydsl.MyDsl: 
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
java.lang.RuntimeException: Problems running workflow org.xtext.example.mydsl.MyDsl: 
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:82)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:52)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.run(Mwe2Launcher.java:74)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Launcher.main(Mwe2Launcher.java:35)
Caused by: java.lang.RuntimeException: 
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
[ERROR]: 

*ATTENTION*
It is highly recommended to use ANTLR's parser generator (get it from 'http://xtext.itemis.com/'). 
As an alternative to ANTLR you could also use the alternative implementation shipped with Xtext.
To do so use the generator fragment 'org.eclipse.xtext.generator.parser.packrat.PackratParserFragment' in your mwe2 file instead.(Element: -UNKNOWN-; Reported by: -UNKNOWN-)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.handleIssues(Mwe2Bridge.java:56)
	at org.eclipse.emf.mwe.core.lib.Mwe2Bridge.preInvoke(Mwe2Bridge.java:66)
	at org.eclipse.emf.mwe.core.lib.AbstractWorkflowComponent.preInvoke(AbstractWorkflowComponent.java:197)
	at org.eclipse.emf.mwe2.runtime.workflow.AbstractCompositeWorkflowComponent.preInvoke(AbstractCompositeWorkflowComponent.java:25)
	at org.eclipse.emf.mwe2.runtime.workflow.Workflow.run(Workflow.java:18)
	at org.eclipse.emf.mwe2.launch.runtime.Mwe2Runner.run(Mwe2Runner.java:80)
	... 3 more
Comment 5 Sven Efftinge CLA 2010-05-26 04:43:33 EDT
Ok, sorry this is getting a bit messy...

The situation is that we had a problem with the signing that occured because we use the same package in a signed jar as well as an unsigned jar (which classloaders do not like). Hence this is the second problem you also faced. In order to solve this I had to rename a package in the de.itemis.xtext.antlr jar which I already have uploaded in order to test it.

You are no downloading the new jar with renamed package, but calling it from yesterday's RC2 version which points to the old package name. As a result you get a class not found exception.

A bit complicated but I hope I was able to explain it.

Anyway, I have fixed both issues, though you'll have to wait for tonight's builds or configure a different AntlrToolRunner (i.e. the one from HEAD) into your MWE2 file :

  fragment = XtextAntlrGeneratorFragment {
    antlrTool = MySpecialAntlrToolFacade {}
  }
Comment 6 Karsten Thoms CLA 2017-09-19 16:38:19 EDT
Closing bug which were set to RESOLVED before Eclipse Neon.0.