gemoc / gemoc-studio-old

http://gemoc.github.io/gemoc-studio/
Eclipse Public License 1.0
12 stars 4 forks source link

error when running coffee machine example #56

Open chismxna opened 6 years ago

chismxna commented 6 years ago

Hi there,

I'm currently trying to run your coffee machine example coordinating TFSM and SigPML languages on GEMOC 2.3.0. I have run TFSM and SigPML with their own examples loaded from wizard, respectively, and both or them work well. However, after I added the org.gemoc.sample.bcool.tfsmandsigpml, I couldn't run the coffee machine model in the modeling workbench. It looks like a timemodel called SelectCoffeeSystem.launchCoffeeCoin.launch.timemodel is missing. I didn't find this timemodel in the gemoc-gen folder under this project. The full error message is as following: org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.core.internal.resources.ResourceException: Resource '/org.gemoc.sample.bcool.coffeemachinewithsigpml/gemoc-gen/SelectCoffeeSystem.launchCoffeeCoin.launch.timemodel' does not exist. at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406) at fr.inria.aoste.timesquare.ccslkernel.model.utils.ResourceLoader.loadResource(ResourceLoader.java:43) at fr.inria.aoste.timesquare.ccslkernel.model.utils.ResourceLoader.loadResource(ResourceLoader.java:34) at fr.inria.aoste.timesquare.ccslkernel.model.utils.ResourceLoader.loadResource(ResourceLoader.java:38) at org.gemoc.execution.engine.coordinator.commons.HeterogeneousEngine.(HeterogeneousEngine.java:126) at org.gemoc.gemoc_heterogeneous_modeling_workbench.ui.launcher.Launcher.launch(Launcher.java:86) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/org.gemoc.sample.bcool.coffeemachinewithsigpml/gemoc-gen/SelectCoffeeSystem.launchCoffeeCoin.launch.timemodel' does not exist. at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:335) at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:209) at org.eclipse.core.internal.resources.File.getContents(File.java:275) at org.eclipse.core.internal.resources.File.getContents(File.java:268) at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper.createPlatformResourceInputStream(PlatformResourceURIHandlerImpl.java:207) at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:525) at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274) ... 11 more

I also noticed that in the language workbench, the TfsmAndSigpml.qvto in org.gemoc.sample.bcool.tfsmandsigpml contains errors:

Failed to resolve metamodel 'http://www.eclipse.org/ocl/3.1.0/CompleteOCLCST' Unrecognized variable: (MM21_seqOfoccursFSMEventContext) Unrecognized variable: (MM11_seqOfstartAgentAgentContext) Unrecognized variable: (name)

I tried to flip the EcoreAutoRegister Builder, but it didn't work

Do you have any idea what caused the problem in modeling workbench so that the timemodel wasn't generated? I appreciate your help, thanks!

zzhang03 commented 6 years ago

Do you have any forum to ask questions about using Gemoc? I actually met a lot of problems using it but I don't know what is the proper place to ask questions

MarcPantel commented 6 years ago

Dear all,

To my knowledge, the GEMOC project is currently being integrated in the Eclipse infrastructure and should soon benefit from the usual Eclipse foundation facilities.

Information will be posted when the move has been completed.

Best regards, Marc

Le 14 sept. 2017 à 08:18, zzhang03 notifications@github.com a écrit :

Do you have any forum to ask questions about using Gemoc? I actually met a lot of problems using it but I don't know what is the proper place to ask questions

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gemoc/gemoc-studio/issues/56#issuecomment-329384562, or mute the thread https://github.com/notifications/unsubscribe-auth/AB_m1OUv49YC0gpKycpngVEt50V7uUOxks5siMUagaJpZM4PV7VI.

Marc Pantel Maître de Conférences en Informatique Associate Professor in Computer Science IRIT - Institut de Recherche en Informatique de Toulouse - CNRS N7 - INPT - Université de Toulouse - France - Europe http://maps.google.com/maps?q=Rue+Charles+Camichel,+31000+Toulouse,+France&z=16 phone +(33) 534 32 2185 fax +(33) 534 32 2157 cell +(33) 676 221 687

