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.
-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 ./Analyzer.sh -config /tmp/wsi-analyzer-config37197.xml -assertionDescription true sh: ./Analyzer.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
Hi, hmm.. is there no Analyzer.sh script in the /home/lukas/wsi-test-tools/java/bin folder? regards, /Ole eviware.com
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 Analyzer.sh
Ole, I am just guessing here... Could it be the file separator problem when you invoke the Analyzer script? (i.e., "\" vs. "/").
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 ./Analyzer.sh -config /tmp/wsi-analyzer-config37197.xml -assertionDescription true To see if this works at all!? Thanks in advance! regards, /Ole eviware.com
No, even that does not work :-( lukas@ubuntu-m9:~/wsi-test-tools/java/bin$ sh -c ./Analyzer.sh -config /tmp/wsi-analyzer-config30218.xml -assertionDescription true -config: 1: ./Analyzer.sh: not found lukas@ubuntu-m9:~/wsi-test-tools/java/bin$ 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 ./Analyzer.sh -config /tmp/wsi-analyzer-config30218.xml -assertionDescription true (or just ./Analyzer.sh -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 ./Analyzer.sh -config /tmp/wsi-analyzer-config4511.xml -assertionDescription true .: 54: Can't open /java/bin/setenv.sh maybe removing 'sh -c' from the command could help, OTOH there can be something wrong on another place hope this helps... ;-)
Hi! 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/setenv.sh", I wonder if there is such a file? Could there be some permission related problem? regards! /Ole eviware.com
yes, there is setenv.sh in $WSI_HOME/java/bin directory, it's called from Analyzer.sh and both files have the same permissions. 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...
ok.. we'll try to set up an ubuntu installation to test this.. I'll let you know! regards, /Ole eviware.com
btw: calling: sh -c "./Analyzer.sh -config /tmp/wsi-analyzer-config25941.xml -assertionDescription true" instead of: sh -c ./Analyzer.sh -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) ;)
Hi! 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.. regards! /Ole eviware.com
Hi again, there is an updated nbm with this fix at http://www.soapui.org/download/com-eviware-soapui-netbeans-module-2.0.3.nbm, please try it to see if this works better. thanks in advance! regards, /Ole eviware.com
now it ends with: command: sh -c './Analyzer.sh -config /tmp/wsi-analyzer-config1905.xml -assertionDescription true' /bin/sh: ./Analyzer.sh -config /tmp/wsi-analyzer-config1905.xml -assertionDescription true: not found grrr, I'm running out of ideas what else to try... :-(
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", "./Analyzer.sh -config /tmp/wsi-analyzer-config1900.xml -assertionDescription true"); pb.directory(new File(System.getenv("WSI_HOME"), "java/bin")); Process p = pb.start(); System.out.println(p.waitFor()); }
Hi, 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? regards! /Ole eviware.com
Hi again, the nbm is now uploaded to http://www.soapui.org/download/com-eviware-soapui-netbeans-module-2.0.3.nbm, 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. regards! /Ole eviware.com
Hi, now I'm getting: Running WSI Analyzer for [NewWebServiceXXXPortBinding] directory: /home/lukas/wsi-test-tools/java/bin command: sh -c ./Analyzer.sh -config /tmp/wsi-analyzer-config49000.xml -assertionDescription true .: 54: Can't open /java/bin/setenv.sh on the latest Ubuntu (8.04 has been released on Friday) :-(