Re: [basex-talk] Improper use/potential bug error

2021-01-08 Thread Christian Grün
Sorry all for the surprises concerning the latest patch release. The
full distributions included old library files.

Both the library and the permission issues have been fixed.

Have fun, stay healthy,
Christian



On Fri, Jan 8, 2021 at 12:55 AM Eliúd Santiago Meza y Rivera
 wrote:
>
> Hi,
>
> I just update to the latest version of BaseX 9.4.6, and the web server now do 
> not refer correctly the link, checking every individually broken link, the 
> server response this message:
>
> I attach the code.
>
> In advance I appreciate your help.
>
> HTTP ERROR 500 java.lang.NoSuchMethodError: 
> org.basex.query.value.type.SeqType.cast(Lorg/basex/query/value/Value;Lorg/basex/query/QueryContext;Lorg/basex/query/StaticContext;Lorg/basex/util/InputInfo;)Lorg/basex/query/value/Value;
>
> URI:/app/static/pngkit_realistic-spider-web-png_1049388.png
> STATUS:500
> MESSAGE:java.lang.NoSuchMethodError: 
> org.basex.query.value.type.SeqType.cast(Lorg/basex/query/value/Value;Lorg/basex/query/QueryContext;Lorg/basex/query/StaticContext;Lorg/basex/util/InputInfo;)Lorg/basex/query/value/Value;
> SERVLET:RESTXQ
> CAUSED BY:java.lang.NoSuchMethodError: 
> org.basex.query.value.type.SeqType.cast(Lorg/basex/query/value/Value;Lorg/basex/query/QueryContext;Lorg/basex/query/StaticContext;Lorg/basex/util/InputInfo;)Lorg/basex/query/value/Value;
>
> Caused by:
>
> java.lang.NoSuchMethodError: 
> org.basex.query.value.type.SeqType.cast(Lorg/basex/query/value/Value;Lorg/basex/query/QueryContext;Lorg/basex/query/StaticContext;Lorg/basex/util/InputInfo;)Lorg/basex/query/value/Value;
> at org.basex.http.web.WebFunction.bind(WebFunction.java:137)
> at org.basex.http.restxq.RestXqFunction.bind(RestXqFunction.java:210)
> at org.basex.http.restxq.RestXqResponse.bind(RestXqResponse.java:60)
> at org.basex.http.web.WebResponse.create(WebResponse.java:61)
> at org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:73)
> at org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> at 
> org.eclipse.jetty.servlet.ServletHolder$NotAsync.service(ServletHolder.java:1443)
> at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:791)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:550)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:602)
> at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1612)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1434)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
> at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1582)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1349)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at 
> org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:738)
> at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:516)
> at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:556)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
> at 
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
> at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
> at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> at 
> org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> at 
> org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375)
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:773)
> at 
> org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:905)
> at java.lang.Thread.run(Unknown Source)
>
> 
> Powered by Jetty:// 

Re: [basex-talk] Improper use/potential bug error

2020-11-25 Thread Christian Grün
Hi Giuseppe,

The compilation info of all xquery:eval calls was added to the query
info; this resulted in a huge list of info messages. With the new
snapshot, only the compilation strings for the main expression will be
added to the info output [1].

As indicated, the error can be avoided in 9.4.5 if you disable the
info view panel, run the query on command-line without the -V flag,
etc.

Cheers,
Christian

[1] https://files.basex.org/releases/latest/


On Wed, Nov 25, 2020 at 1:03 PM Christian Grün
 wrote:
>
> One more hint:
>
> If you iterate over documents that are not stored in a database, you
> can save a lot of main memory by using fetch:xml instead of fn:doc.
>
> As fn:doc is deterministic, all intermediate documents must be kept in
> main memory in order to ensure that a future access to this file will
> return the same document node. If you use fetch:xml, the document
> reference will automatically be dropped in the next step of the
> iteration.
>
>
>
> On Sat, Nov 21, 2020 at 11:32 PM Giuseppe G. A. Celano
>  wrote:
> >
> > Hi,
> >
> > I got an "Improper use? Potential bug?” error (see below) with a (complex) 
> > query which actually works when applied to many files (but not to all). 
> > This is the query (temporary links):
> >
> > https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/scripts/03.00_normalize_spelling.xq
> >
> > applied to all files here:
> >
> > https://git.informatik.uni-leipzig.de/celano/latinnlp/-/tree/master/texts/parsed-texts
> >
> > Essentially, I have some words associated to an XPath expression + offsets 
> > (see, for example, [1]), which (words) I can retrieve by using 
> > substring($xpath, $start, $long) applied to [2]. My goal is to try to 
> > identify the text nodes the words are children of, because I want to check 
> > whether they are contained in some specific elements.
> >
> > Ciao,
> > Giuseppe
> >
> >
> > [1] 
> > https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/parsed-texts/phi2331.phi005.perseus-lat2/phi2331.phi005.perseus-lat2.tok01.xml
> > [2] 
> > https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/parsed-texts/phi2331.phi005.perseus-lat2/phi2331.phi005.perseus-lat2.xml
> > ---
> >
> > Error:
> > Improper use? Potential bug? Your feedback is welcome:
> > Contact: basex-talk@mailman.uni-konstanz.de
> > Version: BaseX 9.3.2
> > Java: Ubuntu, 11.0.9.1
> > OS: Linux, amd64
> > Stack Trace:
> > java.lang.ArrayIndexOutOfBoundsException: Maximum array size reached.
> > at org.basex.util.Array.newSize(Array.java:299)
> > at org.basex.util.Array.newSize(Array.java:288)
> > at org.basex.util.TokenBuilder.add(TokenBuilder.java:267)
> > at org.basex.util.TokenBuilder.add(TokenBuilder.java:252)
> > at org.basex.query.QueryInfo.toString(QueryInfo.java:142)
> > at org.basex.query.QueryContext.info(QueryContext.java:474)
> > at org.basex.query.QueryProcessor.info(QueryProcessor.java:272)
> > at org.basex.core.cmd.AQuery.extError(AQuery.java:212)
> > at org.basex.core.cmd.AQuery.query(AQuery.java:130)
> > 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.gui.GUI.exec(GUI.java:416)
> > at org.basex.gui.GUI.lambda$execute$4(GUI.java:359)
> > at java.base/java.lang.Thread.run(Thread.java:834)


Re: [basex-talk] Improper use/potential bug error

2020-11-25 Thread Christian Grün
One more hint:

If you iterate over documents that are not stored in a database, you
can save a lot of main memory by using fetch:xml instead of fn:doc.

As fn:doc is deterministic, all intermediate documents must be kept in
main memory in order to ensure that a future access to this file will
return the same document node. If you use fetch:xml, the document
reference will automatically be dropped in the next step of the
iteration.



On Sat, Nov 21, 2020 at 11:32 PM Giuseppe G. A. Celano
 wrote:
>
> Hi,
>
> I got an "Improper use? Potential bug?” error (see below) with a (complex) 
> query which actually works when applied to many files (but not to all). This 
> is the query (temporary links):
>
> https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/scripts/03.00_normalize_spelling.xq
>
> applied to all files here:
>
> https://git.informatik.uni-leipzig.de/celano/latinnlp/-/tree/master/texts/parsed-texts
>
> Essentially, I have some words associated to an XPath expression + offsets 
> (see, for example, [1]), which (words) I can retrieve by using 
> substring($xpath, $start, $long) applied to [2]. My goal is to try to 
> identify the text nodes the words are children of, because I want to check 
> whether they are contained in some specific elements.
>
> Ciao,
> Giuseppe
>
>
> [1] 
> https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/parsed-texts/phi2331.phi005.perseus-lat2/phi2331.phi005.perseus-lat2.tok01.xml
> [2] 
> https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/parsed-texts/phi2331.phi005.perseus-lat2/phi2331.phi005.perseus-lat2.xml
> ---
>
> Error:
> Improper use? Potential bug? Your feedback is welcome:
> Contact: basex-talk@mailman.uni-konstanz.de
> Version: BaseX 9.3.2
> Java: Ubuntu, 11.0.9.1
> OS: Linux, amd64
> Stack Trace:
> java.lang.ArrayIndexOutOfBoundsException: Maximum array size reached.
> at org.basex.util.Array.newSize(Array.java:299)
> at org.basex.util.Array.newSize(Array.java:288)
> at org.basex.util.TokenBuilder.add(TokenBuilder.java:267)
> at org.basex.util.TokenBuilder.add(TokenBuilder.java:252)
> at org.basex.query.QueryInfo.toString(QueryInfo.java:142)
> at org.basex.query.QueryContext.info(QueryContext.java:474)
> at org.basex.query.QueryProcessor.info(QueryProcessor.java:272)
> at org.basex.core.cmd.AQuery.extError(AQuery.java:212)
> at org.basex.core.cmd.AQuery.query(AQuery.java:130)
> 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.gui.GUI.exec(GUI.java:416)
> at org.basex.gui.GUI.lambda$execute$4(GUI.java:359)
> at java.base/java.lang.Thread.run(Thread.java:834)