combemale commented 6 years ago

Hi,

You can register and discuss in the following mailing list: https://dev.eclipse.org/mailman/listinfo/gemoc-dev https://dev.eclipse.org/mailman/listinfo/gemoc-dev

Al the best, Benoit

Le 14 sept. 2017 à 08:18, zzhang03 notifications@github.com a écrit :

Do you have any forum to ask questions about using Gemoc? I actually met a lot of problems using it but I don't know what is the proper place to ask questions

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gemoc/gemoc-studio/issues/56#issuecomment-329384562, or mute the thread https://github.com/notifications/unsubscribe-auth/ADtBUC8CMaaiB5lUnaiqTyrUBz3tVH2cks5siMUagaJpZM4PV7VI.

jdeantoni commented 6 years ago

Hi,

thanks for the reporting. I can reproduce the error and I will provide soon a patch to it.

jdeantoni commented 6 years ago

Hi, I provided some patches here: http://www.i3s.unice.fr/~deantoni/gemoc2.3.1/toCopyInPluginFor2.3.1.zip Just unzip the file, copy all the jars in your plugin folder and it should work.

Please tell us if OK. Note that these corrections will directly be reported on the eclipse version that will be provided by eclipse in few months but we will not make a real official 2.3.1 version :)

chismxna commented 6 years ago

Hello I added the patches to my plugin folder, SelectCoffeeSystem.launchCoffeeCoin.launch.timemodel is generated now :). However, I still can't run the example. After I click on debug it would automatically stop the engine

Model initialization done. (no modelInitialization method defined for the language) Engine initialization done. Initialization done, starting engine... Heterogeneous Coordination Engine initialization done. Exception received null, stopping engine. GEMOC Concurrent Engine platform:/resource/org.gemoc.sample.bcool.coffeemachinewithsigpml/models/tfsm_models/coffemachine.xtfsm stopped GEMOC Concurrent Engine platform:/resource/org.gemoc.sample.bcool.coffeemachinewithsigpml/models/sigpml_models/SelectCoffeeSystem.xsigpml stopped [trace-SelectCoffeeSystem.xsigpml] 1 states saved to platform:/resource/org.gemoc.sample.bcool.coffeemachinewithsigpml/gemoc-gen/execution/execution-20170918_135243/execution.trace Gemoc engine platform:/resource/ stopped

Error log would give me a NullPointerException: Plug-in: org.gemoc.executionframework.engine Message: Exception received null, stopping engine. Exception Stack Trace: java.lang.NullPointerException at fr.inria.aoste.timesquare.ccslkernel.runtime.simulation.AbstractStepExecutionEngine.inhibitUnusedClocks(AbstractStepExecutionEngine.java:152) at fr.inria.aoste.timesquare.ccslkernel.runtime.simulation.AbstractStepExecutionEngine.computePossibleClockStates(AbstractStepExecutionEngine.java:143) at fr.inria.aoste.timesquare.ccslkernel.solver.CCSLKernelSolver.constructBDD(CCSLKernelSolver.java:647) at org.gemoc.execution.engine.coordinator.commons.HeterogeneousEngine.computePossibleLogicalSteps(HeterogeneousEngine.java:497) at org.gemoc.execution.engine.coordinator.commons.HeterogeneousEngine.beforeStart(HeterogeneousEngine.java:623) at org.gemoc.executionframework.engine.core.AbstractExecutionEngine$1.run(AbstractExecutionEngine.java:296) at java.lang.Thread.run(Thread.java:745)

Is it like sth should be changed according to the patches? Looking forward to try 2.3.1 version :)

chismxna commented 6 years ago

There is one more thing. When I loaded coffee machine models from wizard last week, I immediately got a building workspace error. "Errors running builder 'Xtext Project Builder' on project". I found that SelectCoffeeSystem.aird and SelectCoffeeSystem.xsigpml can't be opened. I had to open the .xsigpml in the text editor, change xmlns:sigpml="http://xsigpml/sigpml/" into xmlns:sigpml="http://org.gemoc.sample.sigpml.xsigpml/sigpml/" manually, then the model diagram could show correctly.

