Hi,
The following is working ok (GS 3.5.1): | str | str := 'mysql -h localhost -u root -pPassword -N -B -e "select distinct app from orbeon.orbeon_form_definition "'. System performOnServer: str. But the following is failing: | str | str := 'mysql -h localhost -u root -pMysql8080! -N -B -e "select distinct app from orbeon.orbeon_form_definition"'. GsHostProcess execute: str. Searching in the list there are couple of entries of GsHostProcess and problems with quotes but still no able to make it run. regards, bruno -- Sent from: http://forum.world.st/GLASS-f1460844.html _______________________________________________ Glass mailing list [hidden email] https://lists.gemtalksystems.com/mailman/listinfo/glass |
#performOnServer passes your string to a UNIX shell. You might need to
escape the bang character to protect it from the shell. Maybe change `-pMysql8080!' to `-pMysql8080\!' Norm On 5/27/2020 1:15 PM, BrunoBB via Glass wrote: > Hi, > > The following is working ok (GS 3.5.1): > | str | > str := 'mysql -h localhost -u root -pPassword -N -B -e "select distinct app > from orbeon.orbeon_form_definition "'. > System performOnServer: str. > > But the following is failing: > | str | > str := 'mysql -h localhost -u root -pMysql8080! -N -B -e "select distinct > app from orbeon.orbeon_form_definition"'. > GsHostProcess execute: str. > > Searching in the list there are couple of entries of GsHostProcess and > problems with quotes but still no able to make it run. > > regards, > bruno > > > > -- > Sent from: http://forum.world.st/GLASS-f1460844.html > _______________________________________________ > Glass mailing list > [hidden email] > https://lists.gemtalksystems.com/mailman/listinfo/glass _______________________________________________ Glass mailing list [hidden email] https://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by GLASS mailing list
Bruno,
I am not familiar with the particular GsHostProcess issues, but AFAICT, the failing guy has a `!` and that may be the special character that breaks things ... the specific error message upon failure might help determine why the `!` could be problematic ... Dale On 5/27/20 1:15 PM, BrunoBB via Glass wrote: > Hi, > > The following is working ok (GS 3.5.1): > | str | > str := 'mysql -h localhost -u root -pPassword -N -B -e "select distinct app > from orbeon.orbeon_form_definition "'. > System performOnServer: str. > > But the following is failing: > | str | > str := 'mysql -h localhost -u root -pMysql8080! -N -B -e "select distinct > app from orbeon.orbeon_form_definition"'. > GsHostProcess execute: str. > > Searching in the list there are couple of entries of GsHostProcess and > problems with quotes but still no able to make it run. > > regards, > bruno > > > > -- > Sent from: http://forum.world.st/GLASS-f1460844.html > _______________________________________________ > Glass mailing list > [hidden email] > https://lists.gemtalksystems.com/mailman/listinfo/glass Glass mailing list [hidden email] https://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by GLASS mailing list
Hi Norm,
With bang character escaped also fail. But it seems that is not a problem with bang character: | str | str := 'mysql -h localhost -u root -pMysql8080 -N -B -e "select distinct app from orbeon.orbeon_form_definition"'. GsHostProcess execute: str. This also fail with the same error and should answer a string with 'access denied' (as performOnServer: does). regards, bruno -- Sent from: http://forum.world.st/GLASS-f1460844.html _______________________________________________ Glass mailing list [hidden email] https://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by GLASS mailing list
Dale,
There is another problem (not bangchar) because the following also fail (works ok with performOnServer:): GsHostProcess execute: 'ls'. The Linux is: CentOS Linux release 7.7.1908 (Core). a Error occurred (error 2710), , Error , Error (AbstractException) >> _signalWith: @5 line 25 Error (AbstractException) >> signal: @3 line 7 Error class (AbstractException class) >> signal: @3 line 4 GsHostProcess class >> _execute:input: @43 line 41 GsHostProcess class >> execute:input: @2 line 17 GsHostProcess class >> execute: @2 line 2 Executed Code @2 line 1 GsNMethod class >> _gsReturnToC @1 line 11 -- Sent from: http://forum.world.st/GLASS-f1460844.html _______________________________________________ Glass mailing list [hidden email] https://lists.gemtalksystems.com/mailman/listinfo/glass |
Bruno, in this particular case I believe that GsHostPrcess requires the
full path to the executable, as it is not launching the process in a shell ... Dale On 5/27/20 2:34 PM, BrunoBB via Glass wrote: > Dale, > > There is another problem (not bangchar) because the following also fail > (works ok with performOnServer:): > > GsHostProcess execute: 'ls'. > > The Linux is: CentOS Linux release 7.7.1908 (Core). > > a Error occurred (error 2710), , Error , > Error (AbstractException) >> _signalWith: @5 line 25 > Error (AbstractException) >> signal: @3 line 7 > Error class (AbstractException class) >> signal: @3 line 4 > GsHostProcess class >> _execute:input: @43 line 41 > GsHostProcess class >> execute:input: @2 line 17 > GsHostProcess class >> execute: @2 line 2 > Executed Code @2 line 1 > GsNMethod class >> _gsReturnToC @1 line 11 > > > > > > -- > Sent from: http://forum.world.st/GLASS-f1460844.html > _______________________________________________ > Glass mailing list > [hidden email] > https://lists.gemtalksystems.com/mailman/listinfo/glass Glass mailing list [hidden email] https://lists.gemtalksystems.com/mailman/listinfo/glass |
Dale,
My fault i read that on the comments but i ignored it :( " Lookup in the PATH environment variable is not performed, the commandLineString must specify a complete path to an executable or script." GsHostProcess execute: '/usr/bin/mysql -h localhost -u root -pMysql8080! -N -B -e "select distinct app from orbeon.orbeon_form_definition"'. Works as expected regards, bruno -- Sent from: http://forum.world.st/GLASS-f1460844.html _______________________________________________ Glass mailing list [hidden email] https://lists.gemtalksystems.com/mailman/listinfo/glass |
Haha, been there, done that:)
On 5/27/20 3:53 PM, BrunoBB via Glass wrote: > My fault i read that on the comments but i ignored it _______________________________________________ Glass mailing list [hidden email] https://lists.gemtalksystems.com/mailman/listinfo/glass |
Free forum by Nabble | Edit this page |