Re: [basex-talk] Improper use/potential bug error

2020-11-25 Thread Christian Grün
Hi GIuseppe,

The error message indicates that the info that’s to be output in the
Info View panel gets too large. Does the error also occur if you
disable the Info View before running the query?

We’ll try to find the weak spot (usually, too large info output will
be chopped),
Christian


On Sat, Nov 21, 2020 at 11:32 PM Giuseppe G. A. Celano
 wrote:
>
> Hi,
>
> I got an "Improper use? Potential bug?” error (see below) with a (complex) 
> query which actually works when applied to many files (but not to all). This 
> is the query (temporary links):
>
> https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/scripts/03.00_normalize_spelling.xq
>
> applied to all files here:
>
> https://git.informatik.uni-leipzig.de/celano/latinnlp/-/tree/master/texts/parsed-texts
>
> Essentially, I have some words associated to an XPath expression + offsets 
> (see, for example, [1]), which (words) I can retrieve by using 
> substring($xpath, $start, $long) applied to [2]. My goal is to try to 
> identify the text nodes the words are children of, because I want to check 
> whether they are contained in some specific elements.
>
> Ciao,
> Giuseppe
>
>
> [1] 
> https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/parsed-texts/phi2331.phi005.perseus-lat2/phi2331.phi005.perseus-lat2.tok01.xml
> [2] 
> https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/parsed-texts/phi2331.phi005.perseus-lat2/phi2331.phi005.perseus-lat2.xml
> ---
>
> Error:
> Improper use? Potential bug? Your feedback is welcome:
> Contact: basex-talk@mailman.uni-konstanz.de
> Version: BaseX 9.3.2
> Java: Ubuntu, 11.0.9.1
> OS: Linux, amd64
> Stack Trace:
> java.lang.ArrayIndexOutOfBoundsException: Maximum array size reached.
> at org.basex.util.Array.newSize(Array.java:299)
> at org.basex.util.Array.newSize(Array.java:288)
> at org.basex.util.TokenBuilder.add(TokenBuilder.java:267)
> at org.basex.util.TokenBuilder.add(TokenBuilder.java:252)
> at org.basex.query.QueryInfo.toString(QueryInfo.java:142)
> at org.basex.query.QueryContext.info(QueryContext.java:474)
> at org.basex.query.QueryProcessor.info(QueryProcessor.java:272)
> at org.basex.core.cmd.AQuery.extError(AQuery.java:212)
> at org.basex.core.cmd.AQuery.query(AQuery.java:130)
> 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.gui.GUI.exec(GUI.java:416)
> at org.basex.gui.GUI.lambda$execute$4(GUI.java:359)
> at java.base/java.lang.Thread.run(Thread.java:834)


Re: [basex-talk] Improper Use? Potential bug?

2019-06-04 Thread Christian Grün
Thanks. As Michael indicated, a self-contained query that allows us to
reproduce the bug would be great.

Buddy Kresge  schrieb am Di., 4. Juni 2019, 14:57:

