mbeddr / mbeddr.formal

FASTEN: FormAl SpecificaTion ENvironment - a set of DSLs to experiment with rigorous systems and safety engineering.
https://sites.google.com/site/fastenroot/home
Apache License 2.0
23 stars 14 forks source link

Build error when running gradlew on Ubuntu 20.04 #69

Open ahmedwaqar opened 2 years ago

ahmedwaqar commented 2 years ago

I specified the paths in gradle,properties according to the installation instruction. When I ran the gradlew, it exit with the following the error:

BUILD FAILED
**/mbeddr.formal/build/scripts/build_all_scripts.xml:150: Could not create type generate due to java.lang.N oClassDefFoundError: org/jdom/JDOMException
at jetbrains.mps.build.ant.MpsLoadTask.(MpsLoadTask.java:51)
at jetbrains.mps.build.ant.generation.GenerateTask.(GenerateTask.java:24)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.apache.tools.ant.AntTypeDefinition.innerCreateAndSet(AntTypeDefinition.java:318)
at org.apache.tools.ant.AntTypeDefinition.createAndSet(AntTypeDefinition.java:264)
at org.apache.tools.ant.AntTypeDefinition.icreate(AntTypeDefinition.java:219)
at org.apache.tools.ant.AntTypeDefinition.create(AntTypeDefinition.java:206) at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:286) at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:264) at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:427) at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:165) at org.apache.tools.ant.Task.perform(Task.java:349) at org.apache.tools.ant.Target.execute(Target.java:449) at org.apache.tools.ant.Target.performTasks(Target.java:470) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1391) at org.apache.tools.ant.Project.executeTarget(Project.java:1364) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1254) at org.apache.tools.ant.Main.runBuild(Main.java:830) at org.apache.tools.ant.Main.startAnt(Main.java:223) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101) Caused by: java.lang.ClassNotFoundException: org.jdom.JDOMException at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1383) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1338) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1093) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 25 more

Process 'command '**/mbeddr.formal/build/jbrDownload/jbr/bin/java'' finished with non-zero exit value 1

Omitting the local path with **. For a first go, it looks like a Java error but I couldn't figure out what causes it. Is there a workaround to this issue?

danielratiu commented 2 years ago

Hi Waqar,

org.jdom.JDOMException is shipped with MPS (contained in its jars). Could you please double-check that the path to mpsHomeDir is good (and does not contain spaces)?

Best, Dan

On Fri, Aug 26, 2022 at 10:45 PM Waqar Ahmed @.***> wrote:

I specified the paths in gradle,properties according to the installation instruction. When I ran the gradlew, it exit with the following the error:

BUILD FAILED **/mbeddr.formal/build/scripts/build_all_scripts.xml:150: Could not create type generate due to java.lang.N oClassDefFoundError: org/jdom/JDOMException at jetbrains.mps.build.ant.MpsLoadTask.(MpsLoadTask.java:51) at jetbrains.mps.build.ant.generation.GenerateTask.(GenerateTask.java:24) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490) at org.apache.tools.ant.AntTypeDefinition.innerCreateAndSet(AntTypeDefinition.java:318) at org.apache.tools.ant.AntTypeDefinition.createAndSet(AntTypeDefinition.java:264) at org.apache.tools.ant.AntTypeDefinition.icreate(AntTypeDefinition.java:219) at org.apache.tools.ant.AntTypeDefinition.create(AntTypeDefinition.java:206) at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:286) at org.apache.tools.ant.ComponentHelper.createComponent(ComponentHelper.java:264) at org.apache.tools.ant.UnknownElement.makeObject(UnknownElement.java:427) at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:165) at org.apache.tools.ant.Task.perform(Task.java:349) at org.apache.tools.ant.Target.execute(Target.java:449) at org.apache.tools.ant.Target.performTasks(Target.java:470) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1391) at org.apache.tools.ant.Project.executeTarget(Project.java:1364) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1254) at org.apache.tools.ant.Main.runBuild(Main.java:830) at org.apache.tools.ant.Main.startAnt(Main.java:223) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:284) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101) Caused by: java.lang.ClassNotFoundException: org.jdom.JDOMException at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1383) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1338) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1093) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 25 more

Process 'command '**/mbeddr.formal/build/jbrDownload/jbr/bin/java'' finished with non-zero exit value 1

Omitting the local path with **. For a first go, it looks like a Java error but I couldn't figure out what causes it. Is there a workaround to this issue?

— Reply to this email directly, view it on GitHub https://github.com/mbeddr/mbeddr.formal/issues/69, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK63VLVMCFUEAN5YQTDLGTV3EUHXANCNFSM57X6R5KQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ahmedwaqar commented 2 years ago

Thanks Dan. I checked the path again and it has no spaces in the name. Unfortunately, its not working and I'm getting the same exception. This is my path variables in gradle.properties:

mpsHomeDir=/home/waqaahmed/Downloads/Softwares/MPS-2021.3.1/MPS-2021.3/ mbeddr.formal.home=/home/waqaahmed/Documents/Misc/Documents/Personal_Notes/tools/mbeddr.formal

danielratiu commented 2 years ago

FASTEN uses MPS 2021.1 - could you please try with that?

Waqar Ahmed @.***> schrieb am Fr. 2. Sept. 2022 um 21:46:

Thanks Dan. I checked the path again and it has no spaces in the name. Unfortunately, its not working and I'm getting the same exception. This is my path variables in gradle.properties:

mpsHomeDir=/home/waqaahmed/Downloads/Softwares/MPS-2021.3.1/MPS-2021.3/

mbeddr.formal.home=/home/waqaahmed/Documents/Misc/Documents/Personal_Notes/tools/mbeddr.formal

— Reply to this email directly, view it on GitHub https://github.com/mbeddr/mbeddr.formal/issues/69#issuecomment-1235843673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK63VMQW7P3KMVXNWO7FHDV4JKRZANCNFSM57X6R5KQ . You are receiving this because you commented.Message ID: <mbeddr/mbeddr. @.***>

ahmedwaqar commented 2 years ago

Thanks. With MPS 2021.1 the build is successful. But when I tried to open the project with MPS, it is giving me the errors like Used language com.mbeddr.formal.base.* is not deployed. I setup the path variable and also tried to copy and the paste the plugins from mbeddr.formal.mps-plugins but it doesn't work.

danielratiu commented 2 years ago

FASTEN is organized in several projects (layered architecture where e.g. safety depends on other projects). If you open the safety project, it needs to know where are the others located - this is configured already but you need to set the "mbeddr.formal" path variable as described in readme ... then restart MPS and the dependencies should be all set

"

  1. the path variable mbeddr.formal.home in 'Settings->Appearance & Behavior->Path Variables' to point to the directory which contains the cloned 'mbeddr.formal' repository.

" [image: image.png]

On Sat, Sep 3, 2022 at 2:48 AM Waqar Ahmed @.***> wrote:

Thanks. With MPS 2021.1 the build is successful. But when I tried to open the project with MPS, it is giving me the errors like Used language com.mbeddr.formal.base. is not deployed. I setup the path variable and also tried to copy and the paste the plugins from mbeddr.formal.mps-plugins* but it doesn't work.

— Reply to this email directly, view it on GitHub https://github.com/mbeddr/mbeddr.formal/issues/69#issuecomment-1236006810, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK63VP2LXNEQQXMPAOZ3WTV4KN5LANCNFSM57X6R5KQ . You are receiving this because you commented.Message ID: <mbeddr/mbeddr. @.***>