Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » IllegalStateException during maven build of Xtext project
IllegalStateException during maven build of Xtext project [message #1814479] Thu, 12 September 2019 06:56 Go to next message
Jan Jansen is currently offline Jan JansenFriend
Messages: 17
Registered: October 2018
Junior Member
Hi all,

During the maven build of an Xtext project I am getting the following error:
[WARNING] Error initializing: org.eclipse.tycho.p2.resolver.P2DependencyResolver@11d045b4
java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted(DefaultEquinoxEmbedder.java:311)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:285)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:280)
	at org.eclipse.tycho.p2.resolver.P2DependencyResolver.initialize(P2DependencyResolver.java:428)
	at org.eclipse.sisu.plexus.PlexusLifecycleManager.initialize(PlexusLifecycleManager.java:303)
	at org.eclipse.sisu.plexus.PlexusLifecycleManager.activate(PlexusLifecycleManager.java:207)
	at org.eclipse.sisu.bean.BeanScheduler$Pending.activate(BeanScheduler.java:156)
	at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:185)
	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
	at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
	at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
	at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
	at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
	at org.eclipse.tycho.core.resolver.DefaultDependencyResolverFactory.lookupDependencyResolver(DefaultDependencyResolverFactory.java:74)
	at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject(DefaultTychoResolver.java:95)
	at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:90)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
	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:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.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:498)
	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)
Caused by: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:301)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:280)
	at org.eclipse.tycho.osgi.configuration.OSGiProxyConfigurator.afterFrameworkStarted(OSGiProxyConfigurator.java:41)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.doStart(DefaultEquinoxEmbedder.java:185)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.start(DefaultEquinoxEmbedder.java:67)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted(DefaultEquinoxEmbedder.java:309)
	... 36 more
[ERROR] Internal error: java.lang.RuntimeException: Could not instantiate required component: com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR] 
[ERROR] 1) Error notifying ProvisionListener org.eclipse.sisu.bean.BeanScheduler$Activator of org.eclipse.tycho.core.DependencyResolver annotated with @com.google.inject.name.Named(value=p2).
[ERROR] Reason: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
[ERROR] while locating org.eclipse.tycho.core.DependencyResolver annotated with @com.google.inject.name.Named(value=p2)
[ERROR] 
[ERROR] 1 error
[ERROR] role: org.eclipse.tycho.core.DependencyResolver
[ERROR] roleHint: p2
[ERROR] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: Could not instantiate required component
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:121)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
	at org.apache.maven.cli.MavenCli.main(MavenCli.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:498)
	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)
Caused by: java.lang.RuntimeException: Could not instantiate required component
	at org.eclipse.tycho.core.resolver.DefaultDependencyResolverFactory.lookupDependencyResolver(DefaultDependencyResolverFactory.java:76)
	at org.eclipse.tycho.core.resolver.DefaultTychoResolver.setupProject(DefaultTychoResolver.java:95)
	at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:90)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:266)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
	... 11 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error notifying ProvisionListener org.eclipse.sisu.bean.BeanScheduler$Activator of org.eclipse.tycho.core.DependencyResolver annotated with @com.google.inject.name.Named(value=p2).
 Reason: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
  while locating org.eclipse.tycho.core.DependencyResolver annotated with @com.google.inject.name.Named(value=p2)

1 error
      role: org.eclipse.tycho.core.DependencyResolver
  roleHint: p2
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:267)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:255)
	at org.eclipse.tycho.core.resolver.DefaultDependencyResolverFactory.lookupDependencyResolver(DefaultDependencyResolverFactory.java:74)
	... 16 more
Caused by: com.google.inject.ProvisionException: Unable to provision, see the following errors:

1) Error notifying ProvisionListener org.eclipse.sisu.bean.BeanScheduler$Activator of org.eclipse.tycho.core.DependencyResolver annotated with @com.google.inject.name.Named(value=p2).
 Reason: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
  while locating org.eclipse.tycho.core.DependencyResolver annotated with @com.google.inject.name.Named(value=p2)

1 error
	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1025)
	at org.eclipse.sisu.inject.Guice4$1.get(Guice4.java:162)
	at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
	at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
	at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
	... 18 more
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted(DefaultEquinoxEmbedder.java:311)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:285)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:280)
	at org.eclipse.tycho.p2.resolver.P2DependencyResolver.initialize(P2DependencyResolver.java:428)
	at org.eclipse.sisu.plexus.PlexusLifecycleManager.initialize(PlexusLifecycleManager.java:303)
	at org.eclipse.sisu.plexus.PlexusLifecycleManager.activate(PlexusLifecycleManager.java:207)
	at org.eclipse.sisu.bean.BeanScheduler$Pending.activate(BeanScheduler.java:156)
	at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:185)
	at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
	at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
	at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
	at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
	at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
	at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
	at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
	... 22 more
