Re: [basex-talk] proc:system

2019-11-13 Thread Christian Grün
Good to see, everything’s alright then. proc:system will only output a
result if the command was executed successfully.


Giuseppe G. A. Celano  schrieb am Mi.,
13. Nov. 2019, 19:27:

> I would expect just some text, as with proc:system("ls")
>
> 
>   Usage:
>   /usr/local/bin/tesseract --help | --help-extra | --version
>   /usr/local/bin/tesseract --list-langs
>   /usr/local/bin/tesseract imagename outputbase [options...]
> [configfile...]
>
> OCR options:
>   -l LANG[+LANG]Specify language(s) used for OCR.
> NOTE: These options must occur before any configfile.
>
> Single options:
>   --helpShow this help message.
>   --help-extra  Show extra help for advanced users.
>   --version Show version information.
>   --list-langs  List available languages for tesseract engine.
> 
>   1
> 
>
> I guess that the "1" code blocks the printing. If I use
> proc:system("/usr/local/bin/tesseract", "--help"), it works.
>
> E-mail: cel...@informatik.uni-leipzig.de
> Web site 1: http://asv.informatik.uni-leipzig.de/en/staff/Giuseppe_Celano
> Web site 2: https://sites.google.com/site/giuseppegacelano/
>
> On Nov 13, 2019, at 6:48 PM, Christian Grün 
> wrote:
>
> Interestingly, proc:execute("/usr/local/bin/tesseract") works (I have
> BaseX 9.2).
>
>
> How does the output look like?
>
> proc:system("/usr/local/bin/tesseract") returns the following:
>
>
> If the code 1 is raised, it indicates that your command will be
> executed indeed, but it returns the exit code 1. Which output would
> you expect?
>
>
>
>
>
> SET DEBUG true
>
> DEBUG: true
>
> XQUERY proc:system("/usr/local/bin/tesseract")
>
> org.basex.query.QueryException:
> at org.basex.query.func.proc.ProcSystem.item(ProcSystem.java:26)
> at org.basex.query.expr.ParseExpr.value(ParseExpr.java:50)
> at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:45)
> at org.basex.query.scope.MainModule.iter(MainModule.java:97)
> at org.basex.query.QueryContext.iter(QueryContext.java:332)
> at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
> at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> at org.basex.core.Command.run(Command.java:257)
> at org.basex.core.Command.execute(Command.java:93)
> at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> at org.basex.api.client.Session.execute(Session.java:36)
> at org.basex.core.CLI.execute(CLI.java:92)
> at org.basex.core.CLI.execute(CLI.java:76)
> at org.basex.BaseX.console(BaseX.java:176)
> at org.basex.BaseX.(BaseX.java:151)
> at org.basex.BaseX.main(BaseX.java:42)
> org.basex.core.BaseXException: Stopped at ., 1/12:
> [proc:code0001]
> at org.basex.core.Command.execute(Command.java:94)
> at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> at org.basex.api.client.Session.execute(Session.java:36)
> at org.basex.core.CLI.execute(CLI.java:92)
> at org.basex.core.CLI.execute(CLI.java:76)
> at org.basex.BaseX.console(BaseX.java:176)
> at org.basex.BaseX.(BaseX.java:151)
> at org.basex.BaseX.main(BaseX.java:42)
> Caused by: org.basex.query.QueryException:
> at org.basex.query.func.proc.ProcSystem.item(ProcSystem.java:26)
> at org.basex.query.expr.ParseExpr.value(ParseExpr.java:50)
> at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:45)
> at org.basex.query.scope.MainModule.iter(MainModule.java:97)
> at org.basex.query.QueryContext.iter(QueryContext.java:332)
> at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
> at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> at org.basex.core.Command.run(Command.java:257)
> at org.basex.core.Command.execute(Command.java:93)
> ... 7 more
> Stopped at ., 1/12:
> [proc:code0001]
>
>
>
>
> On Nov 13, 2019, at 5:50 PM, Christian Grün 
> wrote:
>
> Hi Giuseppe,
>
> When I try to run
> proc:system("/usr/local/bin/tesseract") I get the error [proc:code0001]
>
>
> On my system, I get the (expected) error…
>
> [proc:error] Cannot run program "/usr/local/bin/tesseract":
> CreateProcess error=2, Das System kann die angegebene Datei nicht finden
>
> …so we may need to find out what code 1 means in your case. Could you
> run the query with debugging enabled and pass us on the stack trace?
>
> And your error code indicates that you are using an older version of
> BaseX. Does it work with a more recent version? If not, what do you
> get?
>
> Best,
> Christian
>
>
>
>
>
> Similarly:
>
> proc:system("tesseract") returns [proc:error] Cannot run program
> "tesseract": error=2, No such file or directory
>
> Similarly:
>
> proc:system("tesseract", (), map {"dir" : "/usr/local/bin/"}) returns
> [proc:error] Cannot run program "tesseract" (in directory
> "/usr/local/bin"): error=2, No such file or directory
>
> The command "tesseract" works at the command line. I suspect there may be
> a problem with permissions: is there a way to overcome this error? Thanks.
>
> Best,
> Giuseppe
>
>
>
>
>
>