chismxna commented 6 years ago

@jdeantoni Sorry I found that the SelectCoffeeSystem.launchCoffeeCoin.launch.timemodel wasn't generated correctly. I opened it and it's almost empty. It contains only 2 lines and nothing else: <?xml version="1.0" encoding="ASCII"?>

a TfsmAndSigpml.qvto was also generated along with the timemodels in gemoc-gen folder of org.gemoc.sample.bcool.coffeemachinewithsigpml in model workbench, but it also contains errors. For me it seems that this qvto file is incomplete: Type of transformation parameter should be model type (for inMM11 and inMM21) Unrecognized variable: (MM21_seqOfoccursFSMEventContext) Unrecognized variable: (MM11_seqOfstartAgentAgentContext) Unrecognized variable: (name) Cannot find operation (rootObjects()) for the type ()

jdeantoni commented 6 years ago

Hi,

can you please try these things:

At this point, run the modeling workbench, modify the NSUri of the xsigpml file as you already did and go in the debug configuration, choose the coordination configuration and launch the debug.

then, please tell me then what happened :)

thanks j

chismxna commented 6 years ago

Hi, I have enabled EcoreAutoRegister Builder for both projects. There are no errors in ecl files, only a few "The 'OperationCallExp::ArgumentTypeIsConformant' constraint is violated" warnings. Also there are no errors in bcool file. The TfsmAndSigpml.qvto in the language workbench also has no error. In the model workbench, after I launched debug configuration CoffeeMachinewithSigPML, at first it seems that everything works fine. But after "Model initialization done" "Engine initialization done." and "Heterogeneous Coordination Engine initialization done" are printed in Console, the following message printed in Console is "Exception received null, stopping engine.". In Error Log there is "Exception received null, stopping engine". The error messages are the same as mentioned in my above comment.

There are a lot of warnings saying that "Resource '/org.gemoc.sample.sigpml.moc.lib/MoCLib/SigPML.ccslLib' does not exist." and "Lookup of 'Coincides/Union/Exclusion/Alternates/AgentExecution...' failed". But I checked the language workbench, the file is there.

Other warnings include: org.eclipse.acceleo.engine.AcceleoEvaluationException: Invalid result for expression self.invoke('org.gemoc.bcool.transformation.bcool2qvto.helper.helperNsURI', 'getEclDocument(org.gemoc.bcool.model.bcool.ImportInterfaceStatement)', Sequence {arg0}) at line 1,088 in Module generate for query getEclDocument(ImportInterfaceStatement). Last recorded value of self was org.gemoc.bcool.model.bcool.impl.ImportInterfaceStatementImpl@1fb931d (name: tfsm) (importURI: platform:/resource/org.gemoc.sample.tfsm.concurrent.moc.dse/ecl/TFSM.ecl). Problem found while generating the file 'C:\GemocBcool\runtime-TestBcool\org.gemoc.sample.bcool.coffeemachinewithsigpml\gemoc-gen\TfsmAndSigpml.qvto'. at generate.generateElement(BCoolSpecification)(generate.mtl:0) at generate.generateElement(BCoolSpecification)(generate.mtl:30) at generate.generateElement(BCoolSpecification)(generate.mtl:28) at generate.generateElement(BCoolSpecification)(generate.mtl:26) at generate.generateElement(BCoolSpecification)(generate.mtl:25) at generate.generateElement(BCoolSpecification)(generate.mtl:17) at generate.generateElement(BCoolSpecification)(generate.mtl:15)

org.eclipse.acceleo.engine.AcceleoEvaluationException ... Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/org.gemoc.sample.sigpml.moc.dse/MoCApplication/SigPML.ecl' does not exist.

org.eclipse.acceleo.engine.AcceleoEvaluationException ... Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/org.gemoc.sample.tfsm.concurrent.moc.dse/ecl/TFSM.ecl' does not exist.

