uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marshall Schor <...@schor.com>
Subject Re: [jira] Commented: (UIMA-1647) Scripts fail to call runUimaClass.sh
Date Tue, 03 Nov 2009 17:08:39 GMT
Jörn - I've checked in the changes - can you test when you get a
moment?  Thanks! -Marshall (Jira is still down)

Marshall Schor wrote:
> Jira is down, so I'm just replying here for now.
> I found the problem.  First I reproduced this on a local Ubuntu version
> with 2 tiny scripts, and sure enough, no parameters were passed. 
> I read the Ubuntu man page for sh and it says that parameters are passed
> (it is mistaken).
> I tried turning on some debugging in the scripts using shopts command
> and *surprise* - found it was "unknown".  A little more hunting verified
> that the shell being run was not the one documented by Ubuntu as sh, but
> rather the dash shell.  You can see this on Ubuntu by doing typing at
> the command prompt ls -l /bin/sh.  I looked at the man pages for that,
> and found that the . command doesn't do parameters.  So it is operating
> as designed.
> There is an interesting link in /bin on Ubuntu:  /bin/sh.distrib ->
> bash.  So Ubuntu is changing this explicitly from the norm, I think.
> A poor fix is to replace (on Ubuntu) the #!/bin/sh with #!/bin/bash
> which then makes everything work.
> A better fix (I think) is to follow Burn's suggestion and delete the "."
> altogether, and *export* any variables that we want the inner scripts to
> "see".
> This has potentially a slight backwards compatibility issue:  if
> previous *user-written* scripts used the "." approach, without exporting
> variables, to include our scripts, these would need to be updated.  But
> I don't think that's common practice.
> So - my plan is to remove the ".", and export any variables we want
> inner routines to see.
> -Marshall
> Jörn Kottmann (JIRA) wrote:
>>     [ https://issues.apache.org/jira/browse/UIMA-1647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773070#action_12773070
>> Jörn Kottmann commented on UIMA-1647:
>> -------------------------------------
>> Ok I updated and retried:
>> joern@karkand:~/uima test/apache-uima$ bin/cpeGui.sh 
>> Usage: specify -Dorg.apache.uima.jarpath=XXXX, where
>>   XXXX is a string of file paths to directories or jar files, separated using the
proper path separator character.
>>   For directories, all of the JARs found in these directories will be added to the
>>   If the directory has no Jars, then it is put in the class path directly.
>>   Normal "parent-first" delegation is done.
>>   The first argument is taken to be the name of the class whose "main" method will
be called and passed the rest of the arguments.
>>  Set -DUimaBootstrapSuppressClassPathDisplay to suppress the display of the resulting
>> Somehow it fails to pass the parameter to runUimaClass.sh, but I have no idea why.
It works after removing the . or replacing it with sh. I did the test with Ubuntu 9.10.
>>> Scripts fail to call runUimaClass.sh 
>>> -------------------------------------
>>>                 Key: UIMA-1647
>>>                 URL: https://issues.apache.org/jira/browse/UIMA-1647
>>>             Project: UIMA
>>>          Issue Type: Bug
>>>          Components: Async Scaleout
>>>    Affects Versions: 2.3AS
>>>         Environment: Ubuntu Server 8.10, Java 1.6
>>>            Reporter: Jörn Kottmann
>>>            Assignee: Jörn Kottmann
>>>            Priority: Blocker
>>>             Fix For: 2.3, 2.3AS
>>> Executing deployAsyncService.sh fails with the following error message:
>>> .: 28: runUimaClass.sh: not found 
>>> deployAsyncService.sh calls runUimaClass.sh with ". runUimaClass.sh ...",
>>> in an older version this script called setUimaClassPath.sh, but that was 
>>> done with the absolute path:
>>> . "$UIMA_HOME/bin/setUimaClassPath.sh"
>>> I suggest that we change all our .sh scripts to use the absolute path like
>>> it was done before for at least the deployAsyncService.sh script.

View raw message