Re: [basex-talk] proc:system

2019-11-13 Thread Giuseppe G. A. Celano
I would expect just some text, as with proc:system("ls")


  Usage:
  /usr/local/bin/tesseract --help | --help-extra | --version
  /usr/local/bin/tesseract --list-langs
  /usr/local/bin/tesseract imagename outputbase [options...] [configfile...]

OCR options:
  -l LANG[+LANG]Specify language(s) used for OCR.
NOTE: These options must occur before any configfile.

Single options:
  --helpShow this help message.
  --help-extra  Show extra help for advanced users.
  --version Show version information.
  --list-langs  List available languages for tesseract engine.

  1


I guess that the "1" code blocks the printing. If I use 
proc:system("/usr/local/bin/tesseract", "--help"), it works.

E-mail: cel...@informatik.uni-leipzig.de 

Web site 1: http://asv.informatik.uni-leipzig.de/en/staff/Giuseppe_Celano 
 
Web site 2: https://sites.google.com/site/giuseppegacelano/ 


> On Nov 13, 2019, at 6:48 PM, Christian Grün  wrote:
> 
>> Interestingly, proc:execute("/usr/local/bin/tesseract") works (I have BaseX 
>> 9.2).
> 
> How does the output look like?
> 
>> proc:system("/usr/local/bin/tesseract") returns the following:
> 
> If the code 1 is raised, it indicates that your command will be
> executed indeed, but it returns the exit code 1. Which output would
> you expect?
> 
> 
> 
> 
> 
>>> SET DEBUG true
>> DEBUG: true
>>> XQUERY proc:system("/usr/local/bin/tesseract")
>> org.basex.query.QueryException:
>> at org.basex.query.func.proc.ProcSystem.item(ProcSystem.java:26)
>> at org.basex.query.expr.ParseExpr.value(ParseExpr.java:50)
>> at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:45)
>> at org.basex.query.scope.MainModule.iter(MainModule.java:97)
>> at org.basex.query.QueryContext.iter(QueryContext.java:332)
>> at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
>> at org.basex.core.cmd.AQuery.query(AQuery.java:107)
>> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
>> at org.basex.core.Command.run(Command.java:257)
>> at org.basex.core.Command.execute(Command.java:93)
>> at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
>> at org.basex.api.client.Session.execute(Session.java:36)
>> at org.basex.core.CLI.execute(CLI.java:92)
>> at org.basex.core.CLI.execute(CLI.java:76)
>> at org.basex.BaseX.console(BaseX.java:176)
>> at org.basex.BaseX.(BaseX.java:151)
>> at org.basex.BaseX.main(BaseX.java:42)
>> org.basex.core.BaseXException: Stopped at ., 1/12:
>> [proc:code0001]
>> at org.basex.core.Command.execute(Command.java:94)
>> at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
>> at org.basex.api.client.Session.execute(Session.java:36)
>> at org.basex.core.CLI.execute(CLI.java:92)
>> at org.basex.core.CLI.execute(CLI.java:76)
>> at org.basex.BaseX.console(BaseX.java:176)
>> at org.basex.BaseX.(BaseX.java:151)
>> at org.basex.BaseX.main(BaseX.java:42)
>> Caused by: org.basex.query.QueryException:
>> at org.basex.query.func.proc.ProcSystem.item(ProcSystem.java:26)
>> at org.basex.query.expr.ParseExpr.value(ParseExpr.java:50)
>> at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:45)
>> at org.basex.query.scope.MainModule.iter(MainModule.java:97)
>> at org.basex.query.QueryContext.iter(QueryContext.java:332)
>> at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
>> at org.basex.core.cmd.AQuery.query(AQuery.java:107)
>> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
>> at org.basex.core.Command.run(Command.java:257)
>> at org.basex.core.Command.execute(Command.java:93)
>> ... 7 more
>> Stopped at ., 1/12:
>> [proc:code0001]
>> 
>> 
>> 
>> 
>> On Nov 13, 2019, at 5:50 PM, Christian Grün  
>> wrote:
>> 
>> Hi Giuseppe,
>> 
>> When I try to run
>> proc:system("/usr/local/bin/tesseract") I get the error [proc:code0001]
>> 
>> 
>> On my system, I get the (expected) error…
>> 
>> [proc:error] Cannot run program "/usr/local/bin/tesseract":
>> CreateProcess error=2, Das System kann die angegebene Datei nicht finden
>> 
>> …so we may need to find out what code 1 means in your case. Could you
>> run the query with debugging enabled and pass us on the stack trace?
>> 
>> And your error code indicates that you are using an older version of
>> BaseX. Does it work with a more recent version? If not, what do you
>> get?
>> 
>> Best,
>> Christian
>> 
>> 
>> 
>> 
>> 
>> Similarly:
>> 
>> proc:system("tesseract") returns [proc:error] Cannot run program 
>> "tesseract": error=2, No such file or directory
>> 
>> Similarly:
>> 
>> proc:system("tesseract", (), map {"dir" : "/usr/local/bin/"}) returns 
>> [proc:error] Cannot run program "tesseract" (in directory "/usr/local/bin"): 
>> error=2, No such file or directory
>> 
>> The command "tesseract" works at the command line. I suspect there may be a 
>> problem with permissions: is there a way to overcome this error? Thanks.
>> 