> Let me know what I can provide to assist.  I do have the entire stack
> trace if that will help.
>
>
>
> Buddy Kresge
>
> buddy.kre...@known2u.com
>
> o: 860-800-6677  ext: 501
>
> c: 860-986-4830
>
>
>
> *From:* BaseX-Talk  *On
> Behalf Of *Buddy Kresge
> *Sent:* Tuesday, June 4, 2019 8:55 AM
> *To:* Christian Grün 
> *Cc:* BaseX 
> *Subject:* Re: [basex-talk] Improper Use? Potential bug?
>
>
>
> It does exist.  One of our employees ran in on 9.2.2, they were the first
> to discover the issue.  Then I tried it on 9.2.0.
>
>
>
> Buddy Kresge
>
> buddy.kre...@known2u.com
>
> o: 860-800-6677  ext: 501
>
> c: 860-986-4830
>
>
>
> *From:* Christian Grün 
> *Sent:* Tuesday, June 4, 2019 8:53 AM
> *To:* Buddy Kresge 
> *Cc:* Michael Seiferle ; BaseX <
> basex-talk@mailman.uni-konstanz.de>
> *Subject:* Re: [basex-talk] Improper Use? Potential bug?
>
>
>
> Hi Buddy,
>
>
>
> The stack trace indicates that you are using BaseX 9.2.
>
>
>
> Could you please check if the bug persists with the latest version 9.2.2?
>
>
>
> Thanks in advance,
>
> Christian
>
>
>
>
>
>
>
> Buddy Kresge  schrieb am Di., 4. Juni 2019,
> 14:07:
>
> Do you want me to share the entire stack trace?  Or what is the best way
> to get you the information you need?
>
>
>
> Buddy Kresge
>
> buddy.kre...@known2u.com
>
> o: 860-800-6677  ext: 501
>
> c: 860-986-4830
>
>
>
> *From:* Michael Seiferle 
> *Sent:* Tuesday, June 4, 2019 6:15 AM
> *To:* Buddy Kresge 
> *Cc:* basex-talk@mailman.uni-konstanz.de
> *Subject:* Re: [basex-talk] Improper Use? Potential bug?
>
>
>
> Hi Buddy,
>
>
>
> that looks like a bug.
>
>
>
> Would you mind sharing your XQuery or a SSCE?
>
> I think this is definitely something we might want to have a look at :-)
>
>
>
> Best from Konstanz
>
>
>
> Michael
>
>
>
> Am 03.06.2019 um 13:12 schrieb Buddy Kresge :
>
>
>
> I am all of a sudden getting the below error (and things were working just
> fine – weird).  Works fine in 9.1.2 but not in 9.2.X.  Any guidance would
> be greatly appreciated.
>
>
>
> Note:  I tried to send you an email with the full stack trace, but the
> moderator rejected it because the email was too long.  I’ve cut down the
> size, but you now no longer have the full stack trace.  If you need the
> full stack trace, please let me know how you’d like that shared with you.
>
>
>
> Thanks,
>
> Buddy
>
>
>
> Error:
>
> Improper use? Potential bug? Your feedback is welcome:
>
> Contact: basex-talk@mailman.uni-konstanz.de
>
> Version: BaseX 9.2
>
> Java: AdoptOpenJdk, 1.8.0_202
>
> OS: Windows 10, amd64
>
> Stack Trace:
>
> java.lang.ArrayIndexOutOfBoundsException: 1
>
>at org.basex.query.expr.Preds.simplify(Preds.java:215)
>
>at org.basex.query.expr.Filter.optimize(Filter.java:82)
>
>at org.basex.query.expr.Filter.inline(Filter.java:260)
>
>at org.basex.query.expr.gflwor.ForLet.inline(ForLet.java:66)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.inline(GFLWOR.java:804)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.inlineLets(GFLWOR.java:339)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.optimize(GFLWOR.java:106)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:98)
>
>at org.basex.query.expr.If.compile(If.java:63)
>
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>
>at
> org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
>
>at
> org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
>
>at
> org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
>
>at org.basex.query.expr.Arr.compile(Arr.java:43)
>
>at
> org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>
>at
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>
>at
> org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>
>at
> org.basex.query.ex

Re: [basex-talk] Improper Use? Potential bug?

2019-06-04 Thread Christian Grün
Hi Buddy,

The stack trace indicates that you are using BaseX 9.2.

Could you please check if the bug persists with the latest version 9.2.2?

Thanks in advance,
Christian



Buddy Kresge  schrieb am Di., 4. Juni 2019, 14:07:

> Do you want me to share the entire stack trace?  Or what is the best way
> to get you the information you need?
>
>
>
> Buddy Kresge
>
> buddy.kre...@known2u.com
>
> o: 860-800-6677  ext: 501
>
> c: 860-986-4830
>
>
>
> *From:* Michael Seiferle 
> *Sent:* Tuesday, June 4, 2019 6:15 AM
> *To:* Buddy Kresge 
> *Cc:* basex-talk@mailman.uni-konstanz.de
> *Subject:* Re: [basex-talk] Improper Use? Potential bug?
>
>
>
> Hi Buddy,
>
>
>
> that looks like a bug.
>
>
>
> Would you mind sharing your XQuery or a SSCE?
>
> I think this is definitely something we might want to have a look at :-)
>
>
>
> Best from Konstanz
>
>
>
> Michael
>
>
>
> Am 03.06.2019 um 13:12 schrieb Buddy Kresge :
>
>
>
> I am all of a sudden getting the below error (and things were working just
> fine – weird).  Works fine in 9.1.2 but not in 9.2.X.  Any guidance would
> be greatly appreciated.
>
>
>
> Note:  I tried to send you an email with the full stack trace, but the
> moderator rejected it because the email was too long.  I’ve cut down the
> size, but you now no longer have the full stack trace.  If you need the
> full stack trace, please let me know how you’d like that shared with you.
>
>
>
> Thanks,
>
> Buddy
>
>
>
> Error:
>
> Improper use? Potential bug? Your feedback is welcome:
>
> Contact: basex-talk@mailman.uni-konstanz.de
>
> Version: BaseX 9.2
>
> Java: AdoptOpenJdk, 1.8.0_202
>
> OS: Windows 10, amd64
>
> Stack Trace:
>
> java.lang.ArrayIndexOutOfBoundsException: 1
>
>at org.basex.query.expr.Preds.simplify(Preds.java:215)
>
>at org.basex.query.expr.Filter.optimize(Filter.java:82)
>
>at org.basex.query.expr.Filter.inline(Filter.java:260)
>
>at org.basex.query.expr.gflwor.ForLet.inline(ForLet.java:66)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.inline(GFLWOR.java:804)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.inlineLets(GFLWOR.java:339)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.optimize(GFLWOR.java:106)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:98)
>
>at org.basex.query.expr.If.compile(If.java:63)
>
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>
>at
> org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
>
>at
> org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
>
>at
> org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
>
>at org.basex.query.expr.Arr.compile(Arr.java:43)
>
>at
> org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>
>at
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>
>at
> org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>
>at
> org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>
>at
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
>
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>
>at
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>
>at
> org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
>
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>
>at
> org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
>
>at
> org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
>
>at
> org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
>
>at org.basex.query.expr.Arr.compile(Arr.java:43)
>
>at
> org.basex.query.expr.gflwo

Re: [basex-talk] Improper Use? Potential bug?

2019-06-04 Thread Buddy Kresge
Do you want me to share the entire stack trace?  Or what is the best way to get 
you the information you need?

Buddy Kresge
buddy.kre...@known2u.com<mailto:buddy.kre...@known2u.com>
o: 860-800-6677  ext: 501
c: 860-986-4830

From: Michael Seiferle 
Sent: Tuesday, June 4, 2019 6:15 AM
To: Buddy Kresge 
Cc: basex-talk@mailman.uni-konstanz.de
Subject: Re: [basex-talk] Improper Use? Potential bug?

Hi Buddy,

that looks like a bug.

Would you mind sharing your XQuery or a SSCE?
I think this is definitely something we might want to have a look at :-)

Best from Konstanz

Michael


Am 03.06.2019 um 13:12 schrieb Buddy Kresge 
mailto:buddy.kre...@known2u.com>>:

I am all of a sudden getting the below error (and things were working just fine 
– weird).  Works fine in 9.1.2 but not in 9.2.X.  Any guidance would be greatly 
appreciated.

Note:  I tried to send you an email with the full stack trace, but the 
moderator rejected it because the email was too long.  I’ve cut down the size, 
but you now no longer have the full stack trace.  If you need the full stack 
trace, please let me know how you’d like that shared with you.

Thanks,
Buddy

Error:
Improper use? Potential bug? Your feedback is welcome:
Contact: 
basex-talk@mailman.uni-konstanz.de<mailto:basex-talk@mailman.uni-konstanz.de>
Version: BaseX 9.2
Java: AdoptOpenJdk, 1.8.0_202
OS: Windows 10, amd64
Stack Trace:
java.lang.ArrayIndexOutOfBoundsException: 1
   at org.basex.query.expr.Preds.simplify(Preds.java:215)
   at org.basex.query.expr.Filter.optimize(Filter.java:82)
   at org.basex.query.expr.Filter.inline(Filter.java:260)
   at org.basex.query.expr.gflwor.ForLet.inline(ForLet.java:66)
   at org.basex.query.expr.gflwor.GFLWOR.inline(GFLWOR.java:804)
   at org.basex.query.expr.gflwor.GFLWOR.inlineLets(GFLWOR.java:339)
   at org.basex.query.expr.gflwor.GFLWOR.optimize(GFLWOR.java:106)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:98)
   at org.basex.query.expr.If.compile(If.java:63)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
   at 
