Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [XCore] Xtext-maven-plugin with xcore lead to exception
[XCore] Xtext-maven-plugin with xcore lead to exception [message #1705483] Sun, 16 August 2015 20:47 Go to next message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010
Member

Hi modeling heroes!

I'm creating a tycho/xcore/xtext project, and encounters an issue when mixing xcore and xtext.

While building, I got this exception on my xcore powered project:

[INFO] --- xtext-maven-plugin:2.8.4:generate (default) @ net.osgiliath.modeler.metamodel.class ---
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.ecore:jar:2.10.0-v20130911-20131101.184326-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.ecore:jar:2.10.0-v20140117-20140308.162131-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.ecore:jar:2.10.0-v20140514-20140615.074948-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.common:jar:2.10.0-v20130911-20131101.184418-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.common:jar:2.10.0-v20140117-20140308.162206-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.common:jar:2.10.0-v20140514-20140615.074938-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.10.0.v20130911-20131101.184401-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.10.0-v20140117-20140308.162157-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.10.0-v20140514-20140615.075014-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.codegen:jar:2.9.0-v20130930-20131101.184305-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.codegen:jar:2.10.0-v20140127-20140308.162113-2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.codegen:jar:2.10.0-v20140519-20140615.074924-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.codegen.ecore:jar:2.10.0-v20130930-20131101.184147-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.codegen.ecore:jar:2.10.0-v20140127-20140308.162034-2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for org.eclipse.emf:org.eclipse.emf.codegen.ecore:jar:2.10.0-v20140519-20140615.074844-1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] Encoding: UTF-8
[INFO] Compiler source level: 1.8
[INFO] Compiler target level: 1.8
[INFO] Using common types.
[INFO] Collecting source models.
[INFO] Installing type provider.
[WARNING] Only terminal rules are supported by lexer based converters but got SignedInt which is an instance of ParserRule
java.lang.IllegalArgumentException: Only terminal rules are supported by lexer based converters but got SignedInt which is an instance of ParserRule
	at org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter.setRule(AbstractLexerBasedConverter.java:128)
	at org.eclipse.xtext.conversion.impl.AbstractDeclarativeValueConverterService.internalRegisterForClass(AbstractDeclarativeValueConverterService.java:128)
	at org.eclipse.xtext.conversion.impl.AbstractDeclarativeValueConverterService.getConverters(AbstractDeclarativeValueConverterService.java:95)
	at org.eclipse.xtext.conversion.impl.AbstractDeclarativeValueConverterService.getConverter(AbstractDeclarativeValueConverterService.java:83)
	at org.eclipse.xtext.conversion.impl.AbstractDeclarativeValueConverterService.toValue(AbstractDeclarativeValueConverterService.java:74)
	at org.eclipse.xtext.parser.DefaultEcoreElementFactory.getTokenValue(DefaultEcoreElementFactory.java:90)
	at org.eclipse.xtext.parser.DefaultEcoreElementFactory.set(DefaultEcoreElementFactory.java:69)
	at org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser.set(AbstractInternalAntlrParser.java:319)
	at org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser.set(AbstractInternalAntlrParser.java:326)
	at org.eclipse.emf.ecore.xcore.parser.antlr.internal.InternalXcoreParser.ruleXStringToStringMapEntry(InternalXcoreParser.java:871)
	at org.eclipse.emf.ecore.xcore.parser.antlr.internal.InternalXcoreParser.ruleXAnnotation(InternalXcoreParser.java:669)
	at org.eclipse.emf.ecore.xcore.parser.antlr.internal.InternalXcoreParser.ruleXPackage(InternalXcoreParser.java:286)
	at org.eclipse.emf.ecore.xcore.parser.antlr.internal.InternalXcoreParser.entryRuleXPackage(InternalXcoreParser.java:199)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser.parse(AbstractInternalAntlrParser.java:541)
	at org.eclipse.xtext.parser.antlr.AbstractAntlrParser.doParse(AbstractAntlrParser.java:102)
	at org.eclipse.xtext.parser.antlr.AbstractAntlrParser.parse(AbstractAntlrParser.java:84)
	at org.eclipse.xtext.parser.antlr.AbstractAntlrParser.doParse(AbstractAntlrParser.java:62)
	at org.eclipse.xtext.parser.AbstractParser.parse(AbstractParser.java:33)
	at org.eclipse.xtext.resource.XtextResource.doLoad(XtextResource.java:170)
	at org.eclipse.xtext.linking.lazy.LazyLinkingResource.doLoad(LazyLinkingResource.java:101)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
	at org.eclipse.xtext.resource.persistence.StorageAwareResource.load(StorageAwareResource.java:95)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	at org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:265)
	at org.eclipse.xtext.builder.standalone.StandaloneBuilder.launch(StandaloneBuilder.java:253)
	at org.eclipse.xtext.maven.XtextGenerator.internalExecute(XtextGenerator.java:164)
	at org.eclipse.xtext.maven.XtextGenerator.execute(XtextGenerator.java:140)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[INFO] Generating stubs into /Users/charliemordant/git/net.osgiliath.modeler/net.osgiliath.modeler.metamodels/net.osgiliath.modeler.metamodel.class/target/xtext-temp/stubs