Re: [basex-talk] proc:system

2019-11-13 Thread Christian Grün
> Interestingly, proc:execute("/usr/local/bin/tesseract") works (I have BaseX 
> 9.2).

How does the output look like?

> proc:system("/usr/local/bin/tesseract") returns the following:

If the code 1 is raised, it indicates that your command will be
executed indeed, but it returns the exit code 1. Which output would
you expect?





> > SET DEBUG true
> DEBUG: true
> > XQUERY proc:system("/usr/local/bin/tesseract")
> org.basex.query.QueryException:
> at org.basex.query.func.proc.ProcSystem.item(ProcSystem.java:26)
> at org.basex.query.expr.ParseExpr.value(ParseExpr.java:50)
> at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:45)
> at org.basex.query.scope.MainModule.iter(MainModule.java:97)
> at org.basex.query.QueryContext.iter(QueryContext.java:332)
> at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
> at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> at org.basex.core.Command.run(Command.java:257)
> at org.basex.core.Command.execute(Command.java:93)
> at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> at org.basex.api.client.Session.execute(Session.java:36)
> at org.basex.core.CLI.execute(CLI.java:92)
> at org.basex.core.CLI.execute(CLI.java:76)
> at org.basex.BaseX.console(BaseX.java:176)
> at org.basex.BaseX.(BaseX.java:151)
> at org.basex.BaseX.main(BaseX.java:42)
> org.basex.core.BaseXException: Stopped at ., 1/12:
> [proc:code0001]
> at org.basex.core.Command.execute(Command.java:94)
> at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> at org.basex.api.client.Session.execute(Session.java:36)
> at org.basex.core.CLI.execute(CLI.java:92)
> at org.basex.core.CLI.execute(CLI.java:76)
> at org.basex.BaseX.console(BaseX.java:176)
> at org.basex.BaseX.(BaseX.java:151)
> at org.basex.BaseX.main(BaseX.java:42)
> Caused by: org.basex.query.QueryException:
> at org.basex.query.func.proc.ProcSystem.item(ProcSystem.java:26)
> at org.basex.query.expr.ParseExpr.value(ParseExpr.java:50)
> at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:45)
> at org.basex.query.scope.MainModule.iter(MainModule.java:97)
> at org.basex.query.QueryContext.iter(QueryContext.java:332)
> at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
> at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> at org.basex.core.Command.run(Command.java:257)
> at org.basex.core.Command.execute(Command.java:93)
> ... 7 more
> Stopped at ., 1/12:
> [proc:code0001]
>
>
>
>
> On Nov 13, 2019, at 5:50 PM, Christian Grün  wrote:
>
> Hi Giuseppe,
>
> When I try to run
> proc:system("/usr/local/bin/tesseract") I get the error [proc:code0001]
>
>
> On my system, I get the (expected) error…
>
> [proc:error] Cannot run program "/usr/local/bin/tesseract":
> CreateProcess error=2, Das System kann die angegebene Datei nicht finden
>
> …so we may need to find out what code 1 means in your case. Could you
> run the query with debugging enabled and pass us on the stack trace?
>
> And your error code indicates that you are using an older version of
> BaseX. Does it work with a more recent version? If not, what do you
> get?
>
> Best,
> Christian
>
>
>
>
>
> Similarly:
>
> proc:system("tesseract") returns [proc:error] Cannot run program "tesseract": 
> error=2, No such file or directory
>
> Similarly:
>
> proc:system("tesseract", (), map {"dir" : "/usr/local/bin/"}) returns 
> [proc:error] Cannot run program "tesseract" (in directory "/usr/local/bin"): 
> error=2, No such file or directory
>
> The command "tesseract" works at the command line. I suspect there may be a 
> problem with permissions: is there a way to overcome this error? Thanks.
>
> Best,
> Giuseppe
>
>
>


