Re: [basex-talk] 404

2017-10-13 Thread Maximilian Gärber
Hi,

how does your web.xml look like?

Like this:

  
RESTXQ
/*
  

Because then every request is handled by the RESTXQ servlet only.

Br,
Max

2017-10-12 18:41 GMT+02:00 Xavier-Laurent SALVADOR
:
> Hi List,
>
> a question I have in mind since a long time: I have a Basex serving multiple
> project sites behind Nginx Redirections.
>
> I wrote a servlet for 404 errors in web.xml:
>
> 
>
>   404
>
>   /error404
>
> 
>
>
> and a function:
>
> declare
>
>   %rest:path("/error{$code}")
>
>   %output:method("html")
>
> But if i try to get "http://www.bla.fr/xzxzxzxzxz;, basex answers:
>
> "No function found that matches the request."
>
> How could I inhibit this behavior ?
>
> thanks !
>
> --
> Ce message peut contenir des informations réservées exclusivement à son
> destinataire. Toute diffusion  sans autorisation est interdite. Si vous n'en
> êtes pas le destinataire, merci de prendre contact avec l'expéditeur et de
> détruire ce message.
>
> This email may contain material for the sole use of the intended recipient.
> Any forwarding without express permission is prohibited. If you are not the
> intended recipient, please contact the sender and delete all copies.


Re: [basex-talk] How to identify the error when create database is unsuccessful

2017-10-13 Thread Dave Day

Nothing like answering your own posts, right?:-)

    Doing a bunch of different google searches, I was able to find one 
or two that was close to what it looked like I was encountering.


    Before doing the ftp get on the windoze box, if I issue a 'quote 
site sbd=(ibm-1047,iso8859-1)'


    I get much further.

    At least now it is parsing the file, as it is spitting out an error 
with one of the xml elements that I can readily see.


    -- Dave


On 10/13/2017 10:40 AM, Dave Day wrote:
    Greetings list,


    I'm getting the following error when I try to create a new 
database using the Basex gui on windows.


    "No text allowed before root element."

    This is the error I get if I set the parsing option to 'use 
internal XML parser'.



    If I uncheck that, I get

    "Content is not allowed in prolog."

    The  file I am using as input does not have a prolog statement.


    If I look at the .log folder, there is nothing in there.


    I suspect that the FTP process I used (microsoft ftp command from 
a dos window)  to move the data from an IBM mainframe to my desktop 
has done something to the file.


    Isn't there some way to turn on a diagnostic feature to see 
exactly what the parsing issue is?  I don't see anything in the file 
before the root element using Notepad.



    Thanks for any help,

    -- Dave Day










[basex-talk] How to identify the error when create database is unsuccessful

2017-10-13 Thread Dave Day

Greetings list,

    I'm getting the following error when I try to create a new database 
using the Basex gui on windows.


    "No text allowed before root element."

    This is the error I get if I set the parsing option to 'use 
internal XML parser'.



    If I uncheck that, I get

    "Content is not allowed in prolog."

    The  file I am using as input does not have a prolog statement.


    If I look at the .log folder, there is nothing in there.


    I suspect that the FTP process I used (microsoft ftp command from a 
dos window)  to move the data from an IBM mainframe to my desktop has 
done something to the file.


    Isn't there some way to turn on a diagnostic feature to see exactly 
what the parsing issue is?  I don't see anything in the file before the 
root element using Notepad.



    Thanks for any help,

    -- Dave Day







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
>