[INFO] Compiling stubs located in /Users/charliemordant/git/net.osgiliath.modeler/net.osgiliath.modeler.metamodels/net.osgiliath.modeler.metamodel.class/target/xtext-temp/stubs
[INFO] Installing type provider for stubs.
[INFO] Validate and generate.
[INFO] Starting validation for input: 'class.xcore'
[INFO] Starting generator for input: 'class.xcore'


Here's my xtext-maven-plugin configuration (if it is related):
				<plugin>
					<groupId>org.eclipse.xtext</groupId>
					<artifactId>xtext-maven-plugin</artifactId>
					<version>${xtext-version}</version>
					<executions>
						<execution>
							<phase>generate-sources</phase>
							<goals>
								<goal>generate</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<failOnValidationError>false</failOnValidationError>
						<languages>
							<language>
								<setup>org.eclipse.xtext.ecore.EcoreSupport</setup>
								<outputConfigurations>
									<outputConfiguration>
										<outputDirectory>${project.build.directory}/model-gen</outputDirectory>
									</outputConfiguration>
								</outputConfigurations>
							</language>
							<language>
								<setup>org.eclipse.emf.codegen.ecore.xtext.GenModelSupport</setup>
								<outputConfigurations>
									<outputConfiguration>
										<outputDirectory>${project.build.directory}/model-gen</outputDirectory>
									</outputConfiguration>
								</outputConfigurations>
							</language>
							<language>
								<setup>org.eclipse.emf.ecore.xcore.XcoreStandaloneSetup</setup>
								<outputConfigurations>
									<outputConfiguration>
										<outputDirectory>${project.build.directory}/model-gen</outputDirectory>
									</outputConfiguration>
								</outputConfigurations>
							</language>
						</languages>
						<sourceRoots>
							<root>${project.basedir}/model</root>
						</sourceRoots>
					</configuration>
					<dependencies>
						<dependency>
							<groupId>org.osgi</groupId>
							<artifactId>org.osgi.core</artifactId>
							<version>${org.osgi_org.osgi.core.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.core</groupId>
							<artifactId>org.eclipse.core.resources</artifactId>
							<version>${org.eclipse.core_org.eclipse.core.resources.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.text</groupId>
							<artifactId>org.eclipse.text</artifactId>
							<version>${org.eclipse.text_org.eclipse.text.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.emf</groupId>
							<artifactId>org.eclipse.emf.ecore</artifactId>
							<version>${org.eclipse.emf_org.eclipse.emf.ecore.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.emf</groupId>
							<artifactId>org.eclipse.emf.codegen.ecore</artifactId>
							<version>${org.eclipse.emf_org.eclipse.emf.codegen.ecore.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.emf</groupId>
							<artifactId>org.eclipse.emf.codegen.ecore.xtext</artifactId>
							<version>${org.eclipse.emf_org.eclipse.emf.codegen.ecore.xtext.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.emf</groupId>
							<artifactId>org.eclipse.emf.ecore.xcore.lib</artifactId>
							<version>${org.eclipse.emf_org.eclipse.emf.ecore.xcore.lib.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.emf</groupId>
							<artifactId>org.eclipse.emf.ecore.xcore</artifactId>
							<version>${org.eclipse.emf_org.eclipse.emf.ecore.xcore.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.xtext</groupId>
							<artifactId>org.eclipse.xtext.common.types</artifactId>
							<version>${org.eclipse.xtext_org.eclipse.xtext.common.types.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.xtext</groupId>
							<artifactId>org.eclipse.xtext.xbase</artifactId>
							<version>${org.eclipse.xtext_org.eclipse.xtext.xbase.version}</version>
						</dependency>
						<dependency>
							<groupId>org.eclipse.xtext</groupId>
							<artifactId>org.eclipse.xtext.xbase.lib</artifactId>
							<version>${org.eclipse.xtext_org.eclipse.xtext.xbase.version}</version>
						</dependency>
					</dependencies>
				</plugin>
<properties>
		<tycho-version>0.23.1</tycho-version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<org.eclipse.emf_org.eclipse.emf.codegen.ecore.xtext.version>1.1.1</org.eclipse.emf_org.eclipse.emf.codegen.ecore.xtext.version>
		<org.eclipse.emf_org.eclipse.emf.ecore.xcore.lib.version>1.1.0</org.eclipse.emf_org.eclipse.emf.ecore.xcore.lib.version>
		<org.eclipse.emf_org.eclipse.emf.ecore.xcore.version>1.2.2</org.eclipse.emf_org.eclipse.emf.ecore.xcore.version>
		<xtext-version>2.8.4</xtext-version>
		<org.osgi_org.osgi.core.version>6.0.0</org.osgi_org.osgi.core.version>
		<org.eclipse.core_org.eclipse.core.resources.version>3.7.100</org.eclipse.core_org.eclipse.core.resources.version>
		<org.eclipse.text_org.eclipse.text.version>3.5.101</org.eclipse.text_org.eclipse.text.version>
		<org.eclipse.emf_org.eclipse.emf.ecore.version>2.10.1</org.eclipse.emf_org.eclipse.emf.ecore.version>
		<org.eclipse.emf_org.eclipse.emf.codegen.ecore.version>2.10.1</org.eclipse.emf_org.eclipse.emf.codegen.ecore.version>
		<org.eclipse.equinox_org.eclipse.equinox.common.version>3.6.0</org.eclipse.equinox_org.eclipse.equinox.common.version>
		<org.eclipse.xtext_org.eclipse.xtext.common.types.version>2.8.4</org.eclipse.xtext_org.eclipse.xtext.common.types.version>
		<org.eclipse.xtext_org.eclipse.xtext.xbase.version>2.8.4</org.eclipse.xtext_org.eclipse.xtext.xbase.version>
		<parentPropertiesFile>root.properties</parentPropertiesFile>
	</properties>


And finally the grammar (fairly simple):

@GenModel(childCreationExtenders="true", copyrightText="Osgiliath All rights reserved", extensibleProviderFactory="true", modelDirectory="/net.osgiliath.modeler.metamodel.class/target/model-gen", editDirectory="/net.osgiliath.modeler.metamodel.class.edit/src/main/java-gen", editorDirectory="/net.osgiliath.modeler.metamodel.class.editor/src/main/java-gen", creationSubmenus="true")
@Ecore(nsURI="http://www.osgiliath.net/metamodels/classes/0.0.1")
package net.osgiliath.modeler.metamodel.classes


class ONamedElement {
	String name
}
class OElements extends ONamedElement {
	contains OPackage[] packages
	contains OParametrizedClassifier[] parametrizedClassifiers
}
class OPackage extends ONamedElement {
	contains OPackage[] subPackages opposite superPackage
	container OPackage superPackage opposite subPackages
	contains OClassifier[] classifiers opposite ownerPackage
	derived String FQN get
	{
		 var FQN = name
		 var OPackage current = superPackage
		 while (null != current) {
		 	FQN=current.name + "." + FQN
		 	current = current.superPackage
		 } 
		 return FQN
	}
}

class OType extends ONamedElement{
}

enum VISIBILITY {
	public as '+' = 0
	protected as '#' = 1
	private as '-' = 2
}
class OVisibilityAble extends OType {
	VISIBILITY visibility
}
class OStaticable extends OType {
	boolean isStatic = "false"
}
class OFinalizable extends OType {
	Boolean isFinal = "false"
}
class OAbstractable {
	Boolean isAbstract = "false"
}
class OClassifier extends OType {
	container OPackage ownerPackage opposite classifiers
	derived String fQN get
	{
		 return ownerPackage.FQN + "." + name
	}
	op String toString() {
		return FQN
	}
	
}
class OParameter extends ONamedElement, OFinalizable {
	refers OType oType
}
class OMethod extends ONamedElement, OVisibilityAble, OStaticable, OFinalizable, OAbstractable {
	refers OType returnType
	contains OParameter[] parameters
}
class OMethodable extends OClassifier {
	contains OMethod[] methods
}
class OInterface extends OVisibilityAble,OMethodable {
	refers OInterface[] extensions
}
class OAttribute extends OParameter, OVisibilityAble, OStaticable {
	
}
class OClass extends OVisibilityAble, OMethodable, OFinalizable, OAbstractable {
	refers OInterface[] implements
	refers OClass extensions 
	contains OAttribute[] attributes
}
class OParametrizedClassifier extends OClassifier {
	refers OClassifier classifier
	refers OClassifier[] parametrizedClassifiers
}


I also have a grammar using this xcore model, that throws the same exception when I reference this xcore. But when I export the genmodel then reference it for the grammar, it passes without any issue.

Any idea on this? I looked at eclipse bugs or any other source, but didn't find any similar issue.

Best regards,

Charlie
Re: [XCore] Xtext-maven-plugin with xcore lead to exception [message #1705487 is a reply to message #1705483] Mon, 17 August 2015 04:41 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30372
Registered: July 2009
Senior Member
Charlie,

This should be fixed in the maintenance stream
http://download.eclipse.org/modeling/emf/emf/updates/2.11.x


On 16/08/2015 10:47 PM, Charlie Mordant wrote:
> Hi modeling heroes!
>
> I'm creating a tycho/xcore/xtext project, and encounters an issue when
> mixing xcore and xtext.
>
> While building, I got this exception on my xcore powered project:
>
> [INFO] --- xtext-maven-plugin:2.8.4:generate (default) @
> net.osgiliath.modeler.metamodel.class ---
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.ecore:jar:2.10.0-v20130911-20131101.184326-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.ecore:jar:2.10.0-v20140117-20140308.162131-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.ecore:jar:2.10.0-v20140514-20140615.074948-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.common:jar:2.10.0-v20130911-20131101.184418-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.common:jar:2.10.0-v20140117-20140308.162206-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.common:jar:2.10.0-v20140514-20140615.074938-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.10.0.v20130911-20131101.184401-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.10.0-v20140117-20140308.162157-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.ecore.xmi:jar:2.10.0-v20140514-20140615.075014-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.codegen:jar:2.9.0-v20130930-20131101.184305-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.codegen:jar:2.10.0-v20140127-20140308.162113-2
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.codegen:jar:2.10.0-v20140519-20140615.074924-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.codegen.ecore:jar:2.10.0-v20130930-20131101.184147-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.codegen.ecore:jar:2.10.0-v20140127-20140308.162034-2
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [WARNING] The POM for
> org.eclipse.emf:org.eclipse.emf.codegen.ecore:jar:2.10.0-v20140519-20140615.074844-1
> is invalid, transitive dependencies (if any) will not be available,
> enable debug logging for more details
> [INFO] Encoding: UTF-8
> [INFO] Compiler source level: 1.8
> [INFO] Compiler target level: 1.8
> [INFO] Using common types.
> [INFO] Collecting source models.
> [INFO] Installing type provider.
> [WARNING] Only terminal rules are supported by lexer based converters
> but got SignedInt which is an instance of ParserRule
> java.lang.IllegalArgumentException: Only terminal rules are supported
> by lexer based converters but got SignedInt which is an instance of
> ParserRule
> at
> org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter.setRule(AbstractLexerBasedConverter.java:128)
> at
> org.eclipse.xtext.conversion.impl.AbstractDeclarativeValueConverterService.internalRegisterForClass(AbstractDeclarativeValueConverterService.java:128)
> at
> org.eclipse.xtext.conversion.impl.AbstractDeclarativeValueConverterService.getConverters(AbstractDeclarativeValueConverterService.java:95)
> at
> org.eclipse.xtext.conversion.impl.AbstractDeclarativeValueConverterService.getConverter(AbstractDeclarativeValueConverterService.java:83)
> at
> org.eclipse.xtext.conversion.impl.AbstractDeclarativeValueConverterService.toValue(AbstractDeclarativeValueConverterService.java:74)
> at
> org.eclipse.xtext.parser.DefaultEcoreElementFactory.getTokenValue(DefaultEcoreElementFactory.java:90)
> at
> org.eclipse.xtext.parser.DefaultEcoreElementFactory.set(DefaultEcoreElementFactory.java:69)
> at
> org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser.set(AbstractInternalAntlrParser.java:319)
> at
> org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser.set(AbstractInternalAntlrParser.java:326)
> at
> org.eclipse.emf.ecore.xcore.parser.antlr.internal.InternalXcoreParser.ruleXStringToStringMapEntry(InternalXcoreParser.java:871)
> at
> org.eclipse.emf.ecore.xcore.parser.antlr.internal.InternalXcoreParser.ruleXAnnotation(InternalXcoreParser.java:669)
> at
> org.eclipse.emf.ecore.xcore.parser.antlr.internal.InternalXcoreParser.ruleXPackage(InternalXcoreParser.java:286)
> at
> org.eclipse.emf.ecore.xcore.parser.antlr.internal.InternalXcoreParser.entryRuleXPackage(InternalXcoreParser.java:199)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.eclipse.xtext.parser.antlr.AbstractInternalAntlrParser.parse(AbstractInternalAntlrParser.java:541)
> at
> org.eclipse.xtext.parser.antlr.AbstractAntlrParser.doParse(AbstractAntlrParser.java:102)
> at
> org.eclipse.xtext.parser.antlr.AbstractAntlrParser.parse(AbstractAntlrParser.java:84)
> at
> org.eclipse.xtext.parser.antlr.AbstractAntlrParser.doParse(AbstractAntlrParser.java:62)
> at
> org.eclipse.xtext.parser.AbstractParser.parse(AbstractParser.java:33)
> at
> org.eclipse.xtext.resource.XtextResource.doLoad(XtextResource.java:170)
> at
> org.eclipse.xtext.linking.lazy.LazyLinkingResource.doLoad(LazyLinkingResource.java:101)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297)
> at
> org.eclipse.xtext.resource.persistence.StorageAwareResource.load(StorageAwareResource.java:95)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
> at
> org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:265)
> at
> org.eclipse.xtext.builder.standalone.StandaloneBuilder.launch(StandaloneBuilder.java:253)
> at
> org.eclipse.xtext.maven.XtextGenerator.internalExecute(XtextGenerator.java:164)
> at
> org.eclipse.xtext.maven.XtextGenerator.execute(XtextGenerator.java:140)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> [INFO] Generating stubs into
> /Users/charliemordant/git/net.osgiliath.modeler/net.osgiliath.modeler.metamodels/net.osgiliath.modeler.metamodel.class/target/xtext-temp/stubs
> [INFO] Compiling stubs located in
> /Users/charliemordant/git/net.osgiliath.modeler/net.osgiliath.modeler.metamodels/net.osgiliath.modeler.metamodel.class/target/xtext-temp/stubs
> [INFO] Installing type provider for stubs.
> [INFO] Validate and generate.
> [INFO] Starting validation for input: 'class.xcore'
> [INFO] Starting generator for input: 'class.xcore'
>
>
> Here's my xtext-maven-plugin configuration (if it is related):
>
> <plugin>
> <groupId>org.eclipse.xtext</groupId>
> <artifactId>xtext-maven-plugin</artifactId>
> <version>${xtext-version}</version>
> <executions>
> <execution>
> <phase>generate-sources</phase>
> <goals>
> <goal>generate</goal>
> </goals>
> </execution>
> </executions>
> <configuration>
> <failOnValidationError>false</failOnValidationError>
> <languages>
> <language>
> <setup>org.eclipse.xtext.ecore.EcoreSupport</setup>
> <outputConfigurations>
> <outputConfiguration>
> <outputDirectory>${project.build.directory}/model-gen</outputDirectory>
> </outputConfiguration>
> </outputConfigurations>
> </language>
> <language>
> <setup>org.eclipse.emf.codegen.ecore.xtext.GenModelSupport</setup>
> <outputConfigurations>
> <outputConfiguration>
> <outputDirectory>${project.build.directory}/model-gen</outputDirectory>
> </outputConfiguration>
> </outputConfigurations>
> </language>
> <language>
> <setup>org.eclipse.emf.ecore.xcore.XcoreStandaloneSetup</setup>
> <outputConfigurations>
> <outputConfiguration>
> <outputDirectory>${project.build.directory}/model-gen</outputDirectory>
> </outputConfiguration>
> </outputConfigurations>
> </language>
> </languages>
> <sourceRoots>
> <root>${project.basedir}/model</root>
> </sourceRoots>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.osgi</groupId>
> <artifactId>org.osgi.core</artifactId>
> <version>${org.osgi_org.osgi.core.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.core</groupId>
> <artifactId>org.eclipse.core.resources</artifactId>
> <version>${org.eclipse.core_org.eclipse.core.resources.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.text</groupId>
> <artifactId>org.eclipse.text</artifactId>
> <version>${org.eclipse.text_org.eclipse.text.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.emf</groupId>
> <artifactId>org.eclipse.emf.ecore</artifactId>
> <version>${org.eclipse.emf_org.eclipse.emf.ecore.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.emf</groupId>
> <artifactId>org.eclipse.emf.codegen.ecore</artifactId>
> <version>${org.eclipse.emf_org.eclipse.emf.codegen.ecore.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.emf</groupId>
> <artifactId>org.eclipse.emf.codegen.ecore.xtext</artifactId>
> <version>${org.eclipse.emf_org.eclipse.emf.codegen.ecore.xtext.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.emf</groupId>
> <artifactId>org.eclipse.emf.ecore.xcore.lib</artifactId>
> <version>${org.eclipse.emf_org.eclipse.emf.ecore.xcore.lib.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.emf</groupId>
> <artifactId>org.eclipse.emf.ecore.xcore</artifactId>
> <version>${org.eclipse.emf_org.eclipse.emf.ecore.xcore.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.xtext</groupId>
> <artifactId>org.eclipse.xtext.common.types</artifactId>
> <version>${org.eclipse.xtext_org.eclipse.xtext.common.types.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.xtext</groupId>
> <artifactId>org.eclipse.xtext.xbase</artifactId>
> <version>${org.eclipse.xtext_org.eclipse.xtext.xbase.version}</version>
> </dependency>
> <dependency>
> <groupId>org.eclipse.xtext</groupId>
> <artifactId>org.eclipse.xtext.xbase.lib</artifactId>
> <version>${org.eclipse.xtext_org.eclipse.xtext.xbase.version}</version>
> </dependency>
> </dependencies>
> </plugin>
> <properties>
> <tycho-version>0.23.1</tycho-version>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <org.eclipse.emf_org.eclipse.emf.codegen.ecore.xtext.version>1.1.1</org.eclipse.emf_org.eclipse.emf.codegen.ecore.xtext.version>
> <org.eclipse.emf_org.eclipse.emf.ecore.xcore.lib.version>1.1.0</org.eclipse.emf_org.eclipse.emf.ecore.xcore.lib.version>
> <org.eclipse.emf_org.eclipse.emf.ecore.xcore.version>1.2.2</org.eclipse.emf_org.eclipse.emf.ecore.xcore.version>
> <xtext-version>2.8.4</xtext-version>
> <org.osgi_org.osgi.core.version>6.0.0</org.osgi_org.osgi.core.version>
> <org.eclipse.core_org.eclipse.core.resources.version>3.7.100</org.eclipse.core_org.eclipse.core.resources.version>
> <org.eclipse.text_org.eclipse.text.version>3.5.101</org.eclipse.text_org.eclipse.text.version>
> <org.eclipse.emf_org.eclipse.emf.ecore.version>2.10.1</org.eclipse.emf_org.eclipse.emf.ecore.version>
> <org.eclipse.emf_org.eclipse.emf.codegen.ecore.version>2.10.1</org.eclipse.emf_org.eclipse.emf.codegen.ecore.version>
> <org.eclipse.equinox_org.eclipse.equinox.common.version>3.6.0</org.eclipse.equinox_org.eclipse.equinox.common.version>
> <org.eclipse.xtext_org.eclipse.xtext.common.types.version>2.8.4</org.eclipse.xtext_org.eclipse.xtext.common.types.version>
> <org.eclipse.xtext_org.eclipse.xtext.xbase.version>2.8.4</org.eclipse.xtext_org.eclipse.xtext.xbase.version>
> <parentPropertiesFile>root.properties</parentPropertiesFile>
> </properties>
>
>
> And finally the grammar (fairly simple):
>
>
> @GenModel(childCreationExtenders="true", copyrightText="Osgiliath All
> rights reserved", extensibleProviderFactory="true",
> modelDirectory="/net.osgiliath.modeler.metamodel.class/target/model-gen",
> editDirectory="/net.osgiliath.modeler.metamodel.class.edit/src/main/java-gen",
> editorDirectory="/net.osgiliath.modeler.metamodel.class.editor/src/main/java-gen",
> creationSubmenus="true")
> @Ecore(nsURI="http://www.osgiliath.net/metamodels/classes/0.0.1")
> package net.osgiliath.modeler.metamodel.classes
>
>
> class ONamedElement {
> String name
> }
> class OElements extends ONamedElement {
> contains OPackage[] packages
> contains OParametrizedClassifier[] parametrizedClassifiers
> }
> class OPackage extends ONamedElement {
> contains OPackage[] subPackages opposite superPackage
> container OPackage superPackage opposite subPackages
> contains OClassifier[] classifiers opposite ownerPackage
> derived String FQN get
> {
> var FQN = name
> var OPackage current = superPackage
> while (null != current) {
> FQN=current.name + "." + FQN
> current = current.superPackage
> } return FQN
> }
> }
>
> class OType extends ONamedElement{
> }
>
> enum VISIBILITY {
> public as '+' = 0
> protected as '#' = 1
> private as '-' = 2
> }
> class OVisibilityAble extends OType {
> VISIBILITY visibility
> }
> class OStaticable extends OType {
> boolean isStatic = "false"
> }
> class OFinalizable extends OType {
> Boolean isFinal = "false"
> }
> class OAbstractable {
> Boolean isAbstract = "false"
> }
> class OClassifier extends OType {
> container OPackage ownerPackage opposite classifiers
> derived String fQN get
> {
> return ownerPackage.FQN + "." + name
> }
> op String toString() {
> return FQN
> }
>
> }
> class OParameter extends ONamedElement, OFinalizable {
> refers OType oType
> }
> class OMethod extends ONamedElement, OVisibilityAble, OStaticable,
> OFinalizable, OAbstractable {
> refers OType returnType
> contains OParameter[] parameters
> }
> class OMethodable extends OClassifier {
> contains OMethod[] methods
> }
> class OInterface extends OVisibilityAble,OMethodable {
> refers OInterface[] extensions
> }
> class OAttribute extends OParameter, OVisibilityAble, OStaticable {
>
> }
> class OClass extends OVisibilityAble, OMethodable, OFinalizable,
> OAbstractable {
> refers OInterface[] implements
> refers OClass extensions contains OAttribute[] attributes
> }
> class OParametrizedClassifier extends OClassifier {
> refers OClassifier classifier
> refers OClassifier[] parametrizedClassifiers
> }
>
>
> I also have a grammar using this xcore model, that throws the same
> exception when I reference this xcore. But when I export the genmodel
> then reference it for the grammar, it passes without any issue.
>
> Any idea on this? I looked at eclipse bugs or any other source, but
> didn't find any similar issue.
>
> Best regards,
>
> Charlie
Re: [XCore] Xtext-maven-plugin with xcore lead to exception [message #1705598 is a reply to message #1705487] Mon, 17 August 2015 17:19 Go to previous messageGo to next message
Charlie Mordant is currently offline Charlie MordantFriend
Messages: 88
Registered: July 2010
Member

Hi Ed,

Thank you for the answer, I will try. Unfortunately, these deps must be referenced as Maven dependencies (not as p2 one) because they're necessary for the m-xtext-pg.
Can you ping this thread while available?

Best regards,
Charlie

[Updated on: Mon, 17 August 2015 17:20]

Report message to a moderator

Re: [XCore] Xtext-maven-plugin with xcore lead to exception [message #1705648 is a reply to message #1705598] Tue, 18 August 2015 07:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 30372
Registered: July 2009
Senior Member
Charlie,

They won't end up there because I do something. In fact I have no idea
how they'd ever end up there. Maybe Dennis knows...


On 17/08/2015 7:19 PM, Charlie Mordant wrote:
> Hi Ed,
>
> Thank you for the answer, I will try. Unfortunately, these deps must
> be referenced as Maven dependencies (not on a p2 one) because they're
> necessary for the m-xtext-pg.
> Can you ping this thread while available?
>
> Best regards,
> Charlie
Re: [XCore] Xtext-maven-plugin with xcore lead to exception [message #1705840 is a reply to message #1705648] Wed, 19 August 2015 12:22 Go to previous message
Dennis Huebner is currently offline Dennis HuebnerFriend
Messages: 257
Registered: July 2009
Senior Member

Hello Charlie,
I've just released xcore 1.3.1 maven artifacts, where the issue you had is fixed.
It will be available in maven central soon.

Regards,
Dennis.



+Dennis Huebner

Get professional support from the Xtext committers at www.typefox.io
Previous Topic:What should I use for UI and user actions?
Next Topic:Resolving generic types
Goto Forum:
  


Current Time: Sat Aug 24 12:30:44 GMT 2019

Powered by FUDForum. Page generated in 0.03912 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top