Re: [basex-talk] proc:system

2019-11-13 Thread Giuseppe G. A. Celano
Hi Christian,

Interestingly, proc:execute("/usr/local/bin/tesseract") works (I have BaseX 
9.2).

proc:system("/usr/local/bin/tesseract") returns the following:

> SET DEBUG true
DEBUG: true
> XQUERY proc:system("/usr/local/bin/tesseract")
org.basex.query.QueryException: 
at org.basex.query.func.proc.ProcSystem.item(ProcSystem.java:26)
at org.basex.query.expr.ParseExpr.value(ParseExpr.java:50)
at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:45)
at org.basex.query.scope.MainModule.iter(MainModule.java:97)
at org.basex.query.QueryContext.iter(QueryContext.java:332)
at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
at org.basex.core.cmd.AQuery.query(AQuery.java:107)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:257)
at org.basex.core.Command.execute(Command.java:93)
at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:92)
at org.basex.core.CLI.execute(CLI.java:76)
at org.basex.BaseX.console(BaseX.java:176)
at org.basex.BaseX.(BaseX.java:151)
at org.basex.BaseX.main(BaseX.java:42)
org.basex.core.BaseXException: Stopped at ., 1/12:
[proc:code0001] 
at org.basex.core.Command.execute(Command.java:94)
at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:92)
at org.basex.core.CLI.execute(CLI.java:76)
at org.basex.BaseX.console(BaseX.java:176)
at org.basex.BaseX.(BaseX.java:151)
at org.basex.BaseX.main(BaseX.java:42)
Caused by: org.basex.query.QueryException: 
at org.basex.query.func.proc.ProcSystem.item(ProcSystem.java:26)
at org.basex.query.expr.ParseExpr.value(ParseExpr.java:50)
at org.basex.query.expr.ParseExpr.iter(ParseExpr.java:45)
at org.basex.query.scope.MainModule.iter(MainModule.java:97)
at org.basex.query.QueryContext.iter(QueryContext.java:332)
at org.basex.query.QueryProcessor.iter(QueryProcessor.java:90)
at org.basex.core.cmd.AQuery.query(AQuery.java:107)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:257)
at org.basex.core.Command.execute(Command.java:93)
... 7 more
Stopped at ., 1/12:
[proc:code0001] 




> On Nov 13, 2019, at 5:50 PM, Christian Grün  wrote:
> 
> Hi Giuseppe,
> 
>> When I try to run
>> proc:system("/usr/local/bin/tesseract") I get the error [proc:code0001]
> 
> On my system, I get the (expected) error…
> 
> [proc:error] Cannot run program "/usr/local/bin/tesseract":
> CreateProcess error=2, Das System kann die angegebene Datei nicht finden
> 
> …so we may need to find out what code 1 means in your case. Could you
> run the query with debugging enabled and pass us on the stack trace?
> 
> And your error code indicates that you are using an older version of
> BaseX. Does it work with a more recent version? If not, what do you
> get?
> 
> Best,
> Christian
> 
> 
> 
> 
>> 
>> Similarly:
>> 
>> proc:system("tesseract") returns [proc:error] Cannot run program 
>> "tesseract": error=2, No such file or directory
>> 
>> Similarly:
>> 
>> proc:system("tesseract", (), map {"dir" : "/usr/local/bin/"}) returns 
>> [proc:error] Cannot run program "tesseract" (in directory "/usr/local/bin"): 
>> error=2, No such file or directory
>> 
>> The command "tesseract" works at the command line. I suspect there may be a 
>> problem with permissions: is there a way to overcome this error? Thanks.
>> 
>> Best,
>> Giuseppe
>> 
> 



