Service Virtualization

Class not found in namespace when running a test suite where in the test has custom jar files that are imported in a javascript test,

  • 1.  Class not found in namespace when running a test suite where in the test has custom jar files that are imported in a javascript test,

    Posted 05-28-2015 05:32 AM

    Hi,

     

    I would like to seek help in running my test suite. I have a test that has a javascript step with imported custom jar file. Running it as quicktest is working fine however in Test Suite it has errors:

     

    Initialize :

    ============================================================================
    | Error in Script
    ============================================================================
    | Step:        Initialize
    ----------------------------------------------------------------------------
    | Message:     Sourced file: inline evaluation of: ``import com.ca.sv.devtest.util.GenerateString; import com.amex.util.ExecutionMetr . . . '' : Typed variable declaration : Class: ExecutionMetricsLogger not found in namespace : at Line: 4 : in file: inline evaluation of: ``import com.ca.sv.devtest.util.GenerateString; import com.amex.util.ExecutionMetr . . . '' : ExecutionMetricsLogger

    ----------------------------------------------------------------------------
    | Trapped Exception: Sourced file: inline evaluation of: ``import com.ca.sv.devtest.util.GenerateString; import com.amex.util.ExecutionMetr . . . '' : Typed variable declaration : Class: ExecutionMetricsLogger not found in namespace : at Line: 4 : in file: inline evaluation of: ``import com.ca.sv.devtest.util.GenerateString; import com.amex.util.ExecutionMetr . . . '' : ExecutionMetricsLogger

    | Trapped Message:   bsh.EvalError: Sourced file: inline evaluation of: ``import com.ca.sv.devtest.util.GenerateString; import com.amex.util.ExecutionMetr . . . '' : Typed variable declaration : Class: ExecutionMetricsLogger not found in namespace : at Line: 4 : in file: inline evaluation of: ``import com.ca.sv.devtest.util.GenerateString; import com.amex.util.ExecutionMetr . . . '' : ExecutionMetricsLogger

    ----------------------------------------------------------------------------
    STACK TRACE
    bsh.EvalError: Sourced file: inline evaluation of: ``import com.ca.sv.devtest.util.GenerateString; import com.amex.util.ExecutionMetr . . . '' : Typed variable declaration : Class: ExecutionMetricsLogger not found in namespace : at Line: 4 : in file: inline evaluation of: ``import com.ca.sv.devtest.util.GenerateString; import com.amex.util.ExecutionMetr . . . '' : ExecutionMetricsLogger

    at bsh.BSHAmbiguousName.toClass(BSHAmbiguousName.java:73)
    at bsh.BSHType.getType(BSHType.java:154)
    at bsh.BSHTypedVariableDeclaration.eval(BSHTypedVariableDeclaration.java:75)
    at bsh.Interpreter.eval(Interpreter.java:664)
    at bsh.Interpreter.eval(Interpreter.java:758)
    at bsh.Interpreter.eval(Interpreter.java:747)
    at com.itko.lisa.test.ScriptExecHandler.executeScript(ScriptExecHandler.java:609)
    at com.itko.lisa.test.ScriptExecHandler.executeScriptOld(ScriptExecHandler.java:510)
    at com.itko.lisa.test.ScriptNode._execute(ScriptNode.java:127)
    at com.itko.lisa.test.ScriptNode.execute(ScriptNode.java:104)
    at com.itko.lisa.test.TestNode.executeNode(TestNode.java:973)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1230)
    at com.itko.lisa.test.TestCase.execute(TestCase.java:1145)
    at com.itko.lisa.test.TestCase.executeNextNode(TestCase.java:1130)
    at com.itko.lisa.test.TestCase.executeTest(TestCase.java:1074)
    at com.itko.lisa.coordinator.Instance.run(Instance.java:204)
    Caused by: java.lang.ClassNotFoundException: Class: ExecutionMetricsLogger not found in namespace
    at bsh.Name.toClass(Name.java:664)
    at bsh.BSHAmbiguousName.toClass(BSHAmbiguousName.java:71)
    ... 15 more
    ============================================================================

     

    I would appreciate your help. TIA