This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 132519 - Cannot run WS-I tools on Linux
Summary: Cannot run WS-I tools on Linux
Alias: None
Product: webservices
Classification: Unclassified
Component: SoapUI (show other bugs)
Version: 6.x
Hardware: All Linux
: P2 blocker (vote)
Assignee: omatzura
Depends on:
Reported: 2008-04-10 13:49 UTC by Lukas Jungmann
Modified: 2008-04-28 11:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-04-10 13:49:19 UTC
-have set environment property $WSI_HOME=/path/to/wsi-test-tools
-have some ejb module with web service
-deploy it
-"Create Web Service tests" for this service (use all defaults)
-set up WSI options in tools->soapUI->preferences (check all available options there)
-run "Check WSI Compliance" action on some node where that action is available

Running WSI Analyzer for [MyWSPortBinding]

directory: /home/lukas/wsi-test-tools/java/bin

command: sh -c ./ -config /tmp/wsi-analyzer-config37197.xml -assertionDescription true

sh: ./ not found

my environment:
lukas@ubuntu-m9:~$ uname -a
Linux ubuntu-m9 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux
Comment 1 omatzura 2008-04-13 22:56:35 UTC

hmm.. is there no script in the /home/lukas/wsi-test-tools/java/bin folder?


Comment 2 Lukas Jungmann 2008-04-14 16:42:19 UTC
there is:

lukas@ubuntu-m9:~$ ls -la /home/lukas/wsi-test-tools/java/bin/ | grep Analy
-rw-r--r-- 1 lukas lukas 4542 2005-07-15 15:29 Analyzer.bat
-rwxr-xr-x 1 lukas lukas 3979 2005-07-15 15:29
Comment 3 Roderico Cruz 2008-04-14 19:44:55 UTC
Ole, I am just guessing here... Could it be the file separator problem when you invoke the Analyzer script? (i.e., "\"
vs. "/"). 
Comment 4 omatzura 2008-04-14 22:49:59 UTC
Hi Rico,

thanks for the tip, I can't find any code that doesn't use the File.seperatorChar constant here.. hmm.. 

jungi, could you please try running the invoked command from the command-line after the error occurs? ie change to the
specified directory and enter

sh -c ./ -config /tmp/wsi-analyzer-config37197.xml -assertionDescription true

To see if this works at all!?

Thanks in advance!



Comment 5 Lukas Jungmann 2008-04-15 00:51:32 UTC
No, even that does not work :-(

lukas@ubuntu-m9:~/wsi-test-tools/java/bin$ sh -c ./ -config /tmp/wsi-analyzer-config30218.xml
-assertionDescription true
-config: 1: ./ not found

the cause of this issue is that sh scripts have CRLF line endings instead of LF only therefore sh is looking for
'#!/bin/sh^M' interpreter instead of pure '#!/bin/sh' (same is true for all other commands within a script)

so the correct fix seems to be to convert *.sh files to *nix format (= use LF line endings) - ie by using dos2unix tool

once this is fixed there are another issues:

to run Analyzer on the command line (bash) one has to call:
sh ./ -config /tmp/wsi-analyzer-config30218.xml -assertionDescription true (or just ./ -config
/tmp/wsi-analyzer-config30218.xml -assertionDescription true)

calling check WSI compliance from the IDE now ends with:

Running WSI Analyzer for [NewWebServicePortBinding]

directory: /home/lukas/wsi-test-tools/java/bin

command: sh -c ./ -config /tmp/wsi-analyzer-config4511.xml -assertionDescription true

.: 54: Can't open /java/bin/

maybe removing 'sh -c' from the command could help, OTOH there can be something wrong on another place

hope this helps... ;-)
Comment 6 omatzura 2008-04-15 01:17:53 UTC

thanks! I'm going to blame the incorrect line-endings on WS-I, these files are part of their distribution :-)

Regarding the inability to open "/java/bin/", I wonder if there is such a file? Could there be some permission
related problem?


Comment 7 Lukas Jungmann 2008-04-15 01:45:07 UTC
yes, there is in $WSI_HOME/java/bin directory, it's called from and both files have the same

so the part with incorrect line endings can be release noted as we can't do much with that (unless you'd like to
implement some check which would be able to detect incorrect line endings and fix them if needed before running the script).

Anyway it still looks like some fix on the soapui side is needed, probably on a place where it calls Analyzer script, so
it calls it correctly... and I don't know where that place is...
Comment 8 omatzura 2008-04-15 08:55:22 UTC
ok.. we'll try to set up an ubuntu installation to test this.. I'll let you know!


Comment 9 Lukas Jungmann 2008-04-16 18:25:11 UTC
btw: calling:

sh -c "./ -config /tmp/wsi-analyzer-config25941.xml -assertionDescription true"

instead of:

sh -c ./ -config /tmp/wsi-analyzer-config25941.xml -assertionDescription true

should help (without quotes bash will take only ./Analyzer as an argument for sh's -c option and the rest as arguments
for sh script) ;)
Comment 10 omatzura 2008-04-16 20:54:56 UTC

thanks.. actually, internally the entire line after sh -c is passed to the ProcessBuilder as one argument, so I figured
this should be handled by the receiving process as such.. I can try enclosing it with quotes for testing sake.. 


Comment 11 omatzura 2008-04-16 21:54:11 UTC
Hi again,

there is an updated nbm with this fix at,
please try it to see if this works better.

thanks in advance!


Comment 12 Lukas Jungmann 2008-04-16 23:43:51 UTC
now it ends with:

command: sh -c './ -config /tmp/wsi-analyzer-config1905.xml -assertionDescription true'

/bin/sh: ./ -config /tmp/wsi-analyzer-config1905.xml -assertionDescription true: not found

grrr, I'm running out of ideas what else to try... :-(
Comment 13 Lukas Jungmann 2008-04-17 00:01:48 UTC
one more experiment before going to bed:

following program works fine (process exit value is 0 and report is generated into tmp dir):

public static void main(String[] args) throws IOException, InterruptedException {
    ProcessBuilder pb = new ProcessBuilder("sh", "-c", "./ -config /tmp/wsi-analyzer-config1900.xml
-assertionDescription true"); File(System.getenv("WSI_HOME"), "java/bin"));
    Process p = pb.start();
Comment 14 omatzura 2008-04-23 20:55:05 UTC

sorry for the delay on this.. The code you posted is more-or-less the same as in the application, I'm going to build an
udpated nbm with some minor fixes for you to try out.. ok?


Comment 15 omatzura 2008-04-23 21:26:03 UTC
Hi again,

the nbm is now uploaded to, please have a go
to see if there is any improvement. Also make sure that the path to the WS-I tools in the soapUI Preferences is the
exact same as your WSI_HOME variable.


Comment 16 Lukas Jungmann 2008-04-28 11:10:50 UTC

 now I'm getting:

Running WSI Analyzer for [NewWebServiceXXXPortBinding]

directory: /home/lukas/wsi-test-tools/java/bin

command: sh -c ./ -config /tmp/wsi-analyzer-config49000.xml -assertionDescription true

.: 54: Can't open /java/bin/

on the latest Ubuntu (8.04 has been released on Friday) :-(