Re: [basex-talk] proc:system

2019-11-13 Thread Christian Grün
Hi Giuseppe,

> When I try to run
> proc:system("/usr/local/bin/tesseract") I get the error [proc:code0001]

On my system, I get the (expected) error…

[proc:error] Cannot run program "/usr/local/bin/tesseract":
CreateProcess error=2, Das System kann die angegebene Datei nicht finden

…so we may need to find out what code 1 means in your case. Could you
run the query with debugging enabled and pass us on the stack trace?

And your error code indicates that you are using an older version of
BaseX. Does it work with a more recent version? If not, what do you
get?

Best,
Christian




>
> Similarly:
>
> proc:system("tesseract") returns [proc:error] Cannot run program "tesseract": 
> error=2, No such file or directory
>
> Similarly:
>
> proc:system("tesseract", (), map {"dir" : "/usr/local/bin/"}) returns 
> [proc:error] Cannot run program "tesseract" (in directory "/usr/local/bin"): 
> error=2, No such file or directory
>
> The command "tesseract" works at the command line. I suspect there may be a 
> problem with permissions: is there a way to overcome this error? Thanks.
>
> Best,
> Giuseppe
>


[basex-talk] proc:system

2019-11-13 Thread Giuseppe G. A. Celano
Hi,

When I try to run 

proc:system("/usr/local/bin/tesseract") I get the error [proc:code0001] 

Similarly:

proc:system("tesseract") returns [proc:error] Cannot run program "tesseract": 
error=2, No such file or directory

Similarly:

proc:system("tesseract", (), map {"dir" : "/usr/local/bin/"}) returns 
[proc:error] Cannot run program "tesseract" (in directory "/usr/local/bin"): 
error=2, No such file or directory

The command "tesseract" works at the command line. I suspect there may be a 
problem with permissions: is there a way to overcome this error? Thanks.

Best,
Giuseppe



Re: [basex-talk] proc:system and bash redirecting

2018-01-18 Thread Christian Grün
Hi Kristian,

You may be glad to hear that we recently had a similar requirement. I
have revised and extended the Process Module and uploaded a new
snapshot [1,2].

Looking forward to your feedback,
Christian

[1] http://docs.basex.org/wiki/Process_Module#proc:system
[2] http://files.basex.org/releases/latest/



On Wed, Jan 17, 2018 at 7:50 PM, Kristian Kankainen
 wrote:
> Hello!
>
> I need to redirect the content of a file into a program using stdin. In my
> shell I would do like this (silly example):
>
> wc < somefile
>
> Is this possible to do with proc:system? Giving "<" as an argument to the
> command doesn't work:
>
> proc:system("wc", ("<", "somefile")) outputs [BXPR0001] wc: <: No such file
> or directory
>
> Is there any way around this? The program I need to call can only read from
> stdin.
>
> Best regards,
> Kristian K
>


[basex-talk] proc:system and bash redirecting

2018-01-17 Thread Kristian Kankainen

Hello!

I need to redirect the content of a file into a program using stdin. In 
my shell I would do like this (silly example):


wc < somefile

Is this possible to do with proc:system? Giving "<" as an argument to 
the command doesn't work:


proc:system("wc", ("<", "somefile")) outputs [BXPR0001] wc: <: No such 
file or directory


Is there any way around this? The program I need to call can only read 
from stdin.


Best regards,
Kristian K



Re: [basex-talk] proc:system ?

2017-10-13 Thread jean-marc Mercier
Andy,

Thank you for your answer. Indeed, the length of my parameters are now much
more than the Windows limit.
I guess that creating a temporary file, then passing the name of the file
as parameters should solve the issue.
Cheers,
Jean-Marc

2017-10-13 10:42 GMT+02:00 Andy Bunce :