org.eclipse.acceleo.engine.AcceleoEvaluationException: Invalid result for expression self.invoke('org.gemoc.bcool.transformation.bcool2qvto.helper.helperNsURI', 'getEclDocument(org.gemoc.bcool.model.bcool.ImportInterfaceStatement)', Sequence {arg0}) at line 1,088 in Module generate for query getEclDocument(ImportInterfaceStatement). Last recorded value of self was org.gemoc.bcool.model.bcool.impl.ImportInterfaceStatementImpl@3c7e9b18 (name: sigpml) (importURI: platform:/resource/org.gemoc.sample.sigpml.moc.dse/MoCApplication/SigPML.ecl). Problem found while generating the file 'C:\GemocBcool\runtime-TestBcool\org.gemoc.sample.bcool.coffeemachinewithsigpml\gemoc-gen\TfsmAndSigpml.qvto'. at generate.generateElement(BCoolSpecification)(generate.mtl:0) at generate.generateElement(BCoolSpecification)(generate.mtl:239) at generate.generateElement(BCoolSpecification)(generate.mtl:236) at generate.generateElement(BCoolSpecification)(generate.mtl:234) at generate.generateElement(BCoolSpecification)(generate.mtl:233) at generate.generateElement(BCoolSpecification)(generate.mtl:17) at generate.generateElement(BCoolSpecification)(generate.mtl:15)

org.eclipse.ocl.pivot.internal.scoping.EnvironmentView - Lookup of 'tfsm' failed ... Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/org.gemoc.sample.tfsm.concurrent.moc.lib/ccsl/TFSMMoC.ccslLib' does not exist.

The files which are claimed 'does not exist' are all in language workbench. Thank you for your help!

jdeantoni commented 6 years ago

Hi,

the problem is that in the TfsmAndSigpml.qvto generated in the workspace there exists "platform:/resource" links to some resources which are actually in "platform:/plugin".

It should be fixed by the "org.gemoc.bcool.transformation.bcool2qvto2.3.0.201702201105.jar" plugin. Did you update it ? Do you have a single plugin named "org.gemoc.bcool.transformation.bcool2qvto*" ?

On which operating system are you testing ?

As a bad ugly test you can replace the imports of ECL and moccml files in the BCOoL files with "platform:/plugin" (of course the files will not typecheck) as well as the ECLimport from the ecl file.

chismxna commented 6 years ago

Hi,

My operating system is win7. I had updated the plugins, and used eclipsec.exe -clean to initialize GEMOC, but it seems that "org.gemoc.bcool.transformation.bcool2qvto2.3.0.201702201105.jar" didn't work as expected. I don't have another "org.gemoc.bcool.transformation.bcool2qvto*" plugin. The warnings didn't disappear. I could replace "platform:/resource" by "platform:/plugin" manually, and the warnings are gone. However, the "Exception received null, stopping engine." is still there.

jdeantoni commented 6 years ago

Hi,

ok, I have to test under win7 but since I do not have any win OS on my laptop it can take some times. I you want, you can directly import the sources of bcool2qvto into the language workbench. I made it available here: http://www.i3s.unice.fr/~deantoni/chismxna/

If you have time to test, tell us, otherwise I'll test the win7 version. all the bests j

On 09/25/2017 12:44 PM, chismxna wrote:

Hi,

My operating system is win7. I had updated the plugins, and used eclipsec.exe -clean to initialize GEMOC, but it seems that "org.gemoc.bcool.transformation.bcool2qvto2.3.0.201702201105.jar" didn't work as expected. I don't have another "org.gemoc.bcool.transformation.bcool2qvto*" plugin. The warnings didn't disappear. I could replace "platform:/resource" by "platform:/plugin" manually, and the warnings are gone. However, the "Exception received null, stopping engine." is still there.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/gemoc/gemoc-studio/issues/56#issuecomment-331844406, or mute the thread https://github.com/notifications/unsubscribe-auth/AF4JHjIZNE9SG-N34yXglrzhJ4F9T-Koks5sl4QJgaJpZM4PV7VI.

