Service Virtualization

 View Only
  • 1.  Sub Process Execution Error

    Posted Dec 03, 2020 11:04 AM
    Hi Team,

    We have one Sub process which will write the Excel files and HTML report in our based on the Test cases Execution. but we are getting the below error when we are executing this error.
    User has write access to the Project Folder, He can able to create the Excel and HTML files even in C:\ Folder. 

    So Could you Please analyze the below logs and let us know why it is happening?

    Error:

    Step: ReportGenerator
    ----------------------------------------------------------------------------
    | Message: org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
    ----------------------------------------------------------------------------
    | Trapped Exception: org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
    | Trapped Message:
    ============================================================================
    | Exception:
    ============================================================================
    | Step: ReportGenerator
    ----------------------------------------------------------------------------
    | Message: org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
    ----------------------------------------------------------------------------
    | Trapped Exception: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
    | Trapped Message: org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
    ----------------------------------------------------------------------------
    STACK TRACE
    org.apache.velocity.exception.VelocityException: Error initializing log: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
    at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:875)
    at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:262)
    at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:93)
    at com.sun.script.velocity.VelocityScriptEngine.initVelocityEngine(VelocityScriptEngine.java:113)
    at com.sun.script.velocity.VelocityScriptEngine.eval(VelocityScriptEngine.java:67)
    at com.sun.script.velocity.VelocityScriptEngine.eval(VelocityScriptEngine.java:62)
    at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
    at com.itko.lisa.test.ScriptExecHandler.executeScript(ScriptExecHandler.java:674)
    at com.itko.lisa.test.ScriptExecHandler.executeScript(ScriptExecHandler.java:427)
    at com.itko.lisa.test.UserScriptNode._execute(UserScriptNode.java:210)
    at com.itko.lisa.test.UserScriptNode.execute(UserScriptNode.java:175)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:984)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1297)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
    at com.itko.lisa.utils.ExecSubProcessNode.doFullExec(ExecSubProcessNode.java:354)
    8:50
    at com.itko.lisa.utils.ExecSubProcessNode.execute(ExecSubProcessNode.java:268)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:984)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1297)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
    at com.itko.lisa.utils.ExecSubProcessNode.doFullExec(ExecSubProcessNode.java:354)
    at com.itko.lisa.utils.ExecSubProcessNode.execute(ExecSubProcessNode.java:268)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:984)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1297)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1198)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1183)
    at com.itko.lisa.editor.WalkThruPanel.prepAndExecNode(WalkThruPanel.java:1115)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:73)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:1017)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:195)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
    at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:220)
    at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:269)
    at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:871)
    ... 31 more
    Caused by: java.lang.RuntimeException: Error configuring Log4JLogChute :
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.apache.velocity.util.ExceptionUtils.createWithCause(ExceptionUtils.java:67)
    at org.apache.velocity.util.ExceptionUtils.createRuntimeException(ExceptionUtils.java:45)
    at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:133)
    at org.apache.velocity.runtime.log.Log4JLogChute.init(Log4JLogChute.java:85)
    at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:157)
    ... 33 more
    Caused by: java.io.FileNotFoundException: velocity.log (Access is denied)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
    at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
    at org.apache.log4j.FileAppender.<init>(FileAppender.java:110)
    at org.apache.log4j.RollingFileAppender.<init>(RollingFileAppender.java:79)
    at org.apache.velocity.runtime.log.Log4JLogChute.initAppender(Log4JLogChute.java:118)
    ... 35 more

    Thanks & Regards,
    Saikiran Garapati


  • 2.  RE: Sub Process Execution Error

    Broadcom Employee
    Posted Dec 03, 2020 11:33 PM
    Hi Sai

            Please make sure the simulator process is started with admin privileges.

    Regards
    Sankar 





  • 3.  RE: Sub Process Execution Error

    Posted Dec 06, 2020 10:15 PM
    Thanks Sankar for the Response,

    In Server we have to Start Simulator Service with admin privileges or in Work Station? Because for the simulator we are maintaining for the same server is working for other Resources. only one of my team member is facing this issue while he is executing the sub process locally.


  • 4.  RE: Sub Process Execution Error

    Posted Dec 07, 2020 12:50 AM
    Hi Saikiran,

    It depends on your simulator setup. Ideally the simulator service should be executed with admin access.  In workstation, you can view the configured services.

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------