> Hi Jean-Marc,
>
> I have hit this kind of issue before and it is not BaseX specific. The
> problem is Windows(tm) limits [1]
> This is compounded by the Java call from proc:system passing in a copy of
> the environment of the current process [2].
> Mine has built up a large class path over time with my lib/custom
> experiements. My  `proc:property("java.class.path")` is nearly 4k
>
> You could try to "clean" your classpath and switch your file locations to
> shorter paths
>
> /Andy
>
> [1] https://support.microsoft.com/en-gb/help/830473/command-prom
> pt-cmd--exe-command-line-string-limitation
> [2] https://docs.oracle.com/javase/7/docs/api/java/lang/ProcessB
> uilder.html#environment()
>
> On 12 October 2017 at 11:19, jean-marc Mercier  > wrote:
>
>> Hello BaseX team,
>>
>> I am an extensive user of the proc:system BaseX command (and looking
>> forward for proc:fork !).
>>  I am using this command with in-memory arguments, it means that my way
>> of using it is :
>> proc:system("my_exe", $my_arguments_for_exe)
>>
>> $my_arguments_for_exe is an xml node serialized to string by BaseX. As my
>> test are getting more complex, the size of $my_arguments_for_exe are
>> increasing. It seems that we are reaching a limit now, since the compiler
>> refuses to pass arguments :
>>
>> "Stopped at CoDeFi_Interface.xqm, 44/22:
>> [BXPR] Cannot run program 
>> "C:\Jiheme\scientifique\recherche\CoDeFi\CoDeFi\CoDeFi.exe":
>> CreateProcess error=206, Nom de fichier ou extension trop long
>> "
>> Is there a way to bypass this ?
>>
>> Thank you for your answer,
>>
>> Cheers,
>>
>> Jean-Marc
>>
>
>


Re: [basex-talk] proc:system ?

2017-10-13 Thread Andy Bunce
Hi Jean-Marc,

I have hit this kind of issue before and it is not BaseX specific. The
problem is Windows(tm) limits [1]
This is compounded by the Java call from proc:system passing in a copy of
the environment of the current process [2].
Mine has built up a large class path over time with my lib/custom
experiements. My  `proc:property("java.class.path")` is nearly 4k

You could try to "clean" your classpath and switch your file locations to
shorter paths

/Andy

[1] https://support.microsoft.com/en-gb/help/830473/command-prom
pt-cmd--exe-command-line-string-limitation
[2] https://docs.oracle.com/javase/7/docs/api/java/lang/ProcessBuilder.html#
environment()

On 12 October 2017 at 11:19, jean-marc Mercier 
wrote:

> Hello BaseX team,
>
> I am an extensive user of the proc:system BaseX command (and looking
> forward for proc:fork !).
>  I am using this command with in-memory arguments, it means that my way of
> using it is :
> proc:system("my_exe", $my_arguments_for_exe)
>
> $my_arguments_for_exe is an xml node serialized to string by BaseX. As my
> test are getting more complex, the size of $my_arguments_for_exe are
> increasing. It seems that we are reaching a limit now, since the compiler
> refuses to pass arguments :
>
> "Stopped at CoDeFi_Interface.xqm, 44/22:
> [BXPR] Cannot run program "C:\Jiheme\scientifique\
> recherche\CoDeFi\CoDeFi\CoDeFi.exe": CreateProcess error=206, Nom de
> fichier ou extension trop long
> "
> Is there a way to bypass this ?
>
> Thank you for your answer,
>
> Cheers,
>
> Jean-Marc
>


[basex-talk] proc:system ?

2017-10-12 Thread jean-marc Mercier
Hello BaseX team,

I am an extensive user of the proc:system BaseX command (and looking
forward for proc:fork !).
 I am using this command with in-memory arguments, it means that my way of
using it is :
proc:system("my_exe", $my_arguments_for_exe)

$my_arguments_for_exe is an xml node serialized to string by BaseX. As my
test are getting more complex, the size of $my_arguments_for_exe are
increasing. It seems that we are reaching a limit now, since the compiler
refuses to pass arguments :

"Stopped at CoDeFi_Interface.xqm, 44/22:
[BXPR] Cannot run program
"C:\Jiheme\scientifique\recherche\CoDeFi\CoDeFi\CoDeFi.exe": CreateProcess
error=206, Nom de fichier ou extension trop long
"
Is there a way to bypass this ?

Thank you for your answer,

Cheers,

Jean-Marc