Caused by: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:301)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService(DefaultEquinoxEmbedder.java:280)
	at org.eclipse.tycho.osgi.configuration.OSGiProxyConfigurator.afterFrameworkStarted(OSGiProxyConfigurator.java:41)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.doStart(DefaultEquinoxEmbedder.java:185)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.start(DefaultEquinoxEmbedder.java:67)
	at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted(DefaultEquinoxEmbedder.java:309)
	... 36 more


I already found the following solution on stackoverflow: https://stackoverflow.com/questions/48327214/xtext-maven-build-fails-under-jenkins-docker but the proposed solution there unfortunately did not work for me.

Any insight to the problem would be much appreciated!
Re: IllegalStateException during maven build of Xtext project [message #1814480 is a reply to message #1814479] Thu, 12 September 2019 06:57 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14062
Registered: July 2009
Senior Member
maybe you use wrong maven version with wrong java version.
which ones do you use?


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: IllegalStateException during maven build of Xtext project [message #1814482 is a reply to message #1814480] Thu, 12 September 2019 07:06 Go to previous messageGo to next message
Jan Jansen is currently offline Jan JansenFriend
Messages: 17
Registered: October 2018
Junior Member
Java version is 1.8.0_212-b10 with maven version 3.3.9. I've also tried with tycho version 1.2/1.3/1.4, all show the same issue.
Re: IllegalStateException during maven build of Xtext project [message #1814483 is a reply to message #1814482] Thu, 12 September 2019 07:17 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14062
Registered: July 2009
Senior Member
did you try to set a -Dmaven.repo.local=somepath explicitely?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: IllegalStateException during maven build of Xtext project [message #1814484 is a reply to message #1814483] Thu, 12 September 2019 07:25 Go to previous messageGo to next message
Jan Jansen is currently offline Jan JansenFriend
Messages: 17
Registered: October 2018
Junior Member
I have done that yes, still get the same error.
Re: IllegalStateException during maven build of Xtext project [message #1814487 is a reply to message #1814483] Thu, 12 September 2019 07:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14062
Registered: July 2009
Senior Member
running maven with -X gives the same error / trace or is there more information?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: IllegalStateException during maven build of Xtext project [message #1814488 is a reply to message #1814487] Thu, 12 September 2019 07:35 Go to previous messageGo to next message
Jan Jansen is currently offline Jan JansenFriend
Messages: 17
Registered: October 2018
Junior Member
This is already with the -X flag.
Re: IllegalStateException during maven build of Xtext project [message #1814489 is a reply to message #1814484] Thu, 12 September 2019 07:43 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14062
Registered: July 2009
Senior Member
hmmm, wonder if you can provide a reproducing image and steps.
maybe also -XX:MaxJavaStackTraceDepth=.....
could give more stacktrace


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: IllegalStateException during maven build of Xtext project [message #1814492 is a reply to message #1814489] Thu, 12 September 2019 08:08 Go to previous messageGo to next message
Jan Jansen is currently offline Jan JansenFriend
Messages: 17
Registered: October 2018
Junior Member
I'm not sure if I could, since the setup is quite specific to our project and it would take me some time to create a 'generic' version so to speak.

However, your mention of the maven version led to me trying with the newest one (3.6.x) instead of 3.3.9 and I get a different error now that might be clearer, if you could have a look? Here it is:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-readable POM /opt/jenkins/workspace/project-name/plugins/project.mm/.polyglot.build.properties: input contained no data @


This same error shows for every project which uses tycho I think.
Re: IllegalStateException during maven build of Xtext project [message #1814493 is a reply to message #1814492] Thu, 12 September 2019 08:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14062
Registered: July 2009
Senior Member
dont you have a build.properties checked in?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: IllegalStateException during maven build of Xtext project [message #1814494 is a reply to message #1814493] Thu, 12 September 2019 08:16 Go to previous messageGo to next message
Jan Jansen is currently offline Jan JansenFriend
Messages: 17
Registered: October 2018
Junior Member
I do, and this error only occurs when building on Jenkins using a docker container.
Re: IllegalStateException during maven build of Xtext project [message #1814497 is a reply to message #1814494] Thu, 12 September 2019 08:43 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14062
Registered: July 2009
Senior Member
i wonder if you can provide something to reproduce.
(maybe i can find the time to try out later this week)

in all travis or k8s jenkins environments i dont have seen this issue


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: IllegalStateException during maven build of Xtext project [message #1834272 is a reply to message #1814497] Fri, 06 November 2020 10:39 Go to previous messageGo to next message
Abhishek Dubey is currently offline Abhishek DubeyFriend
Messages: 1
Registered: November 2020
Junior Member
I am also facing the same error while building with the OpenJDK.
With oracle jdk 1.8, the build was successful.
Re: IllegalStateException during maven build of Xtext project [message #1834317 is a reply to message #1834272] Sat, 07 November 2020 06:17 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14062
Registered: July 2009
Senior Member
Again with nothing to reproduce I cannot look into it

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:mwe2 workflow: seperation of ide and non-ide fragments
Next Topic:Validator with property file involved
Goto Forum:
  


Current Time: Mon Sep 20 23:12:34 GMT 2021

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

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

Back to the top