Service Virtualization

Expand all | Collapse all

In built String Patterns does not load/work in ITR

  • 1.  In built String Patterns does not load/work in ITR

    Posted Jul 03, 2018 03:02 PM

    Hi Community,

    I am using String Patterns like {{=[:First Name:]}} {{=[:Middle Initial:]}} {{=[:Last Name:]}} in 'Output Log Message' step. When I run the ITR, those patterns are NOT getting loaded and ITR keeps running indefinitely for that step.

    Is there anything that has to be done differently to make it work?

     

    Thanks,

    Uttam.



  • 2.  Re: In built String Patterns does not load/work in ITR

    Broadcom Employee
    Posted Jul 03, 2018 03:24 PM

    What is your DevTest version?

     

    Please provide the workstation.log from the time this issue occurs



  • 3.  Re: In built String Patterns does not load/work in ITR

    Posted Jul 03, 2018 04:19 PM

    I am using DevTest v10.2. Below is the workstation log. Since the step was running indefinitely, I had to terminate the ITR. 

     

    2018-07-03 20:25:57,089Z (16:25) [ProcDlgThreadCallbk@408196ea] INFO org.eclipse.persistence - EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
    2018-07-03 20:25:57,092Z (16:25) [ProcDlgThreadCallbk@408196ea] ERROR com.itko.lisa.test.ScriptExecHandler - Failed to evaluate expression '=[:First Name:]': Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
    Error Code: 0
    javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
    Error Code: 0
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:517)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:188)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:277)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:294)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:272)
    at com.itko.lisa.utils.JpaUtil.getEm(JpaUtil.java:1456)
    at com.itko.lisa.test.data.TestDataGenerator.ensureTestDataExists(TestDataGenerator.java:312)
    at com.itko.lisa.test.data.TestDataGenerator.getRandomTestDataFromDb(TestDataGenerator.java:164)
    at com.itko.lisa.test.data.TestDataGenerator.getRandomTestData(TestDataGenerator.java:155)
    at com.itko.lisa.test.data.TestDataGenerator.generate(TestDataGenerator.java:228)
    at com.itko.lisa.test.ScriptExecHandler.execExpression(ScriptExecHandler.java:234)
    at com.itko.lisa.test.ParseInState$Hit.doScriptEval(ParseInState.java:425)
    at com.itko.lisa.test.ParseInState$Hit.evaluate(ParseInState.java:415)
    at com.itko.lisa.test.ParseInState.parseInState(ParseInState.java:279)
    at com.itko.lisa.test.TestExec.parseInState(TestExec.java:1966)
    at com.itko.lisa.test.TestExec.parseInState(TestExec.java:1948)
    at com.itko.lisa.test.TestExec.parseInState(TestExec.java:1944)
    at com.itko.lisa.test.TestNodeLogger.execute(TestNodeLogger.java:99)
    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:1085)
    at com.itko.lisa.editor.WalkThruPanel.access$900(WalkThruPanel.java:72)
    at com.itko.lisa.editor.WalkThruPanel$10.doCallback(WalkThruPanel.java:992)
    at com.itko.util.swing.panels.ProcessingDialog$2.run(ProcessingDialog.java:194)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
    Error Code: 0
    at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:309)
    at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:135)
    at org.eclipse.persistence.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:162)
    at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:584)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:206)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:488)
    ... 26 more
    Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:118)
    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:77)
    at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:74)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:692)
    at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:140)
    at com.itko.lisa.utils.db.LisaWrappedDataSource.getConnection(LisaWrappedDataSource.java:38)
    at org.eclipse.persistence.sessions.JNDIConnector.connect(JNDIConnector.java:123)
    ... 30 more
    Caused by: java.lang.InterruptedException
    at java.lang.Object.wait(Native Method)
    at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1459)
    at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:639)
    at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:549)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutAndMarkConnectionInUse(C3P0PooledConnectionPool.java:756)
    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:683)
    ... 33 more



  • 4.  Re: In built String Patterns does not load/work in ITR

    Broadcom Employee
    Posted Jul 03, 2018 04:45 PM
      |   view attached

    I tested the same in 10.2 and 10.3  and I am not able to reproduce the issue..  See attached testcase. 

    Attachment(s)

    zip
    stringPatterns.tst.zip   790 B 1 version


  • 5.  Re: In built String Patterns does not load/work in ITR

    Posted Jul 03, 2018 05:04 PM

    Tried your test case. Same issue.



  • 6.  Re: In built String Patterns does not load/work in ITR

    Posted Jul 03, 2018 05:01 PM

    As per the logs that I have attached above, seems like there is an SQLException which is causing the issue. Not sure what is the workaround for that.



  • 7.  Re: In built String Patterns does not load/work in ITR
    Best Answer

    Broadcom Employee
    Posted Jul 03, 2018 05:24 PM

    Are you using the Derby database ?  

     

     The string pattern functionality has many patterns in addition to first names: last names, dates, Social Security numbers, credit card numbers, credit card expiration dates, and many more. This fake data comes in the TESTDATA table in the reportdb database.  It looks like this table might be corrupted.. 



  • 8.  Re: In built String Patterns does not load/work in ITR

    Posted Jul 03, 2018 05:43 PM

    This sounds like the need for a Support Ticket to be opened. To help the team in this thread and in Support, try the following to see if you can get a Workstation log file that contains more detailed information.

     

    1) Exit out of the Workstation application so it is not running

    2) Navigate to your c:\users\<yourId>\lisatmp_10.2.x directory and remove the Workstation.log This simply clears out the log file so it is easier to review while debugging the error in question.

    3) Start Workstation

    4) If the step that is causing you issues is deep in a test case, start the Test in ITR mode and execute to the step prior to where the exception occurs. This simply minimizes the amount of output going into the Workstation log file.

    -- Leave ITR running but do not execute the step that fails just yet, 

    -- Open an editor

    --  Edit your LISA_HOME\logging.properties file

         Change log4j.rootCategory=INFO,A1 to log4j.rootCategory=DEBUG,A1

         Add these lines below log4j.rootCategory

         log4j.logger.com.mchange.v2.c3p0=DEBUG

         log4j.logger.com.mchange.v2.resourcepool=DEBUG

         log4j.logger.com.mchange.v2.sql=DEBUG 
    (I am hoping the above will dump more information about the SQL query into your Workstation log file)

    -- Save the file

    5) Go back into the ITR Session and continue execution of the step causing the error.

    You may need to 'kill' ITR manually.

    Check the Workstation.log file afterward and see if any more detailed information is produced.

    6) Reopen logging.properties, set the debugger back to INFO, and comment the logging of the mchange class.

    Please let us know if this produces more detailed information from which we can help you.



  • 9.  Re: In built String Patterns does not load/work in ITR

    Posted Jul 03, 2018 08:24 PM

    Thanks for the debugging steps Joel. Unfortunately, I do not have access to edit 'logging.properties' file and it requires a separate incident to get access to that file. It may take another 5-6 days. I will keep you posted with the outcome. 



  • 10.  Re: In built String Patterns does not load/work in ITR

    Posted Jul 05, 2018 08:32 AM

    To be clear, the logging.properties file I am referring to is the file located in the installation directory of the DevTest Workstation which should be on your local machine. Depending on your installation/version, this file may be located in c:/users/<yourId>/DevTest.



  • 11.  Re: In built String Patterns does not load/work in ITR

    Posted Jul 05, 2018 01:23 PM

    The report DB had some issues which caused this problem. Its working fine now. Thanks for the comments/suggestions.