OpenElis installation on local windows machine

I was trying to install OpenElis in my local machine (Windows). I am using IntelliJ and installed all the requirements given in the readme like Java 1.7, ant version 1.9.1, ruby 2.2.1 and compass 0.12.7. After I was trying to build it using the command: ant dist

I am getting this:

compass.compile:

BUILD FAILED C:\Users\Amaresh.C\Desktop\OpenElis-master\OpenElis-master\build.xml:44: Execute failed: java.io.IOException: Cannot run program “compass” (in directory “C:\Users\Amaresh.C\Desktop\OpenElis-master\OpenElis-master\openelis\WebContent”): CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at java.lang.Runtime.exec(Runtime.java:617) at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442) at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628) at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669) at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) at java.lang.ProcessImpl.(ProcessImpl.java:385) at java.lang.ProcessImpl.start(ProcessImpl.java:136) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) … 23 more

I don’t understand why I am getting this eventhough I installed compass.

Also when I run the command: ant setupDB test test-only dist It is giving:

Buildfile: C:\Users\Amaresh.C\Desktop\OpenElis-master\OpenElis-master\build.xml Trying to override old definition of task javac

initDB:

BUILD FAILED C:\Users\Amaresh.C\Desktop\OpenElis-master\OpenElis-master\build.xml:150: Execute failed: java.io.IOException: Cannot run program “scripts\initDB.sh”: CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) at java.lang.Runtime.exec(Runtime.java:617) at org.apache.tools.ant.taskdefs.launcher.Java13CommandLauncher.exec(Java13CommandLauncher.java:41) at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:428) at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:442) at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:628) at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:669) at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:495) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) 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:1248) at org.apache.tools.ant.Main.runBuild(Main.java:851) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.(ProcessImpl.java:385) at java.lang.ProcessImpl.start(ProcessImpl.java:136) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1028) … 24 more

Why is this happening? Is there some changes required to run the script or is there some way?

Please can someone help me.? Thanks in advance :slight_smile:

Look like you went to through the wrong forum maybe? :point_right: https://talk.openelis-global.org/

2 Likes
  • If youre just testing out OpenELIS ,You could try with the new docker-compose setup configured to run out of the box.

  • If you need to run OpenELIS from the source code , you can also follow the instructions here to simply mount locally compiled artifacts into the containers

1 Like

I want to use openelis which is supported by Bahmni and I want to use the source code and not the docker.

Most people have been running OpenELIS code on Linux/Mac, hence the scripts\initDB.sh will run (Bash). It wont’ run on windows OS.

My guess is setupDB script is trying to create an emptyDB, but the code is in bash. If you only run compile, and not test, that should work.

See this line:

This script won’t run on Windows:

Maybe run OpenELIS Build only, not setup/tests/initDB etc. (run targets clean and compile).