Service Virtualization

  • 1.  SSH and SFTP step for 8.0.1

    Posted Jul 10, 2017 01:13 AM

    Using DevTest 8.0.1 version

     

    For one Project want to add SSH and SFTP step. I know it is available with higher version of DevTest Tool.

    Can get link for Custom Extension for them and will it work with 8.01 version?



  • 2.  Re: SSH and SFTP step for 8.0.1

    Posted Jul 10, 2017 12:31 PM

    Refer to this communities post: How can we start unix service in LISA test  

    The link referenced in the post above contains a download for the SSH-Utils.

    After downloading, compile the source code with the correct version of Java (7 in your case).

    Deploy the resulting JAR to the LISA_HOME\hotdeploy folder.  

    Restart your environment and see if the steps show up in DevTest Workstation. 

     

    I am not certain, but there may be a few JARs in the download that also need to be deployed to hotdeploy if those JARs are not in any of the DevTest LIB directories.  

    NOTE: You may need to include DevTest 8.01 lib\shared JARs in your IDE's Project classpath to resolve any DevTest related references. Also, do not export any of the DevTest JARs in your SSH JAR. Those classes are already available in DevTest.



  • 3.  Re: SSH and SFTP step for 8.0.1

    Posted Jul 11, 2017 01:14 AM

    Hi,

    Steps are added twice under Custom Extensions but getting below error when want to add the step

     

     

    2017-07-11 05:09:49,168Z (10:39) [AWT-EventQueue-0] ERROR com.itko.lisa.editor.Intersections - We can't find or construct: com.itko.lisa.ext.trilead.SFTPStep
    java.lang.ClassNotFoundException: com.itko.lisa.ext.trilead.SFTPStepController
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at com.itko.lisa.editor.Intersections.makeControllerForTcClass(Intersections.java:150)
    at com.itko.lisa.editor.model.EditorUtils.createController(EditorUtils.java:358)
    at com.itko.lisa.editor.model.EditorUtils.createController(EditorUtils.java:374)
    at com.itko.lisa.editor.model.Graph.addNewStep(Graph.java:1025)
    at com.itko.lisa.editor.model.Graph.actionPerformed(Graph.java:733)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.AbstractButton.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$200(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.awt.EventQueue$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.awt.EventQueue$4.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at com.itko.lisa.editor.model.EditorUtils.createController(EditorUtils.java:376)

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at com.itko.lisa.editor.model.Graph.addNewStep(Graph.java:1025)

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at com.itko.lisa.editor.model.Graph.actionPerformed(Graph.java:733)

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at javax.swing.AbstractButton.doClick(Unknown Source)

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)

    2017-07-11 05:09:49,169Z (10:39) [AWT-EventQueue-0] ERROR System.err - at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.Component.processMouseEvent(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at javax.swing.JComponent.processMouseEvent(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.Component.processEvent(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.Container.processEvent(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.Component.dispatchEventImpl(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.Container.dispatchEventImpl(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.Component.dispatchEvent(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.Container.dispatchEventImpl(Unknown Source)

    2017-07-11 05:09:49,170Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.Window.dispatchEventImpl(Unknown Source)

    2017-07-11 05:09:49,171Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.Component.dispatchEvent(Unknown Source)

    2017-07-11 05:09:49,171Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

    2017-07-11 05:09:49,171Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventQueue.access$200(Unknown Source)

    2017-07-11 05:09:49,171Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventQueue$3.run(Unknown Source)

    2017-07-11 05:09:49,171Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventQueue$3.run(Unknown Source)

    2017-07-11 05:09:49,171Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.security.AccessController.doPrivileged(Native Method)

    2017-07-11 05:09:49,171Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

    2017-07-11 05:09:49,171Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

    2017-07-11 05:09:49,171Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventQueue$4.run(Unknown Source)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventQueue$4.run(Unknown Source)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.security.AccessController.doPrivileged(Native Method)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventQueue.dispatchEvent(Unknown Source)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

    2017-07-11 05:09:49,172Z (10:39) [AWT-EventQueue-0] ERROR System.err - at java.awt.EventDispatchThread.run(Unknown Source)



  • 4.  Re: SSH and SFTP step for 8.0.1

    Posted Jul 11, 2017 11:20 AM

    Seeing the entries twice is rather strange. The message also indicates that DevTest was unable to locate com.itko.lisa.ext.trilead.SFTPStep which is a pretty fair indicator that something in the isa.extensions file is not pointing to the location of the SFTPStep class. Since the step shows up in the list, it is a fair assumption that the JAR file was found.

     

    DevTest "picks up" the extension and locates the classes by accessing information located in the lisa.extensions file. The lisa.extensions file is located in the source and is exported into the JAR.  

     

    I would start by ensuring that the extensions file is pointing to the correct location of the class.  



  • 5.  Re: SSH and SFTP step for 8.0.1

    Posted Jul 12, 2017 01:27 AM

    This found in ssh-utils.lisaextension file

     

    ################
    # Lisa Extensions file for Trilead SSH library
    ################

    #################
    # Regular Steps #
    #################
    nodes=com.itko.lisa.ext.trilead.SFTPStep,com.itko.lisa.ext.trilead.SSHStep
    com.itko.lisa.ext.trilead.SFTPStep=com.itko.lisa.ext.trilead.SFTPStepController,com.itko.lisa.ext.trilead.SFTPStepEditor
    com.itko.lisa.ext.trilead.SSHStep=com.itko.lisa.ext.trilead.SSHStepController,com.itko.lisa.ext.trilead.SSHStepEditor

    ################
    # Simple Steps #
    ################
    # Here's how you make LISA aware of a simple step type (aka Node) This is optional but gets
    # the step listed instead of the user having to navigate to it
    #simpleNodes=com.itko.lisa.ext.trilead.SFTPSimpleStep



  • 6.  Re: SSH and SFTP step for 8.0.1

    Posted Jul 12, 2017 12:15 PM

    The extensions file looks correct.

    Is it possible for you to upload the JAR file you are using as an attachment?



  • 7.  Re: SSH and SFTP step for 8.0.1

    Posted Jul 13, 2017 02:24 AM


  • 8.  Re: SSH and SFTP step for 8.0.1

    Posted Jul 13, 2017 11:42 AM

    I am sorry that this is turning out to be challenging to solve. I do not have 8.0.1 installed on my machine so I am flying in the dark in terms of trying to resolve this. Maybe some others can chime in...

     

     

    I am guessing that you dropped the following jars from the ssh-utils.zip file into hotdeploy, correct?

    itkoext-ssh-utils-6.0.jar

    trilead-ssh2-build213.jar

     

    You might check LISA_HOME\lib.... to see if the trilead-ssh-build jars were previously installed by DevTest.  If so, you may not need to place that jar in hotdeploy. 

     

    I would like to go back to my initial concern which is the fact that we see two (2) custom SFTP and SSH steps listed in the custom extensions 'drop down' list you posted in the original post. Seeing these entries twice, indicates to me that DevTest is recognizing two lisaextensions files, most likely in two different jar files, with each JAR having a pointer to the same class. This could be problematic.

     

    I dropped the JAR into DT's 10.1 hotdeploy, and I only see the SFTP and SSH steps showing up one (1) time. When I run the mouse over the step, the help tip displays that it is pointing at com.itko.lisa.ext.trilead... 

     

    Are there any other custom JAR files used in your installation?  My first thought would be to get the number of custom SSH extensions seen in the Workstation to just one SFTP and one SSH custom step. This will help to rule out the possibility that duplicate class files each having the same names are creating an issue for the class loader.



  • 9.  Re: SSH and SFTP step for 8.0.1
    Best Answer

    Posted Jul 14, 2017 04:34 AM

    Hi,

    I did not found any trilead-ssh-build jars but the one which was in hotdeploy deleted them.

    Copied jars only at hotdeploy directory and restarted workstation. Now it is working.

    Thank you for the help.