Forum Discussion

bburch312's avatar
13 years ago

soapUI 4.5.1 hangs when deploying mock service as war

I have a soapUI mock service working quite well from a simple example found on the web. When I try to deploy the mock service as a war I get the 'Creating war file' progress dialog but the progress never ends and soapUI hangs completely ( I have to do a kill -9 on the soapui process ).

I have been running soapUI 4.5.1 on CentOS 6.3 for some time now with no other problems.

6 Replies

  • Easen's avatar
    Easen
    New Contributor
    Hi,

    Here's a stack trace of the issue, it only seems to affect *unix systems as Deploy as WAR works fine on Windows.

    09:06:58,549 INFO [MockAsWar] Creating WAR directory in [/home/marc/Desktop/test]
    09:06:58,550 ERROR [JarPackager] /opt/SmartBear/soapui-4.5.2/../lib or /home/marc/Desktop/test/WEB-INF/lib is not directory!
    09:06:58,550 ERROR [JarPackager] /opt/SmartBear/soapui-4.5.2/ext or /home/marc/Desktop/test/WEB-INF/lib is not directory!
    Exception in thread "SwingWorker" java.lang.ArrayIndexOutOfBoundsException: 0
    at com.eviware.soapui.tools.MockAsWar.prepareWarFile(MockAsWar.java:227)
    at com.eviware.soapui.tools.MockAsWar$1.construct(MockAsWar.java:90)
    at com.eviware.soapui.support.swing.SwingWorkerDelegator.construct(SwingWorkerDelegator.java:46)
    at com.eviware.soapui.support.swing.SwingWorker$2.run(SwingWorker.java:149)
    at java.lang.Thread.run(Thread.java:722)

    Cheers,
    Marc
  • nmrao's avatar
    nmrao
    Icon for Champion Level 1 rankChampion Level 1
    Are there any arugments missing/extra while making a call?
  • Easen's avatar
    Easen
    New Contributor
    Fix for *unix systems

    cd into the SoapUI
    cp bin/soapui*.jar .

    The issue is that this code doesn't look in the bin folder:-
    https://github.com/SmartBear/soapui/blo ... .java#L217

    String[] mainJar = soapUIHome.list( new FilenameFilter()
    {
    public boolean accept( File dir, String name )
    {
    if( name.toLowerCase().startsWith( "soapui" ) && name.toLowerCase().endsWith( ".jar" ) )
    return true;
    return false;
    }
    } );
  • Easen's avatar
    Easen
    New Contributor
    nmrao wrote:
    Are there any arugments missing/extra while making a call?


    No it looks like there's been a refactor the soapui.sh script which now moves the SOAPUI Home to the root directory.

    I've submitted a pull request (https://github.com/SmartBear/soapui/pull/14) to address this, however I'm unable to test this on Windows.
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi, the issue comes from buggy sh scripts.
    You should have the following argument -Dsoapui.home=$SOAPUI_HOME/bin
    If the bin directory is missing, add it.

    Regarding which scripts and which installer you are using, you may have the issue or not. This is because configuration is duplicated accross scripts and a same scripts is duplicated between "standalone" (https://github.com/SmartBear/soapui/tre ... dalone/bin) and regular distribution (https://github.com/SmartBear/soapui/tre ... c/dist/bin)