org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
   at 
org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
   at org.basex.query.expr.Arr.compile(Arr.java:43)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
   at 
org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
   at 
org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
   at org.basex.query.expr.Arr.compile(Arr.java:43)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
   at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
   at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
   at 
org.basex.query.func.Stat

Re: [basex-talk] Improper Use? Potential bug?

2019-06-04 Thread Michael Seiferle
Hi Buddy, 

that looks like a bug. 

Would you mind sharing your XQuery or a SSCE?
I think this is definitely something we might want to have a look at :-)

Best from Konstanz

Michael 

> Am 03.06.2019 um 13:12 schrieb Buddy Kresge :
> 
> I am all of a sudden getting the below error (and things were working just 
> fine – weird).  Works fine in 9.1.2 but not in 9.2.X.  Any guidance would be 
> greatly appreciated.
>  
> Note:  I tried to send you an email with the full stack trace, but the 
> moderator rejected it because the email was too long.  I’ve cut down the 
> size, but you now no longer have the full stack trace.  If you need the full 
> stack trace, please let me know how you’d like that shared with you.
>  
> Thanks,
> Buddy
>  
> Error:
> Improper use? Potential bug? Your feedback is welcome:
> Contact: basex-talk@mailman.uni-konstanz.de 
> 
> Version: BaseX 9.2
> Java: AdoptOpenJdk, 1.8.0_202
> OS: Windows 10, amd64
> Stack Trace: 
> java.lang.ArrayIndexOutOfBoundsException: 1
>at org.basex.query.expr.Preds.simplify(Preds.java:215)
>at org.basex.query.expr.Filter.optimize(Filter.java:82)
>at org.basex.query.expr.Filter.inline(Filter.java:260)
>at org.basex.query.expr.gflwor.ForLet.inline(ForLet.java:66)
>at org.basex.query.expr.gflwor.GFLWOR.inline(GFLWOR.java:804)
>at 
> org.basex.query.expr.gflwor.GFLWOR.inlineLets(GFLWOR.java:339)
>at org.basex.query.expr.gflwor.GFLWOR.optimize(GFLWOR.java:106)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:98)
>at org.basex.query.expr.If.compile(If.java:63)
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>at 
> org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
>at 
> org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
>at 
> org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
>at org.basex.query.expr.Arr.compile(Arr.java:43)
>at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>at 
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>at 
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>at 
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>at 
> org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
>at 
> org.basex.query.func.fn.FnFunctionLookup.opt(FnFunctionLookup.java:34)
>at 
> org.basex.query.func.StandardFunc.optimize(StandardFunc.java:77)
>at org.basex.query.expr.Arr.compile(Arr.java:43)
>at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>at 
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>at org.basex.query.expr.gflwor.ForLet.compile(ForLet.java:43)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:88)
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>at 
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>at 
> org.basex.query.func.StaticFuncCall.compile(StaticFuncCall.java:64)
>at org.basex.query.expr.gflwor.GFLWOR.compile(GFLWOR.java:94)
>at org.basex.query.func.StaticFunc.comp(StaticFunc.java:69)
>at 
> org.basex.query.func.StaticFuncs.compile(StaticFuncs.java:184)
> 

Re: [basex-talk] Improper use? Potential bug?

2017-02-06 Thread Rob Stapper
Hi Christian,

Thank you for the explanation. I interpreted what would happen obviously in a 
wrong way.
But since I have a working solution I'll use that one. 

Rob.

-Oorspronkelijk bericht-
Van: Christian Grün [mailto:christian.gr...@gmail.com] 
Verzonden: zondag 5 februari 2017 18:26
Aan: Rob Stapper
CC: BaseX
Onderwerp: Re: [basex-talk] Improper use? Potential bug?

Hi Rob,