-- Julien Deantoni Associate Professor I3S Lab - UMR 7271 -KAIROS INRIA Sophia Antipolis Méditerranée 2004 rte des Lucioles (Lagrange L-041) BP93, F-06902 Sophia Antipolis Cedex, France tel: +334 92 38 77 66 http://www.i3s.unice.fr/~deantoni/

chismxna commented 6 years ago

Hi,

I will try to find what went wrong in bcool2qvto, it may take a while since I'm not familiar with the code. Could you give me some brief directions about how to test it? But if you haven't test GEMOC on win OS, it would be good that you also test the whole thing because there may be other bugs about the bcool engine. Thanks.

jdeantoni commented 6 years ago

Hi Chismxna,

we missunderstood. You do not need to enter in the code. It has been tested with success on win10, java 8_102. However not under win7. The point is that for a strange reason the new plugin bcool2qvto is not loaded by your environment. Importing the bcool2qvto project in your language workbench is a way to force it to load. Perhaps another solution could be to test from a whole new workspace...

I would not ask you to debug the whole bcool engine but you fall under a very bad luck category for now :)

chismxna commented 6 years ago

Oh I see. Yeah I agree that the situation is weird, I loaded the project into my workspace but still no help.

dvojtise commented 6 years ago

Hi may be you can check in the error log and in the plugin view why the plugin has not started on win7 ?

open the plugin registry view, right click enable the advanced options, then search the plugin you are interrested in (by scrolling because the search by text doesn't work well) a check will consist of : right click and diagnose + start, it may trigger error in the error log view or consoles console that may help understand the issue.

chismxna commented 6 years ago

Hi dvojtise,

It's very strange because Diagnosis shows that "No problem detected." I begin to doubt that whether the problem really lies in bcool2qvto plugin.

dvojtise commented 6 years ago

Diagnosis is not enough, you also need to force a start (that may trigger other errors) Otherwise, then try to start all gemoc related plugin in this view (org.gemoc. , timesquare, melange and k3, diverse.commons) (until they all get the green "play" arrow ) to see if one of them fails (this is usually what I do to diagnose configuration problem) I would suggested to start by timesquare. which contains native binaries. (also start by plugin with name ending with .ui because they are at the end of the dependency chain and will start required plugins automatically) Some plugins may have some requirement on the platform (os, 32/64 etc) that prevent one to start. I know that the configuration has changed a bit due to windows 7 and windows 10 way to report themselve using java properties. (the problem with eclipse is that when launching the workspace such error is usually hidden to the end user, the "plugin registry view" method helps to track them down)

chismxna commented 6 years ago

Hi dvojtise,

I have tried to start all gemoc related plugins, but I didn't get any errors. I will be away from campus for a week so I won't be able to test it on Win7. I would be grateful if you could do the testing.

I tried to execute coffemachine.xtfsm and SelectCoffeeSystem.xsigpml, respectively. I did this by using debug configuration CoffeeCoin and SelectCoffeeSystem under Gemoc Concurrent eXecutable Model category. I found that SelectCoffeeSystem worked fine, but CoffeeCoin cannot start correctly. Although it didn't give me the warnings in the earlier posts, it gave me the following:

  1. Please verify that you don't have the modeling nature for your project so that the aird indexed all the resources, (it must not contain resolve warning). 2.There are unresolved proxies in platform:/resource/org.gemoc.sample.bcool.coffeemachinewithsigpml/gemoc-gen/coffemachine.timemodel, the first is org.eclipse.emf.ecore.impl.EPackageImpl@215051e0 (eProxyURI: platform:/plugin/org.gemoc.sample.tfsm.concurrent.xtfsm/model/tfsm.ecore#/)=[[org.eclipse.emf.ecore.impl.EPackageImpl@215051e0 (eProxyURI: platform:/plugin/org.gemoc.sample.tfsm.concurrent.xtfsm/model/tfsm.ecore#/)]]
  2. Unable to initialize part: java.lang.NullPointerException

Thanks.