I am trying to run a bash file(.sh) to make some photos conversion in my grails server, my code is the following to make that task:
def folderTo = grailsAttributes.getApplicationContext().getResource("/files/").getFile()
def f = new File(folderFrom.toString())
def cmd = '/bin/bash /var/lib/tomcat6/webapps/malibueventapp-qa/uploads/convertPhoto.sh /var/lib/tomcat6/webapps/malibueventapp-qa/uploads /var/lib/tomcat6/webapps/malibueventapp-qa/files'
def process = runtime.exec(cmd, null, f);
the problem here is, when I am running it in the server, I am getting the follow error:
Cannot run program "/bin/bash" (in directory "/var/lib/tomcat6/webapps/malibueventapp-qa/uploads"): java.io.IOException: error=12, Cannot allocate memory
that is the only message error i am getting! so I have no ideas what to do!
some sugestions?!
thanks