Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » IDEA Plugin Error: ClasscastException(IdeaSetup file generating class cast exception)
IDEA Plugin Error: ClasscastException [message #1767785] Tue, 11 July 2017 06:32 Go to next message
Amit Yadav is currently offline Amit YadavFriend
Messages: 22
Registered: June 2017
Junior Member
Hello All,

I am getting the following error while trying to use the idea plugin generated by xtext. I have no customization for this plugin.
com.org.example.dsl.idea.ExampleDSLBasicIdeaSetup cannot be cast to org.eclipse.xtext.ISetup
java.lang.ClassCastException: com.org.example.dsl.idea.ExampleDSLBasicIdeaSetup cannot be cast to org.eclipse.xtext.ISetup
  at org.eclipse.xtext.idea.lang.AbstractXtextLanguage.getInjector(AbstractXtextLanguage.java:40)
  at org.eclipse.xtext.idea.lang.AbstractXtextLanguage.injectMembers(AbstractXtextLanguage.java:55)
  at org.eclipse.xtext.idea.completion.AbstractCompletionContributor.<init>(AbstractCompletionContributor.java:174)
  at org.eclipse.xtext.xbase.idea.completion.XtypeCompletionContributor.<init>(XtypeCompletionContributor.java:16)
  at org.eclipse.xtext.xbase.idea.completion.XbaseCompletionContributor.<init>(XbaseCompletionContributor.java:112)
  at com.org.example.dsl.idea.completion.AbstractExampleDSLBasicCompletionContributor.<init>(AbstractExampleDSLBasicCompletionContributor.java:11)
  at com.org.example.dsl.idea.completion.ExampleDSLBasicCompletionContributor.<init>(ExampleDSLBasicCompletionContributor.java:15)
  at com.org.example.dsl.idea.completion.ExampleDSLBasicCompletionContributor.<init>(ExampleDSLBasicCompletionContributor.java:11)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
  at org.picocontainer.defaults.InstantiatingComponentAdapter.newInstance(InstantiatingComponentAdapter.java:193)
  at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.doGetComponentInstance(CachingConstructorInjectionComponentAdapter.java:103)
  at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.instantiateGuarded(CachingConstructorInjectionComponentAdapter.java:80)
  at com.intellij.util.pico.CachingConstructorInjectionComponentAdapter.getComponentInstance(CachingConstructorInjectionComponentAdapter.java:63)
  at com.intellij.openapi.extensions.AbstractExtensionPointBean.instantiate(AbstractExtensionPointBean.java:75)
  at com.intellij.openapi.extensions.CustomLoadingExtensionPointBean.instantiateExtension(CustomLoadingExtensionPointBean.java:47)
  at com.intellij.lang.LanguageExtensionPoint.access$000(LanguageExtensionPoint.java:28)
  at com.intellij.lang.LanguageExtensionPoint$1.compute(LanguageExtensionPoint.java:42)
  at com.intellij.openapi.util.NotNullLazyValue.getValue(NotNullLazyValue.java:39)
  at com.intellij.lang.LanguageExtensionPoint.getInstance(LanguageExtensionPoint.java:53)
  at com.intellij.codeInsight.completion.CompletionPreloader.preload(CompletionPreloader.java:32)
  at com.intellij.openapi.application.Preloader.a(Preloader.java:74)
  at com.intellij.openapi.application.Preloader$$Lambda$126/1340395291.run(Unknown Source)
  at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:176)
  at com.intellij.openapi.progress.impl.CoreProgressManager$$Lambda$71/2125595444.run(Unknown Source)
  at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:556)
  at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501)
  at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66)
  at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)
  at com.intellij.openapi.application.Preloader.a(Preloader.java:72)
  at com.intellij.openapi.application.Preloader$$Lambda$125/2090922997.run(Unknown Source)
  at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:212)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  at java.lang.Thread.run(Thread.java:745)


ExampleDSL IDEA plugin requires xtext idea core plugin which I installed.

I understand that the class cast exception might be happening because ISetup class probably is loaded by a different class loader (perhaps the xtext idea core plugin contains this class already and that class was loaded by a different class loader). Not sure how to work around this. Any suggestions?
Re: IDEA Plugin Error: ClasscastException [message #1770831 is a reply to message #1767785] Thu, 17 August 2017 13:39 Go to previous messageGo to next message
Amit Yadav is currently offline Amit YadavFriend
Messages: 22
Registered: June 2017
Junior Member
Bump
Re: IDEA Plugin Error: ClasscastException [message #1770833 is a reply to message #1770831] Thu, 17 August 2017 13:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11595
Registered: July 2009
Senior Member
xtext idea is basically dead and nobody steps up to revive it so the chance of getting an answer is near to zero

Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Re: IDEA Plugin Error: ClasscastException [message #1770920 is a reply to message #1770833] Fri, 18 August 2017 18:56 Go to previous messageGo to next message
Amit Yadav is currently offline Amit YadavFriend
Messages: 22
Registered: June 2017
Junior Member
Christian,

Do you mean its no longer supported ?

is there any alternative ?

Thanks,

Amit
Re: IDEA Plugin Error: ClasscastException [message #1770921 is a reply to message #1770920] Fri, 18 August 2017 19:04 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 11595
Registered: July 2009
Senior Member
yes there is no longer active delopment of the xtext idea part until / unless somebody steps up
no, besides voting for idea getting language server protocol support


Need professional support for Xtext, Xpand, EMF?
Go to: http://xtext.itemis.com
Twitter : @chrdietrich
Blog : christiandietrich.wordpress.com
Previous Topic:Error compiling DSL model with a released implementation
Next Topic:Text in Xtext
Goto Forum:
  


Current Time: Fri Jan 19 11:55:54 GMT 2018

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

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