Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapters generation failing #103

Open
eduardoafs opened this issue Jan 25, 2018 · 9 comments
Open

Adapters generation failing #103

eduardoafs opened this issue Jan 25, 2018 · 9 comments

Comments

@eduardoafs
Copy link

Hello again,

Hope I don't become an assiduous user of this issues tracker :p

So, this time I have an adapter build failing. I thought it was something with the project (I was working on another project and that is working fine), however I started a new project from scratch and the issue persists.

There is a project, org.archware.sosadl, it was not made for me. It has a metamodel generated by Xtext, I can annex it here if it helps. This metamodel is named SosADL, it defines the language sosADL (this exact name, I think the issue is somehow related to the name), namespace prefix sosADL and ns URI http://www-archware.irisa.fr/sosadl/SosADL.

I created a GEMOC XSDM project and from it an empty K3 DSA Project. After pasting a reduced part of the aspects I tried to generate the interface, adapters and language runtime, just to have something to work on. Then the generation of adapters failed, here's the stacktrace:

eclipse.buildId=unknown
java.version=1.8.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=pt_BR
Command-line arguments:  -os win32 -ws win32 -arch x86_64

org.apache.log4j
Error
Thu Jan 25 13:42:14 CET 2018
fr.inria.diverse.melange.ui.builder.MelangeBuilder  - Error while generating

java.lang.reflect.InvocationTargetException
	at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:398)
	at org.eclipse.jface.dialogs.ProgressMonitorDialog.run(ProgressMonitorDialog.java:483)
	at fr.inria.diverse.melange.ui.menu.GenerateAdapters.execute(GenerateAdapters.java:51)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:291)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:92)
	at sun.reflect.GeneratedMethodAccessor166.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:55)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:305)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:239)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:132)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:152)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:494)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:210)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:431)
	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:446)
	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:472)
	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem$$Lambda$216/416692630.handleEvent(Unknown Source)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4428)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4238)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3817)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
	at org.eclipse.ui.internal.Workbench$$Lambda$65/1487131937.run(Unknown Source)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	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.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
Caused by: org.eclipse.xtext.util.RuntimeIOException: org.eclipse.core.internal.resources.ResourceException: A resource exists with a different case: '/org.archware.sosadl.gemoc/src-gen/org/archware/sosadl/gemoc/sosadl/adapters/sosadlmt/sosadl'.
	at org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2.generateFile(EclipseResourceFileSystemAccess2.java:285)
	at org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2.generateFile(EclipseResourceFileSystemAccess2.java:219)
	at org.eclipse.xtext.generator.AbstractFileSystemAccess.generateFile(AbstractFileSystemAccess.java:99)
	at org.eclipse.xtext.xbase.compiler.JvmModelGenerator._internalDoGenerate(JvmModelGenerator.java:213)
	at org.eclipse.xtext.xbase.compiler.JvmModelGenerator.internalDoGenerate(JvmModelGenerator.java:1615)
	at org.eclipse.xtext.xbase.compiler.JvmModelGenerator.doGenerate(JvmModelGenerator.java:196)
	at fr.inria.diverse.melange.ui.builder.MelangeBuilder.generateAdapters(MelangeBuilder.java:336)
	at fr.inria.diverse.melange.ui.menu.GenerateAdapters$1.run(GenerateAdapters.java:62)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: org.eclipse.core.internal.resources.ResourceException: A resource exists with a different case: '/org.archware.sosadl.gemoc/src-gen/org/archware/sosadl/gemoc/sosadl/adapters/sosadlmt/sosadl'.
	at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:323)
	at org.eclipse.core.internal.resources.Resource.checkDoesNotExist(Resource.java:301)
	at org.eclipse.core.internal.resources.Folder.assertCreateRequirements(Folder.java:30)
	at org.eclipse.core.internal.resources.Folder.create(Folder.java:93)
	at org.eclipse.core.internal.resources.Folder.create(Folder.java:121)
	at org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2.ensureExists(EclipseResourceFileSystemAccess2.java:336)
	at org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2.ensureParentExists(EclipseResourceFileSystemAccess2.java:327)
	at org.eclipse.xtext.builder.EclipseResourceFileSystemAccess2.generateFile(EclipseResourceFileSystemAccess2.java:274)
	... 8 more

Originally I use a HashMap in the K3 code, it triggered some errors in the generation process then I removed them, for testing purposes (it also simplifies the already-simple version).

This message
Caused by: org.eclipse.core.internal.resources.ResourceException: A resource exists with a different case: '/org.archware.sosadl.gemoc/src-gen/org/archware/sosadl/gemoc/sosadl/adapters/sosadlmt/sosadl'.
Makes me believe it is something with the naming, I had a problem with names before. However, this time I can't change it. Also, I tried to delete everything and start over, same.

When I remove the aspects it generates empty adapters, but I think this behavior is expected.

I installed: fr.inria.diverse.melange.sdk.feature.group
Version: 0.2.1.201801111131

@tdegueul
Copy link

Hi Eduardo, and thank you for the bug report, this is helpful!

Unfortunately, I'm really overloaded right now so I cannot allocate any time to it. Maybe @fcoulon can help in the meantime? I'll get back to it by the end of next week.

@fcoulon
Copy link
Contributor

fcoulon commented Jan 26, 2018

Can you attach a .zip of your workspace?

@eduardoafs
Copy link
Author

I will create a private repo and add you @fcoulon. It will take some time, however.

@eduardoafs
Copy link
Author

eduardoafs commented Feb 7, 2018

I managed to solve that issue through re-starting the workspace and building everything from stratch. Probably something went wrong in the Eclipse file locking system.

However, the adapters are still not being generated. In fact, Melange is creating a lot of "empty class files", with no methods or attributes.

It is worth saying that this "failure" I just described is completely silent. No error is shown, in this case.

@dvojtise
Copy link
Contributor

in your trace: A resource exists with a different case: '/org.archware.sosadl.gemoc/src-gen/org/archware/sosadl/gemoc/sosadl/adapters/sosadlmt/sosadl'. so probably something related to an old project on the disk that is still here ?(even if not present in the workspace)

@eduardoafs
Copy link
Author

Yes, I could solve that. But stills generating nothing, with no errors this time.

@ahmadspm
Copy link

Hello eduardoafs ! Thanks for your post, please could you help me finding the SosADL link for downloading its meta data for language specification. I searched on the Archware group website but it is not there. Also they mentioned about a tool called SosADL studio which is not visible / available for download.

@eduardoafs
Copy link
Author

eduardoafs commented Jun 29, 2018

Ahmad, I prefer to not respond here, since this space is for melange-related discussions. Please contact me by email.

@ahmadspm
Copy link

ahmadspm commented Jun 29, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants