AnsweredAssumed Answered

Error while executing external command from custom script

Question asked by AVSDevTest on Jun 17, 2016

Hi All, I am trying to execute external windows command and facing issue.

 

Error -

============================================================================
| Error in Script
============================================================================
| Step: Start ActiveMQ
----------------------------------------------------------------------------
| Message: java.lang.SecurityException: Scripts cannot call Runtime.exec()
----------------------------------------------------------------------------
| Trapped Exception: java.lang.SecurityException: Scripts cannot call Runtime.exec()
| Trapped Message: javax.script.ScriptException: java.lang.SecurityException: Scripts cannot call Runtime.exec()
----------------------------------------------------------------------------
STACK TRACE
javax.script.ScriptException: java.lang.SecurityException: Scripts cannot call Runtime.exec()
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:348)
at org.codehaus.groovy.jsr223.GroovyCompiledScript.eval(GroovyCompiledScript.java:41)
at javax.script.CompiledScript.eval(Unknown Source)
at com.itko.lisa.test.ScriptExecHandler.executeCompiledScript(ScriptExecHandler.java:501)
at com.itko.lisa.test.UserScriptNode._execute(UserScriptNode.java:218)
at com.itko.lisa.test.UserScriptNode.execute(UserScriptNode.java:175)
at com.itko.lisa.test.TestNode.executeNode(TestNode.java:981)
at com.itko.lisa.test.TestCase.execute(TestCase.java:1295)
at com.itko.lisa.test.TestCase.execute(TestCase.java:1210)
at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1195)
at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1136)

Outcomes