Your queries are not equivalent. The hof:id function simply returns its 
argument (see [1]). In your example, it returns a function with two arguments 
($v1,$2v), which is then passed on to local:exists and bound to $exec. Later 
on, $exec is evaluated with a single argument, so this cannot work out (see the 
error message "1 argument supplied, 2
expected: $exec").

Christian

[1] http://docs.basex.org/wiki/Higher-Order_Functions_Module#hof:id



On Sun, Feb 5, 2017 at 4:26 PM, Rob Stapper <r.stap...@lijbrandt.nl> wrote:
> a) I've reduced it to its essence.
> b) I would expect both versions behave the same. Thus: ( 1,2) as 
> result
>
> -Oorspronkelijk bericht-
> Van: Christian Grün [mailto:christian.gr...@gmail.com]
> Verzonden: zondag 5 februari 2017 14:57
> Aan: Rob Stapper
> CC: BaseX
> Onderwerp: Re: [basex-talk] Improper use? Potential bug?
>
>> Shouldn't this work?
>
> I don’t think so. What result would you expect?
>
> Your query does quite a lot, and I can only guess what you think of it. 
> Please reduce it further and tell us a) what you think goes wrong and b) 
> which result you would expect.
>
>
>
>> -Oorspronkelijk bericht-
>> Van: Christian Grün [mailto:christian.gr...@gmail.com]
>> Verzonden: zaterdag 4 februari 2017 11:14
>> Aan: Rob Stapper
>> CC: BaseX
>> Onderwerp: Re: [basex-talk] Improper use? Potential bug?
>>
>>> My  program is heavily recursive so it is hard to create a running 
>>> snippet but I will try.
>>>
>>> Hopefully in the mean time you can have a look at the error.
>>
>> We definitely need some code to track this down. Thanks in advance.



Re: [basex-talk] Improper use? Potential bug?

2017-02-05 Thread Christian Grün
Hi Rob,

Your queries are not equivalent. The hof:id function simply returns
its argument (see [1]). In your example, it returns a function with
two arguments ($v1,$2v), which is then passed on to local:exists and
bound to $exec. Later on, $exec is evaluated with a single argument,
so this cannot work out (see the error message "1 argument supplied, 2
expected: $exec").

Christian

[1] http://docs.basex.org/wiki/Higher-Order_Functions_Module#hof:id



On Sun, Feb 5, 2017 at 4:26 PM, Rob Stapper <r.stap...@lijbrandt.nl> wrote:
> a) I've reduced it to its essence.
> b) I would expect both versions behave the same. Thus: ( 1,2) as result
>
> -Oorspronkelijk bericht-
> Van: Christian Grün [mailto:christian.gr...@gmail.com]
> Verzonden: zondag 5 februari 2017 14:57
> Aan: Rob Stapper
> CC: BaseX
> Onderwerp: Re: [basex-talk] Improper use? Potential bug?
>
>> Shouldn't this work?
>
> I don’t think so. What result would you expect?
>
> Your query does quite a lot, and I can only guess what you think of it. 
> Please reduce it further and tell us a) what you think goes wrong and b) 
> which result you would expect.
>
>
>
>> -Oorspronkelijk bericht-
>> Van: Christian Grün [mailto:christian.gr...@gmail.com]
>> Verzonden: zaterdag 4 februari 2017 11:14
>> Aan: Rob Stapper
>> CC: BaseX
>> Onderwerp: Re: [basex-talk] Improper use? Potential bug?
>>
>>> My  program is heavily recursive so it is hard to create a running
>>> snippet but I will try.
>>>
>>> Hopefully in the mean time you can have a look at the error.
>>
>> We definitely need some code to track this down. Thanks in advance.


Re: [basex-talk] Improper use? Potential bug?

2017-02-05 Thread Christian Grün
> Shouldn't this work?

I don’t think so. What result would you expect?

Your query does quite a lot, and I can only guess what you think of
it. Please reduce it further and tell us a) what you think goes wrong
and b) which result you would expect.



> -Oorspronkelijk bericht-
> Van: Christian Grün [mailto:christian.gr...@gmail.com]
> Verzonden: zaterdag 4 februari 2017 11:14
> Aan: Rob Stapper
> CC: BaseX
> Onderwerp: Re: [basex-talk] Improper use? Potential bug?
>
>> My  program is heavily recursive so it is hard to create a running
>> snippet but I will try.
>>
>> Hopefully in the mean time you can have a look at the error.
>
> We definitely need some code to track this down. Thanks in advance.