From bogus@does.not.exist.com Tue Aug 24 14:31:09 2021 From: bogus@does.not.exist.com () Date: Tue, 24 Aug 2021 12:31:09 -0000 Subject: No subject Message-ID: very much. On an unrelated note how may I bind a Java class instance to an external variable in xqj? Ciao Stefano On Jun 2, 2010 8:09 AM, "Lukas Kircher" wrote: Hey Stefano, sorry for the delay. I'm glad to tell you that the problem has been solved. At least I hope so ... I added the fix to our repository - feel free to check that out. If any further issues arise, please let us know. Thanks for your help on improving BaseX! Kind regards, Lukas --0016363b8f9879818d048840514a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

Dear Lukas

From what I have tested I can confirm that your fix works well. Thank yo= u so very much.

On an unrelated note=A0 how may I bind a Java class instance to an exter= nal variable in xqj?

Ciao
Stefano

On Jun 2, 2010 8:09 AM, "Lukas Kircher&qu= ot; <lukaskircher1 at googl= email.com> wrote:

Hey Stefano,

sorry for the delay. I'm glad to tell you that the problem has been sol= ved.
At least I hope so ...

I added the fix to our repository - feel free to check that out. If any fur= ther
issues arise, please let us know.

Thanks for your help on improving BaseX!

Kind regards,
Lukas

--0016363b8f9879818d048840514a-- From bogus@does.not.exist.com Tue Aug 24 14:31:09 2021 From: bogus@does.not.exist.com () Date: Tue, 24 Aug 2021 12:31:09 -0000 Subject: No subject Message-ID: Comparing version 6.3 to version 6.1 opening larger database 1s versus 54 s Complex XQuery over that database 0.14s versus 54 s Great, great, great. Thanks Jan Vl=C4=8Dinsk=C3=BD --=20 *Ing. Jan Vl=C4=8Dinsk=C3=BD* CAD programy Slune=C4=8Dnicov=C3=A1 338/3, 734 01 Karvin=C3=A1 R=C3=A1j, Czech Republic tel: +420-597 602 024; mob: +420-608 979 040 skype: janvlcinsky; GoogleTalk: jan.vlcinsky at gmail.com http://cz.linkedin.com/in/vlcinsky On Mon, Oct 25, 2010 at 10:11 AM, NewIntellectual wrote: > Congratulations to the hard working BaseX team for releasing BaseX 6.3. I > haven't found a more powerful or useful XML database system. I know of ve= ry > few open source software projects that are as attentive to problems, and = as > rapidly making improvements, as BaseX. > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > --0016e64bb7c2ea5ce504936e53c7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I fully agree
From technical point of view is new version very impressi= ve.
Comparing version 6.3 to version 6.1
opening larger databa= se 1s versus 54 s
Complex XQuery over that database 0.14s versus = 54 s

Great, great, great.

Thanks

Jan Vl=C4=8Dinsk=C3=BD

--= =C2=A0
Ing. Jan Vl=C4=8Dinsk=C3=BD
CAD programy
Slune=C4=8Dnic= ov=C3=A1 338/3, 734 01 Karvin=C3=A1 R=C3=A1j, Czech Republic
tel: +420-5= 97 602 024; mob: +420-608 979 040
skype: janvlcinsky; GoogleTalk:=C2=A0<= a href=3D"mailto:jan.vlcinsky at gmail.com" target=3D"_blank">jan.vlcinsky at gma= il.com
http://cz.= linkedin.com/in/vlcinsky


On Mon, Oct 25, 2010 at 10:11 AM, NewIntellectual <= span dir=3D"ltr"><newintell= ectual at gmail.com> wrote:
Congratulations to the hard working BaseX t= eam for releasing BaseX 6.3. I haven't found a more powerful or useful = XML database system. I know of very few open source software projects that = are as attentive to problems, and as rapidly making improvements, as BaseX.
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk at mailman.un= i-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk<= /a>


--0016e64bb7c2ea5ce504936e53c7-- From bogus@does.not.exist.com Tue Aug 24 14:31:09 2021 From: bogus@does.not.exist.com () Date: Tue, 24 Aug 2021 12:31:09 -0000 Subject: No subject Message-ID: one by one any more... Why you should use PAD Submit Worker? * Automatically submit your software to more than 1000 sites within an hour. * Daily update the download sites database * Intelligently track of the newest product listings. * Automatically identify most CAPTCHA codes with the accuracy rate reaching as high as 95%. * Helps you manage the accounts and passwords for download sites if needed. * Capable of displaying the completion report on each download site in details when it finishes the task. * Advanced submission mode for experienced users and have personalized settings by themselves. * Generate the PAD files in the standard form and provide the FTP client program to facilitate the upload of the newest PAD files to your own server. Contact us at info at sharesoftware24.com with any suggestions or partnership proposals you may have. We look forward to receiving your ideas and to continue improving our long term partnership. Kind regards, ShareSoftware24 http://www.sharesoftware24.com ------=_NextPart_000_00EB_01CB9138.3AFF0A20 Content-Type: text/html Content-Transfer-Encoding: 7bit Introducing PAD Submit Worker
 
This message:  Introducing PAD Submit Worker
Dear DBIS Group, University of Konstanz,

We're ShareSoftware24.com, one of the fastest growing download websites for Windows, Mac, Linux and PDA/Mobile software. You have received this message because we have listed one or more of your products on our website.

Let us ask you, do you still submit your product's PAD files manually to software websites and directories? NO MORE!!!
 
Today Introducing...
PAD Submit Worker

PAD Submit Worker is an advanced application designed to enable you to submit PAD files everywhere automatically. PAD Submit Worker helps shareware authors to easily submit PAD files to all major download sites, directories, and other targeted resources as fast as possible. From this moment, don't waste your time and money to submit PAD files one by one any more...


Why you should use PAD Submit Worker?
  • Automatically submit your software to more than 1000 sites within an hour.
  • Daily update the download sites database
  • Intelligently track of the newest product listings.
  • Automatically identify most CAPTCHA codes with the accuracy rate reaching as high as 95%.
  • Helps you manage the accounts and passwords for download sites if needed.
  • Capable of displaying the completion report on each download site in details when it finishes the task.
  • Advanced submission mode for experienced users and have personalized settings by themselves.
  • Generate the PAD files in the standard form and provide the FTP client program to facilitate the upload of the newest PAD files to your own server.
  •  
    Contact us at info at sharesoftware24.com with any suggestions or partnership proposals you may have. We look forward to receiving your ideas and to continue improving our long term partnership.

    Kind regards,

    ShareSoftware24
    http://www.sharesoftware24.com
    ------=_NextPart_000_00EB_01CB9138.3AFF0A20-- From bogus@does.not.exist.com Tue Aug 24 14:31:09 2021 From: bogus@does.not.exist.com () Date: Tue, 24 Aug 2021 12:31:09 -0000 Subject: No subject Message-ID: I general, the integration of JaxRx has been simplified and generalized a lot since Version 6.1. If you're working with the sources, you can checkout the main and api package and directly run the contained basexrest(.bat) script. Otherwise, you'll need to... 1. get basex.jar and basex-jar.api: http://basex.org/download 2. get one of the start scripts (win or linux/mac): https://svn.uni-konstanz.de/dbis/basex/trunk/api/etc/basexrest.bat https://svn.uni-konstanz.de/dbis/basex/trunk/api/etc/basexrest 3. get the external libraries referenced from the start script: https://svn.uni-konstanz.de/dbis/basex/trunk/api/lib/ Hope this helps, Christian 2010/12/13 Mahender Didwania : > Hi, > > Two things: > > 1. > Earlier I was using version 6.2.9 and the class StartJaxRx.java seemed to= work fine. =A0The need is to have the ability to invoke the server from a = script. > > I can't find the StartJaxRx in 6.3.3 any more. =A0Using the old class wit= h 6.3.3, the server says it started up fine, but when I attempt to access i= t over HTTP/REST, I get error for /basex/jax-rx (note that /basex/ is okay)= : > > Problem accessing /basex/jax-rx/. Reason: > > =A0 =A0tried to access method org.basex.server.ClientSession.execute(Ljav= a/lang/String;Ljava/io/OutputStream;)V from class org.basex.api.jaxrx.BXOut= put > > Caused by: > > java.lang.IllegalAccessError: tried to access method org.basex.server.Cli= entSession.execute(Ljava/lang/String;Ljava/io/OutputStream;)V from class or= g.basex.api.jaxrx.BXOutput > =A0 =A0 =A0 =A0at org.basex.api.jaxrx.BXOutput.exec(BXOutput.java:62) > =A0 =A0 =A0 =A0at org.basex.api.jaxrx.BXJaxRx$1.code(BXJaxRx.java:61) > =A0 =A0 =A0 =A0at org.basex.api.jaxrx.BXCode.run(BXCode.java:56) > =A0 =A0 =A0 =A0at org.basex.api.jaxrx.BXOutput.write(BXOutput.java:51) > =A0 =A0 =A0 =A0at com.sun.jersey.core.impl.provider.entity.StreamingOutpu= tProvider.writeTo(StreamingOutputProvider.java:71) > =A0 =A0 =A0 =A0at com.sun.jersey.core.impl.provider.entity.StreamingOutpu= tProvider.writeTo(StreamingOutputProvider.java:57) > =A0 =A0 =A0 =A0at com.sun.jersey.spi.container.ContainerResponse.write(Co= ntainerResponse.java:299) > =A0 =A0 =A0 =A0at com.sun.jersey.server.impl.application.WebApplicationIm= pl._handleRequest(WebApplicationImpl.java:1326) > =A0 =A0 =A0 =A0at com.sun.jersey.server.impl.application.WebApplicationIm= pl.handleRequest(WebApplicationImpl.java:1239) > =A0 =A0 =A0 =A0at com.sun.jersey.server.impl.application.WebApplicationIm= pl.handleRequest(WebApplicationImpl.java:1229) > =A0 =A0 =A0 =A0at com.sun.jersey.spi.container.servlet.WebComponent.servi= ce(WebComponent.java:420) > =A0 =A0 =A0 =A0at com.sun.jersey.spi.container.servlet.ServletContainer.s= ervice(ServletContainer.java:497) > =A0 =A0 =A0 =A0at com.sun.jersey.spi.container.servlet.ServletContainer.s= ervice(ServletContainer.java:684) > =A0 =A0 =A0 =A0at javax.servlet.http.HttpServlet.service(HttpServlet.java= :820) > =A0 =A0 =A0 =A0at org.mortbay.jetty.servlet.ServletHolder.handle(ServletH= older.java:511) > =A0 =A0 =A0 =A0at org.mortbay.jetty.servlet.ServletHandler.handle(Servlet= Handler.java:401) > =A0 =A0 =A0 =A0at org.mortbay.jetty.servlet.SessionHandler.handle(Session= Handler.java:182) > =A0 =A0 =A0 =A0at org.mortbay.jetty.handler.ContextHandler.handle(Context= Handler.java:766) > =A0 =A0 =A0 =A0at org.mortbay.jetty.handler.HandlerWrapper.handle(Handler= Wrapper.java:152) > =A0 =A0 =A0 =A0at org.mortbay.jetty.Server.handle(Server.java:326) > =A0 =A0 =A0 =A0at org.mortbay.jetty.HttpConnection.handleRequest(HttpConn= ection.java:542) > =A0 =A0 =A0 =A0at org.mortbay.jetty.HttpConnection$RequestHandler.headerC= omplete(HttpConnection.java:928) > =A0 =A0 =A0 =A0at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:= 549) > =A0 =A0 =A0 =A0at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.= java:212) > =A0 =A0 =A0 =A0at org.mortbay.jetty.HttpConnection.handle(HttpConnection.= java:404) > =A0 =A0 =A0 =A0at org.mortbay.jetty.bio.SocketConnector$Connection.run(So= cketConnector.java:228) > =A0 =A0 =A0 =A0at org.mortbay.thread.QueuedThreadPool$PoolThread.run(Queu= edThreadPool.java:582) > > > 2. > For version 6.1, you provide various files, including a .zip, on your web= site; for 6.3.3, you only provide basex.jar and basex-api.jar. =A0I had ear= lier created my own maven build to include all dependencies (including the = ones from java.net repository), but as noted above, I cannot get 6.3.3 to w= ork. =A0Could you please provide a .zip file for every release like you hav= e for 6.1 on your web-site (merely replacing BaseX61.jar with basex.jar and= BaseX61-jaxrx.jar with basex-api.jar (for 6.3.3 versions) does not seem to= help)? > > Thanks, > Mahender. > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > From bogus@does.not.exist.com Tue Aug 24 14:31:09 2021 From: bogus@does.not.exist.com () Date: Tue, 24 Aug 2021 12:31:09 -0000 Subject: No subject Message-ID: I general, the integration of JaxRx has been simplified and generalized a lot since Version 6.1. If you're working with the sources, you can checkout the main and api package and directly run the contained basexrest(.bat) script. Otherwise, you'll need to... 1. get basex.jar and basex-jar.api: http://basex.org/download 2. get one of the start scripts (win or linux/mac): https://svn.uni-konstanz.de/dbis/basex/trunk/api/etc/basexrest.bat https://svn.uni-konstanz.de/dbis/basex/trunk/api/etc/basexrest 3. get the external libraries referenced from the start script: https://svn.uni-konstanz.de/dbis/basex/trunk/api/lib/ Hope this helps, Christian 2010/12/13 Mahender Didwania : > Hi, > > Two things: > > 1. > Earlier I was using version 6.2.9 and the class StartJaxRx.java seemed to= work fine. =C2=A0The need is to have the ability to invoke the server from= a script. > > I can't find the StartJaxRx in 6.3.3 any more. =C2=A0Using the old class = with 6.3.3, the server says it started up fine, but when I attempt to acces= s it over HTTP/REST, I get error for /basex/jax-rx (note that /basex/ is ok= ay): > > Problem accessing /basex/jax-rx/. Reason: > > =C2=A0 =C2=A0tried to access method org.basex.server.ClientSession.execut= e(Ljava/lang/String;Ljava/io/OutputStream;)V from class org.basex.api.jaxrx= .BXOutput > > Caused by: > > java.lang.IllegalAccessError: tried to access method org.basex.server.Cli= entSession.execute(Ljava/lang/String;Ljava/io/OutputStream;)V from class or= g.basex.api.jaxrx.BXOutput > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.basex.api.jaxrx.BXOutput.exec(BXOutput.= java:62) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.basex.api.jaxrx.BXJaxRx$1.code(BXJaxRx.= java:61) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.basex.api.jaxrx.BXCode.run(BXCode.java:= 56) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.basex.api.jaxrx.BXOutput.write(BXOutput= .java:51) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.jersey.core.impl.provider.entity.St= reamingOutputProvider.writeTo(StreamingOutputProvider.java:71) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.jersey.core.impl.provider.entity.St= reamingOutputProvider.writeTo(StreamingOutputProvider.java:57) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.jersey.spi.container.ContainerRespo= nse.write(ContainerResponse.java:299) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.jersey.server.impl.application.WebA= pplicationImpl._handleRequest(WebApplicationImpl.java:1326) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.jersey.server.impl.application.WebA= pplicationImpl.handleRequest(WebApplicationImpl.java:1239) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.jersey.server.impl.application.WebA= pplicationImpl.handleRequest(WebApplicationImpl.java:1229) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.jersey.spi.container.servlet.WebCom= ponent.service(WebComponent.java:420) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.jersey.spi.container.servlet.Servle= tContainer.service(ServletContainer.java:497) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at com.sun.jersey.spi.container.servlet.Servle= tContainer.service(ServletContainer.java:684) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at javax.servlet.http.HttpServlet.service(Http= Servlet.java:820) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.servlet.ServletHolder.han= dle(ServletHolder.java:511) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.servlet.ServletHandler.ha= ndle(ServletHandler.java:401) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.servlet.SessionHandler.ha= ndle(SessionHandler.java:182) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.handler.ContextHandler.ha= ndle(ContextHandler.java:766) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.handler.HandlerWrapper.ha= ndle(HandlerWrapper.java:152) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.Server.handle(Server.java= :326) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.HttpConnection.handleRequ= est(HttpConnection.java:542) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.HttpConnection$RequestHan= dler.headerComplete(HttpConnection.java:928) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.HttpParser.parseNext(Http= Parser.java:549) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.HttpParser.parseAvailable= (HttpParser.java:212) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.HttpConnection.handle(Htt= pConnection.java:404) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.jetty.bio.SocketConnector$Conne= ction.run(SocketConnector.java:228) > =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.mortbay.thread.QueuedThreadPool$PoolThr= ead.run(QueuedThreadPool.java:582) > > > 2. > For version 6.1, you provide various files, including a .zip, on your web= site; for 6.3.3, you only provide basex.jar and basex-api.jar. =C2=A0I had = earlier created my own maven build to include all dependencies (including t= he ones from java.net repository), but as noted above, I cannot get 6.3.3 t= o work. =C2=A0Could you please provide a .zip file for every release like y= ou have for 6.1 on your web-site (merely replacing BaseX61.jar with basex.j= ar and BaseX61-jaxrx.jar with basex-api.jar (for 6.3.3 versions) does not s= eem to help)? > > Thanks, > Mahender. > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > From bogus@does.not.exist.com Tue Aug 24 14:31:09 2021 From: bogus@does.not.exist.com () Date: Tue, 24 Aug 2021 12:31:09 -0000 Subject: No subject Message-ID: parameter applies only where wrap=3Dyes (it is ignored when wrap=3Dno) output does allow media-type to be specified...interestingly, the spec you refer to says the media-type can contain a value in line with RFC2046, that RFC happens to include textual media-types as well (e.g., text/plain) as XM= L media-types. So, I would propose to use a) the situation as it is today (wrap=3Dno, wrap=3Dyes dictating whether jax-rx:result and jax-rx:results are used to wrap) but also b) to be able to override the media-type independently of wrap parameter's value using output=3Dmedia-type=3Dtext%2Fplain or output=3Dmedia-type=3Dapplication%2fxml for example. Whether to use text/p= lain for wrap=3Dno becomes non-critical then (because of the ability to override it) and leaving it at text/plain as default is probably fine. Thanks. On Mon, Jan 31, 2011 at 11:01 AM, Christian Gr=FCn wrote: > > Okay, I thought setting output to application/xml but wrap=3Dno will me= an > the > > person writing the query is taking the responsibility that they do not > want > > results to be wrapped but know the result is xml so forcing the output = to > be > > application/xml (so that the response mime-type is set to application/x= ml > in > > this case)...what are the valid values for output parameter? > > All parameters are defined in the W3 specs: > http://www.w3.org/TR/xslt-xquery-serialization/ > > Please browse our JAX-RX docs for some usage examples: > http://docs.basex.org/wiki/JAX-RX_API > > > An invocation like > > http://localhost:8984/basex/jax-rx?wrap=3Dno&query=3D1+to+10&output=3Dt= ext/xmlor > > > http://localhost:8984/basex/jax-rx?wrap=3Dyes&query=3D1+to+10&output=3Dte= xt/xml > > (or text%2Fxml) results in: > > Yes, I see that there's some need to work on the response media type. > I have two solutions in mind: > > a) All textual results of "query" and "run" could be returned as > application/xml, no matter what value has been assigned to "wrap". > This would mean that all non-XML query results (e.g., resulting from a > XQuery like "1 to 10") would be handles as XML, too. > > b) This is one is similar to your approach: an additional JAX-RX > parameter could be introduced to explicitly overwrite the resulting > media type. Example: > > http://localhost:8984/basex/jax-rx?wrap=3Dyes&query=3D1&media=3Dapplicat= ion/xml > > What do you, and others, think? > > Both changes are not BaseX-centric, but have to be made in the JAX-RX > interface, so this might take some more time; but I'll definitely add > this to our internal issue tracker. > > Christian > --0016e64c2a1a56ee16049b22f778 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable The scope of this posting is only xquery.

    From your discussion on ou= tput parameter, it appears to me that that parameter applies only where wra= p=3Dyes (it is ignored when wrap=3Dno)

    output does allow media-type = to be specified...interestingly, the spec you refer to says the media-type = can contain a value in line with RFC2046, that RFC happens to include textu= al media-types as well (e.g., text/plain) as XML media-types.
    So, I would propose to use a) the situation as it is today (wrap=3Dno, wrap= =3Dyes dictating whether jax-rx:result and jax-rx:results are used to wrap)= but also b) to be able to override the media-type independently of wrap pa= rameter's value using output=3Dmedia-type=3Dtext%2Fplain or output=3Dme= dia-type=3Dapplication%2fxml for example.=A0 Whether to use text/plain for = wrap=3Dno becomes non-critical then (because of the ability to override it)= and leaving it at text/plain as default is probably fine.

    Thanks.



    On Mon, Jan 31, 2011 = at 11:01 AM, Christian Gr=FCn <christian.gruen at gmail.com> wrote:
    > Okay, I thought setting output to application/xml bu= t wrap=3Dno will mean the
    > person writing the query is taking the responsibility that they do not= want
    > results to be wrapped but know the result is xml so forcing the output= to be
    > application/xml (so that the response mime-type is set to application/= xml in
    > this case)...what are the valid values for output parameter?

    All parameters are defined in the W3 specs:
    =A0http://www.w3.org/TR/xslt-xquery-serialization/

    Please browse our JAX-RX docs for some usage examples:
    =A0htt= p://docs.basex.org/wiki/JAX-RX_API
    Yes, I see that there's some need to work on the response media t= ype.
    I have two solutions in mind:

    a) All textual results of "query" and "run" could be re= turned as
    application/xml, no matter what value has been assigned to "wrap"= .
    This would mean that all non-XML query results (e.g., resulting from a
    XQuery like "1 to 10") would be handles as XML, too.

    b) This is one is similar to your approach: an additional JAX-RX
    parameter could be introduced to explicitly overwrite the resulting
    media type. Example:

    =A0http://localhost:8984/basex/= jax-rx?wrap=3Dyes&query=3D1&media=3Dapplication/xml

    What do you, and others, think?

    Both changes are not BaseX-centric, but have to be made in the JAX-RX
    interface, so this might take some more time; but I'll definitely add this to our internal issue tracker.

    Christian

    --0016e64c2a1a56ee16049b22f778-- From bogus@does.not.exist.com Tue Aug 24 14:31:09 2021 From: bogus@does.not.exist.com () Date: Tue, 24 Aug 2021 12:31:09 -0000 Subject: No subject Message-ID: BaseX's behavior is somehow influenced by whether a document uses namespaces or not? Is that true? In other words, BaseX shows different performance depending on whether prefixes are used? Why is that so? Why did you not choose a representation that abstracts away namespace prefixes and treats all elements as if they were in a namespace? Logically, it's not a higher burden (storing a pair (index, string) is just as efficient as storing or indexing a string); and BaseX is not required to output XML that preserves prefixes and default namespaces when a query is made; any equivalent XML that expresses the query result is acceptable. I'm wondering if the correctness problems we're seeing with respect to namespaces may be due to this decision of treating namespaces specially rather than the default case. - Godmar From bogus@does.not.exist.com Tue Aug 24 14:31:09 2021 From: bogus@does.not.exist.com () Date: Tue, 24 Aug 2021 12:31:09 -0000 Subject: No subject Message-ID: dropped and synthetically generated during the serialization process; and that our implementation would look much cleaner. From bogus@does.not.exist.com Tue Aug 24 14:31:09 2021 From: bogus@does.not.exist.com () Date: Tue, 24 Aug 2021 12:31:09 -0000 Subject: No subject Message-ID: people (there is some reason why no other XQuery processor chose this solution =96 and why so many mailing list entries from implementations other than BaseX focus so much an namespaces..). Some more introductory details on various namespace intricacies, and the discussion around it, are e.g. found at: http://www.jclark.com/xml/xmlns.htm http://www.stylusstudio.com/xmldev/201004/bythread.html Christian From m.lettere at gmail.com Tue Aug 3 10:06:56 2021 From: m.lettere at gmail.com (Marco Lettere) Date: Tue, 3 Aug 2021 10:06:56 +0200 Subject: [basex-talk] PR for DBA issue Message-ID: Dear Christian, I've just submitted a PR [1] that fixes an issue occurring with some combination of browser/proxy and that we stumbled upon in 9.5.3 beta. I attach a picture that shows how it looks like in DBA. To make error disappear it's sufficient to put a . in the query input. We propose to make query parameter optional in signature of RestXQ handling that call. Let us know if any further info is required. Regards, Marco. [1] https://github.com/BaseXdb/basex/pull/2030 -------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 134785 bytes Desc: not available URL: From jonathan.robie at gmail.com Thu Aug 12 13:58:04 2021 From: jonathan.robie at gmail.com (Jonathan Robie) Date: Thu, 12 Aug 2021 07:58:04 -0400 Subject: [basex-talk] XProc? Message-ID: What hooks does BaseX provide for XProc? Where can I find examples of BaseX use in an XProc pipeline? Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.honnen at gmx.de Thu Aug 12 14:06:07 2021 From: martin.honnen at gmx.de (Martin Honnen) Date: Thu, 12 Aug 2021 14:06:07 +0200 Subject: [basex-talk] XProc? In-Reply-To: References: Message-ID: Am 12.08.2021 um 13:58 schrieb Jonathan Robie: > What hooks does BaseX provide for XProc?? Where can I find examples of > BaseX use in an XProc pipeline? > Morgana XProc for XProc 1 has support for using BaseX for the p:xquery step: https://www.xml-project.com/documentation/morgana-userguide/morganaxproc_enhance/#xquery From jonathan.robie at gmail.com Thu Aug 12 14:14:19 2021 From: jonathan.robie at gmail.com (Jonathan Robie) Date: Thu, 12 Aug 2021 08:14:19 -0400 Subject: [basex-talk] Pretty-print the -V optimized query? See what indexes are used? Message-ID: Is there a way to pretty-print the optimized query from the -V option? What is the best way to see which indexes are being used? Jonathan -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit.imsieke at le-tex.de Thu Aug 12 14:33:53 2021 From: gerrit.imsieke at le-tex.de (Imsieke, Gerrit, le-tex) Date: Thu, 12 Aug 2021 14:33:53 +0200 Subject: [basex-talk] XProc? In-Reply-To: References: Message-ID: <81ee8ed9-5f2b-9792-b449-269c2e888a06@le-tex.de> We couple it more loosely using RESTXQ endpoints and HTTP requests. On 12.08.2021 13:58, Jonathan Robie wrote: > What hooks does BaseX provide for XProc?? Where can I find examples of > BaseX use in an XProc pipeline? > > Jonathan From mrdziuban at gmail.com Thu Aug 12 15:00:42 2021 From: mrdziuban at gmail.com (Matthew Dziuban) Date: Thu, 12 Aug 2021 09:00:42 -0400 Subject: [basex-talk] org.basex.core.BaseXException with no error message Message-ID: Hi all, I'm using the java ClientSession class defined in the basex-api module and I'm seeing intermittent org.basex.core.BaseXException errors with an empty error message when executing long-running read queries or CREATE DB commands. The stack trace of the most recent error points to ClientSession.receive ( https://github.com/BaseXdb/basex/blob/9.5.2/basex-core/src/main/java/org/basex/api/client/ClientSession.java#L190 ) org.basex.core.BaseXException: org.basex.api.client.ClientSession.receive(ClientSession.java:190) org.basex.api.client.ClientSession.send(ClientSession.java:178) org.basex.api.client.ClientSession.send(ClientSession.java:215) org.basex.api.client.ClientSession.create(ClientSession.java:128) ... Unfortunately since the message is empty it's difficult to debug what's going wrong. I've checked the log files in basex/data/.logs but haven't found any information about the failure. Is there another place I can look? Or do you have any other recommendations for debugging the errors? Thanks in advance, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.gruen at gmail.com Thu Aug 12 19:59:23 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Thu, 12 Aug 2021 19:59:23 +0200 Subject: [basex-talk] org.basex.core.BaseXException with no error message In-Reply-To: References: Message-ID: Hi Matt, It?s difficult to give a general answer. Do you think you can share a reproducible test case with us? Thanks in advance Christian On Thu, Aug 12, 2021 at 3:01 PM Matthew Dziuban wrote: > > Hi all, > > I'm using the java ClientSession class defined in the basex-api module and I'm seeing intermittent org.basex.core.BaseXException errors with an empty error message when executing long-running read queries or CREATE DB commands. The stack trace of the most recent error points to ClientSession.receive (https://github.com/BaseXdb/basex/blob/9.5.2/basex-core/src/main/java/org/basex/api/client/ClientSession.java#L190) > > org.basex.core.BaseXException: > org.basex.api.client.ClientSession.receive(ClientSession.java:190) > org.basex.api.client.ClientSession.send(ClientSession.java:178) > org.basex.api.client.ClientSession.send(ClientSession.java:215) > org.basex.api.client.ClientSession.create(ClientSession.java:128) > ... > > Unfortunately since the message is empty it's difficult to debug what's going wrong. I've checked the log files in basex/data/.logs but haven't found any information about the failure. Is there another place I can look? Or do you have any other recommendations for debugging the errors? > > Thanks in advance, > Matt From christian.gruen at gmail.com Thu Aug 12 20:04:13 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Thu, 12 Aug 2021 20:04:13 +0200 Subject: [basex-talk] Pretty-print the -V optimized query? See what indexes are used? In-Reply-To: References: Message-ID: Hi Jonathan, > Is there a way to pretty-print the optimized query from the -V option? Currently no. Personally, I?m not aware of any XQuery code formatter that works really well. Maybe anyone else on the list does? > What is the best way to see which indexes are being used? The usual way is to parse the compilation output for "apply ... index" entries. Our documentation might give you some more hints [1]. Cheers, Christian [1] https://docs.basex.org/wiki/Indexes From tmarnell at orbiscascade.org Fri Aug 13 00:12:42 2021 From: tmarnell at orbiscascade.org (Tamara Marnell) Date: Thu, 12 Aug 2021 15:12:42 -0700 Subject: [basex-talk] Can XQuery return unique values present across multiple databases? Message-ID: Short question: Is it possible to write an XQuery FLWOR statement that can return a set of unique values present across multiple databases? Long question: Our new website in development displays EAD finding aids stored across 45 databases in BaseX. I've built "facet" databases that index terms in the EADs from controlled vocabularies like subjects, places, personal names, etc. The indexes follow this structure, where each EAD node contains a unique identifier: 12345 67890 abcde {etc.} In the search interface, users can select multiple facets to apply to one search. For example, they could browse database 12 for EADs with the subject "Literature" *and* the place "Oregon," etc. I currently use the REST server to run an XQuery file that loops through each selected facet and prints *all* EAD IDs for each submitted term and database. Then after results are returned, I use PHP to count occurences of each EAD and print them only if the total count matches the count of facets used. declare variable $d as xs:string external; declare variable $f as xs:string external; let $db_ids := tokenize($d, '\|') return { for $facet in tokenize($f, '\|') let $split := tokenize($facet, ':') let $facet_type := $split[1] let $facet_term := $split[2] let $facet_db := 'facet-' || $facet_type return { for $ead in db:open($facet_db)/terms/term[@text=$facet_term and @db=$db_ids]/ead return $ead } } So in the hypothetical example above, I'd pass "12" as d (or multiple selected databases separated by bars) and "subject:Literature|geogname:Oregon" as f, and I'd get back a document like: 12345 67890 12345 The count of "12345" will equal the count of the user's selected facets, so that result will be printed, but 67890 will not. Is there a more efficient way to do this? I'd prefer the XQuery to return only the EADs that meet all criteria, so only 12345 would be returned because it's in facet-subject under Literature *and* in facet-geogname under "Oregon," and then I don't have to do any post-processing. -Tamara -- Tamara Marnell IT Manager Orbis Cascade Alliance (orbiscascade.org ) Pronouns: she/her/hers -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.honnen at gmx.de Fri Aug 13 08:26:12 2021 From: martin.honnen at gmx.de (Martin Honnen) Date: Fri, 13 Aug 2021 08:26:12 +0200 Subject: [basex-talk] Can XQuery return unique values present across multiple databases? In-Reply-To: References: Message-ID: <16ad6d5e-0df4-208c-cc35-b1c82d508518@gmx.de> Am 13.08.2021 um 00:12 schrieb Tamara Marnell: > Short question: Is it possible to write an XQuery FLWOR statement that > can return a set of unique values present across multiple databases? > > Long question: Our new website in development displays EAD finding > aids stored across 45 databases in BaseX. I've built "facet" databases > that index terms in the EADs from controlled vocabularies like > subjects, places, personal names, etc. The indexes follow this > structure, where each EAD node contains a unique identifier: > > > ? > ??? 12345 > ??? 67890 > ? > ? > ??? abcde > ? > ? {etc.} > > > In the search interface, users can select multiple facets to apply to > one search. For example, they could browse database 12 for EADs with > the subject "Literature" /and/ the place "Oregon," etc. > > I currently use the REST server to run an XQuery file that loops > through each selected facet and prints /all/ EAD IDs for each > submitted term and database. Then after results are returned, I use > PHP to count occurences of each EAD and print them only if the total > count matches the count of facets used. > > declare variable $d as xs:string external; > declare variable $f as xs:string external; > let $db_ids := tokenize($d, '\|') > return { > for $facet in tokenize($f, '\|') > ? let $split := tokenize($facet, ':') > ? let $facet_type := $split[1] > ? let $facet_term := $split[2] > ? let $facet_db := 'facet-' || $facet_type > ? return { > ? ? for $ead in db:open($facet_db)/terms/term[@text=$facet_term and > @db=$db_ids]/ead > ? ? ? return $ead > ? } > } > > So in the hypothetical example above, I'd pass "12" as d (or multiple > selected databases separated by bars) and > "subject:Literature|geogname:Oregon" as f, and I'd get back a document > like: > > > ? > ??? 12345 > ??? 67890 > ? > ? > ??? 12345 > ? > > > The count of "12345" will equal the count of the user's selected > facets, so that result will be printed, but 67890 will not. > > Is there a more efficient way to do this? I'd prefer the XQuery to > return only the EADs that meet all criteria, so only 12345 would be > returned because it's in facet-subject under Literature /and/ in > facet-geogname under "Oregon," and then I don't have to do any > post-processing. > I think you can use fold-left to reduce the found eas while selecting them: let $db_ids := tokenize($d, '\|') return ??? { ??????? let $facet-maps := ????????? fold-left( ??????????? for $facet in tokenize($f, '\|') ????????????? let $split := tokenize($facet, ':') ????????????? let $facet_type := $split[1] ????????????? let $facet_term := $split[2] ????????????? let $facet_db := 'facet-' || $facet_type ??????????? return ????????????? map:merge( ????????????????? for $ead in db:open($facet_db)/terms/term[@text=$facet_term and @db=$db_ids]/ead ????????????????? return map:entry(string($ead), map { 'node' : $ead, 'type' : $facet_type, 'term' : $facet_term }) ????????????????? , ????????????????? map { 'duplicates' : 'combine' } ????????????? ) ?????????? , ?????????? map{}, ?????????? function($ams, $m) { ?????????????? for $m1 in $ams ?????????????? return map:remove($m1, map:keys($m1)[not(. = map:keys($m))]), ?????????????? $m ?????????? } ????????? ) ??????? return ??????????? for $m in $facet-maps[exists(map:keys(.))] ??????????? let $ead1 := $m?*[1] ??????????? return ??????????????? ??????????????? { ??????????????????? $m?*?node ??????????????? } ??????????????? ??? } -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamjameslaw at gmail.com Fri Aug 13 12:24:12 2021 From: adamjameslaw at gmail.com (Adam Law) Date: Fri, 13 Aug 2021 18:24:12 +0800 Subject: [basex-talk] Polling break for loop In-Reply-To: References: Message-ID: If polling a url n times and breaking if response is 'completed', is the best to approach to use try catch and error() to get around immutability? I need the full response on complete so I redo the last http get. It is not a biggie requesting twice. Adam On Fri., 13 Aug. 2021, 6:00 pm , wrote: > Send BaseX-Talk mailing list submissions to > basex-talk at mailman.uni-konstanz.de > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > or, via email, send a message with subject or body 'help' to > basex-talk-request at mailman.uni-konstanz.de > > You can reach the person managing the list at > basex-talk-owner at mailman.uni-konstanz.de > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of BaseX-Talk digest..." > > > Today's Topics: > > 1. XProc? (Jonathan Robie) > 2. Re: XProc? (Martin Honnen) > 3. Pretty-print the -V optimized query? See what indexes are > used? (Jonathan Robie) > 4. Re: XProc? (Imsieke, Gerrit, le-tex) > 5. org.basex.core.BaseXException with no error message > (Matthew Dziuban) > 6. Re: org.basex.core.BaseXException with no error message > (Christian Gr?n) > 7. Re: Pretty-print the -V optimized query? See what indexes are > used? (Christian Gr?n) > 8. Can XQuery return unique values present across multiple > databases? (Tamara Marnell) > 9. Re: Can XQuery return unique values present across multiple > databases? (Martin Honnen) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 12 Aug 2021 07:58:04 -0400 > From: Jonathan Robie > To: BaseX > Subject: [basex-talk] XProc? > Message-ID: > < > CAOkFc+vMLcdXFUZBUvZZVLF8Wc3nKSLASpPKFWV_WPh7hRnEFw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > What hooks does BaseX provide for XProc? Where can I find examples of > BaseX use in an XProc pipeline? > > Jonathan > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210812/6bda64ce/attachment-0001.htm > > > > ------------------------------ > > Message: 2 > Date: Thu, 12 Aug 2021 14:06:07 +0200 > From: Martin Honnen > To: basex-talk at mailman.uni-konstanz.de > Subject: Re: [basex-talk] XProc? > Message-ID: > Content-Type: text/plain; charset=utf-8; format=flowed > > > Am 12.08.2021 um 13:58 schrieb Jonathan Robie: > > What hooks does BaseX provide for XProc?? Where can I find examples of > > BaseX use in an XProc pipeline? > > > > Morgana XProc for XProc 1 has support for using BaseX for the p:xquery > step: > > https://www.xml-project.com/documentation/morgana-userguide/morganaxproc_enhance/#xquery > > > > ------------------------------ > > Message: 3 > Date: Thu, 12 Aug 2021 08:14:19 -0400 > From: Jonathan Robie > To: BaseX > Subject: [basex-talk] Pretty-print the -V optimized query? See what > indexes are used? > Message-ID: > < > CAOkFc+v55p2tC8qfPSoGtezGOn-3zwEyRLpQQ2d1U6pCAY+G+w at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Is there a way to pretty-print the optimized query from the -V option? > > What is the best way to see which indexes are being used? > > Jonathan > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210812/1198b13f/attachment-0001.htm > > > > ------------------------------ > > Message: 4 > Date: Thu, 12 Aug 2021 14:33:53 +0200 > From: "Imsieke, Gerrit, le-tex" > To: basex-talk at mailman.uni-konstanz.de > Subject: Re: [basex-talk] XProc? > Message-ID: <81ee8ed9-5f2b-9792-b449-269c2e888a06 at le-tex.de> > Content-Type: text/plain; charset=utf-8; format=flowed > > We couple it more loosely using RESTXQ endpoints and HTTP requests. > > On 12.08.2021 13:58, Jonathan Robie wrote: > > What hooks does BaseX provide for XProc?? Where can I find examples of > > BaseX use in an XProc pipeline? > > > > Jonathan > > > ------------------------------ > > Message: 5 > Date: Thu, 12 Aug 2021 09:00:42 -0400 > From: Matthew Dziuban > To: BaseX > Subject: [basex-talk] org.basex.core.BaseXException with no error > message > Message-ID: > eZOt0ESWBO4kmgpi2yqC-SDBnMKzw at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi all, > > I'm using the java ClientSession class defined in the basex-api module and > I'm seeing intermittent org.basex.core.BaseXException errors with an empty > error message when executing long-running read queries or CREATE DB > commands. The stack trace of the most recent error points to > ClientSession.receive ( > > https://github.com/BaseXdb/basex/blob/9.5.2/basex-core/src/main/java/org/basex/api/client/ClientSession.java#L190 > ) > > org.basex.core.BaseXException: > org.basex.api.client.ClientSession.receive(ClientSession.java:190) > org.basex.api.client.ClientSession.send(ClientSession.java:178) > org.basex.api.client.ClientSession.send(ClientSession.java:215) > org.basex.api.client.ClientSession.create(ClientSession.java:128) > ... > > Unfortunately since the message is empty it's difficult to debug what's > going wrong. I've checked the log files in basex/data/.logs but haven't > found any information about the failure. Is there another place I can look? > Or do you have any other recommendations for debugging the errors? > > Thanks in advance, > Matt > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210812/3cd0750f/attachment-0001.htm > > > > ------------------------------ > > Message: 6 > Date: Thu, 12 Aug 2021 19:59:23 +0200 > From: Christian Gr?n > To: Matthew Dziuban > Cc: BaseX > Subject: Re: [basex-talk] org.basex.core.BaseXException with no error > message > Message-ID: > qdW--ZcfFVm0YNQwHsXzmq1msb-dVT1A at mail.gmail.com> > Content-Type: text/plain; charset="UTF-8" > > Hi Matt, > > It?s difficult to give a general answer. Do you think you can share a > reproducible test case with us? > > Thanks in advance > Christian > > > > On Thu, Aug 12, 2021 at 3:01 PM Matthew Dziuban > wrote: > > > > Hi all, > > > > I'm using the java ClientSession class defined in the basex-api module > and I'm seeing intermittent org.basex.core.BaseXException errors with an > empty error message when executing long-running read queries or CREATE DB > commands. The stack trace of the most recent error points to > ClientSession.receive ( > https://github.com/BaseXdb/basex/blob/9.5.2/basex-core/src/main/java/org/basex/api/client/ClientSession.java#L190 > ) > > > > org.basex.core.BaseXException: > > org.basex.api.client.ClientSession.receive(ClientSession.java:190) > > org.basex.api.client.ClientSession.send(ClientSession.java:178) > > org.basex.api.client.ClientSession.send(ClientSession.java:215) > > org.basex.api.client.ClientSession.create(ClientSession.java:128) > > ... > > > > Unfortunately since the message is empty it's difficult to debug what's > going wrong. I've checked the log files in basex/data/.logs but haven't > found any information about the failure. Is there another place I can look? > Or do you have any other recommendations for debugging the errors? > > > > Thanks in advance, > > Matt > > > ------------------------------ > > Message: 7 > Date: Thu, 12 Aug 2021 20:04:13 +0200 > From: Christian Gr?n > To: Jonathan Robie > Cc: BaseX > Subject: Re: [basex-talk] Pretty-print the -V optimized query? See > what indexes are used? > Message-ID: > ZLq8xKZVf67Rd93C_ePJhNczaK7fSWo9esHA at mail.gmail.com> > Content-Type: text/plain; charset="UTF-8" > > Hi Jonathan, > > > Is there a way to pretty-print the optimized query from the -V option? > > Currently no. Personally, I?m not aware of any XQuery code formatter > that works really well. Maybe anyone else on the list does? > > > What is the best way to see which indexes are being used? > > The usual way is to parse the compilation output for "apply ... index" > entries. Our documentation might give you some more hints [1]. > > Cheers, > Christian > > [1] https://docs.basex.org/wiki/Indexes > > > ------------------------------ > > Message: 8 > Date: Thu, 12 Aug 2021 15:12:42 -0700 > From: Tamara Marnell > To: basex-talk at mailman.uni-konstanz.de > Subject: [basex-talk] Can XQuery return unique values present across > multiple databases? > Message-ID: > rM7NbMp9T5NPKQKaPxtz1Rwpw1dwEKcp_KNV+_BpA at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Short question: Is it possible to write an XQuery FLWOR statement that can > return a set of unique values present across multiple databases? > > Long question: Our new website in development displays EAD finding aids > stored across 45 databases in BaseX. I've built "facet" databases that > index terms in the EADs from controlled vocabularies like subjects, places, > personal names, etc. The indexes follow this structure, where each EAD node > contains a unique identifier: > > > > 12345 > 67890 > > > abcde > > {etc.} > > > In the search interface, users can select multiple facets to apply to one > search. For example, they could browse database 12 for EADs with the > subject "Literature" *and* the place "Oregon," etc. > > I currently use the REST server to run an XQuery file that loops through > each selected facet and prints *all* EAD IDs for each submitted term and > database. Then after results are returned, I use PHP to count occurences of > each EAD and print them only if the total count matches the count of facets > used. > > declare variable $d as xs:string external; > declare variable $f as xs:string external; > let $db_ids := tokenize($d, '\|') > return { > for $facet in tokenize($f, '\|') > let $split := tokenize($facet, ':') > let $facet_type := $split[1] > let $facet_term := $split[2] > let $facet_db := 'facet-' || $facet_type > return { > for $ead in db:open($facet_db)/terms/term[@text=$facet_term and > @db=$db_ids]/ead > return $ead > } > } > > So in the hypothetical example above, I'd pass "12" as d (or multiple > selected databases separated by bars) and > "subject:Literature|geogname:Oregon" as f, and I'd get back a document > like: > > > > 12345 > 67890 > > > 12345 > > > > The count of "12345" will equal the count of the user's selected facets, so > that result will be printed, but 67890 will not. > > Is there a more efficient way to do this? I'd prefer the XQuery to return > only the EADs that meet all criteria, so only 12345 would be returned > because it's in facet-subject under Literature *and* in facet-geogname > under "Oregon," and then I don't have to do any post-processing. > > -Tamara > > -- > > Tamara Marnell > IT Manager > Orbis Cascade Alliance (orbiscascade.org ) > Pronouns: she/her/hers > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210812/7bd4d00f/attachment-0001.htm > > > > ------------------------------ > > Message: 9 > Date: Fri, 13 Aug 2021 08:26:12 +0200 > From: Martin Honnen > To: basex-talk at mailman.uni-konstanz.de > Subject: Re: [basex-talk] Can XQuery return unique values present > across multiple databases? > Message-ID: <16ad6d5e-0df4-208c-cc35-b1c82d508518 at gmx.de> > Content-Type: text/plain; charset="utf-8"; Format="flowed" > > > Am 13.08.2021 um 00:12 schrieb Tamara Marnell: > > Short question: Is it possible to write an XQuery FLWOR statement that > > can return a set of unique values present across multiple databases? > > > > Long question: Our new website in development displays EAD finding > > aids stored across 45 databases in BaseX. I've built "facet" databases > > that index terms in the EADs from controlled vocabularies like > > subjects, places, personal names, etc. The indexes follow this > > structure, where each EAD node contains a unique identifier: > > > > > > ? > > ??? 12345 > > ??? 67890 > > ? > > ? > > ??? abcde > > ? > > ? {etc.} > > > > > > In the search interface, users can select multiple facets to apply to > > one search. For example, they could browse database 12 for EADs with > > the subject "Literature" /and/ the place "Oregon," etc. > > > > I currently use the REST server to run an XQuery file that loops > > through each selected facet and prints /all/ EAD IDs for each > > submitted term and database. Then after results are returned, I use > > PHP to count occurences of each EAD and print them only if the total > > count matches the count of facets used. > > > > declare variable $d as xs:string external; > > declare variable $f as xs:string external; > > let $db_ids := tokenize($d, '\|') > > return { > > for $facet in tokenize($f, '\|') > > ? let $split := tokenize($facet, ':') > > ? let $facet_type := $split[1] > > ? let $facet_term := $split[2] > > ? let $facet_db := 'facet-' || $facet_type > > ? return { > > ? ? for $ead in db:open($facet_db)/terms/term[@text=$facet_term and > > @db=$db_ids]/ead > > ? ? ? return $ead > > ? } > > } > > > > So in the hypothetical example above, I'd pass "12" as d (or multiple > > selected databases separated by bars) and > > "subject:Literature|geogname:Oregon" as f, and I'd get back a document > > like: > > > > > > ? > > ??? 12345 > > ??? 67890 > > ? > > ? > > ??? 12345 > > ? > > > > > > The count of "12345" will equal the count of the user's selected > > facets, so that result will be printed, but 67890 will not. > > > > Is there a more efficient way to do this? I'd prefer the XQuery to > > return only the EADs that meet all criteria, so only 12345 would be > > returned because it's in facet-subject under Literature /and/ in > > facet-geogname under "Oregon," and then I don't have to do any > > post-processing. > > > > I think you can use fold-left to reduce the found eas while selecting them: > > > > let $db_ids := tokenize($d, '\|') > return > ??? { > ??????? let $facet-maps := > ????????? fold-left( > ??????????? for $facet in tokenize($f, '\|') > ????????????? let $split := tokenize($facet, ':') > ????????????? let $facet_type := $split[1] > ????????????? let $facet_term := $split[2] > ????????????? let $facet_db := 'facet-' || $facet_type > ??????????? return > ????????????? map:merge( > ????????????????? for $ead in > db:open($facet_db)/terms/term[@text=$facet_term and @db=$db_ids]/ead > ????????????????? return map:entry(string($ead), map { 'node' : $ead, > 'type' : $facet_type, 'term' : $facet_term }) > ????????????????? , > ????????????????? map { 'duplicates' : 'combine' } > ????????????? ) > ?????????? , > ?????????? map{}, > ?????????? function($ams, $m) { > ?????????????? for $m1 in $ams > ?????????????? return map:remove($m1, map:keys($m1)[not(. = > map:keys($m))]), > ?????????????? $m > ?????????? } > ????????? ) > ??????? return > ??????????? for $m in $facet-maps[exists(map:keys(.))] > ??????????? let $ead1 := $m?*[1] > ??????????? return > ??????????????? > ??????????????? { > ??????????????????? $m?*?node > ??????????????? } > ??????????????? > ??? } > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: < > http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210813/e0633543/attachment-0001.htm > > > > End of BaseX-Talk Digest, Vol 140, Issue 2 > ****************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.gruen at gmail.com Fri Aug 13 12:29:24 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Fri, 13 Aug 2021 12:29:24 +0200 Subject: [basex-talk] Polling break for loop In-Reply-To: References: Message-ID: > If polling a url n times and breaking if response is 'completed', is the best to approach to use try catch and error() to get around immutability? I need the full response on complete so I redo the last http get. It is not a biggie requesting twice. Adam The hof:until function may help you [1]. Don?t hesitate to supply us with a minimized code snippet. In general, it?s almost always a good advice not to use try/catch unless you need to catch real errors. [1] https://docs.basex.org/wiki/Higher-Order_Functions_Module#hof:until From tmarnell at orbiscascade.org Fri Aug 13 20:50:14 2021 From: tmarnell at orbiscascade.org (Tamara Marnell) Date: Fri, 13 Aug 2021 11:50:14 -0700 Subject: [basex-talk] Can XQuery return unique values present across multiple databases? In-Reply-To: <16ad6d5e-0df4-208c-cc35-b1c82d508518@gmx.de> References: <16ad6d5e-0df4-208c-cc35-b1c82d508518@gmx.de> Message-ID: Thank you, Martin! I'm new to XQuery and didn't know about higher-order functions like fold-left. With a little tweaking, this is perfect for my application: declare variable $d as xs:string external; declare variable $f as xs:string external; declare function local:get_eads($facet as xs:string, $db_ids as item()+) as item()* { let $split := tokenize($facet, ':') return db:open('facet-' || $split[1])/terms/term[@text=$split[2] and @db=$db_ids]/ead }; let $db_ids := tokenize($d, '\|') let $facets := tokenize($f, '\|') let $eads := fold-left( $facets, local:get_eads(head($facets), $db_ids), function($all_eads, $facet) { let $facet_eads := local:get_eads($facet, $db_ids) let $eads_in_both := distinct-values($all_eads[.=$facet_eads]) return $eads_in_both } ) return { for $ead in $eads return {$ead} } On Thu, Aug 12, 2021 at 11:27 PM Martin Honnen wrote: > > Am 13.08.2021 um 00:12 schrieb Tamara Marnell: > > Short question: Is it possible to write an XQuery FLWOR statement that can > return a set of unique values present across multiple databases? > > Long question: Our new website in development displays EAD finding aids > stored across 45 databases in BaseX. I've built "facet" databases that > index terms in the EADs from controlled vocabularies like subjects, places, > personal names, etc. The indexes follow this structure, where each EAD node > contains a unique identifier: > > > > 12345 > 67890 > > > abcde > > {etc.} > > > In the search interface, users can select multiple facets to apply to one > search. For example, they could browse database 12 for EADs with the > subject "Literature" *and* the place "Oregon," etc. > > I currently use the REST server to run an XQuery file that loops through > each selected facet and prints *all* EAD IDs for each submitted term and > database. Then after results are returned, I use PHP to count occurences of > each EAD and print them only if the total count matches the count of facets > used. > > declare variable $d as xs:string external; > declare variable $f as xs:string external; > let $db_ids := tokenize($d, '\|') > return { > for $facet in tokenize($f, '\|') > let $split := tokenize($facet, ':') > let $facet_type := $split[1] > let $facet_term := $split[2] > let $facet_db := 'facet-' || $facet_type > return { > for $ead in db:open($facet_db)/terms/term[@text=$facet_term and > @db=$db_ids]/ead > return $ead > } > } > > So in the hypothetical example above, I'd pass "12" as d (or multiple > selected databases separated by bars) and > "subject:Literature|geogname:Oregon" as f, and I'd get back a document like: > > > > 12345 > 67890 > > > 12345 > > > > The count of "12345" will equal the count of the user's selected facets, > so that result will be printed, but 67890 will not. > > Is there a more efficient way to do this? I'd prefer the XQuery to return > only the EADs that meet all criteria, so only 12345 would be returned > because it's in facet-subject under Literature *and* in facet-geogname > under "Oregon," and then I don't have to do any post-processing. > > > I think you can use fold-left to reduce the found eas while selecting them: > > > > let $db_ids := tokenize($d, '\|') > return > { > let $facet-maps := > fold-left( > for $facet in tokenize($f, '\|') > let $split := tokenize($facet, ':') > let $facet_type := $split[1] > let $facet_term := $split[2] > let $facet_db := 'facet-' || $facet_type > return > map:merge( > for $ead in db:open($facet_db)/terms/term[@text=$facet_term > and @db=$db_ids]/ead > return map:entry(string($ead), map { 'node' : $ead, > 'type' : $facet_type, 'term' : $facet_term }) > , > map { 'duplicates' : 'combine' } > ) > , > map{}, > function($ams, $m) { > for $m1 in $ams > return map:remove($m1, map:keys($m1)[not(. = > map:keys($m))]), > $m > } > ) > return > for $m in $facet-maps[exists(map:keys(.))] > let $ead1 := $m?*[1] > return > > { > $m?*?node > } > > } > -- Tamara Marnell IT Manager Orbis Cascade Alliance (orbiscascade.org ) Pronouns: she/her/hers -------------- next part -------------- An HTML attachment was scrubbed... URL: From gerrit.imsieke at le-tex.de Fri Aug 13 22:07:39 2021 From: gerrit.imsieke at le-tex.de (Imsieke, Gerrit, le-tex) Date: Fri, 13 Aug 2021 22:07:39 +0200 Subject: [basex-talk] Can XQuery return unique values present across multiple databases? In-Reply-To: References: <16ad6d5e-0df4-208c-cc35-b1c82d508518@gmx.de> Message-ID: <600a4702-6397-226e-7144-b1d9a5ae4c9c@le-tex.de> Tamara! Welcome to another proselyte in the Church of Xquery. This church is open to people from all walks of life, for example, from XSLT or XForms backgrounds. But not from PHP. Just kidding, everyone is free to use the tools and languages they got accustomed to (until they are made aware of the X stack, that is). Do more with BaseX and RESTXQ, it is quite rewarding! The community is nice, inclusive, and welcoming. Gerrit On 13.08.2021 20:50, Tamara Marnell wrote: > Thank you, Martin! I'm new to XQuery and didn't know about higher-order > functions like fold-left. With a little tweaking, this is perfect for my > application: > > declare variable $d as xs:string external; > declare variable $f as xs:string external; > declare function local:get_eads($facet as xs:string, $db_ids as item()+) > as item()* { > ? let $split := tokenize($facet, ':') > ? return db:open('facet-' || $split[1])/terms/term[@text=$split[2] and > @db=$db_ids]/ead > }; > let $db_ids := tokenize($d, '\|') > let $facets := tokenize($f, '\|') > let $eads := > ? fold-left( > ? ? $facets, > ? ? local:get_eads(head($facets), $db_ids), > ? ? function($all_eads, $facet) { > ? ? ? let $facet_eads := local:get_eads($facet, $db_ids) > ? ? ? let $eads_in_both := distinct-values($all_eads[.=$facet_eads]) > ? ? ? return $eads_in_both > ? ? } > ? ) > return { > ? for $ead in $eads > ? ? return {$ead} > } > > On Thu, Aug 12, 2021 at 11:27 PM Martin Honnen > wrote: > > > Am 13.08.2021 um 00:12 schrieb Tamara Marnell: >> Short question: Is it possible to write an XQuery FLWOR statement >> that can return a set of unique values present across multiple >> databases? >> >> Long question: Our new website in development displays EAD finding >> aids stored across 45 databases in BaseX. I've built "facet" >> databases that index terms in the EADs from controlled >> vocabularies like subjects, places, personal names, etc. The >> indexes follow this structure, where each EAD node contains a >> unique identifier: >> >> >> ? >> ??? 12345 >> ??? 67890 >> ? >> ? >> ??? abcde >> ? >> ? {etc.} >> >> >> In the search interface, users can select multiple facets to apply >> to one search. For example, they could browse database 12 for EADs >> with the subject "Literature" /and/ the place "Oregon," etc. >> >> I currently use the REST server to run an XQuery file that loops >> through each selected facet and prints /all/ EAD IDs for each >> submitted term and database. Then after results are returned, I >> use PHP to count occurences of each EAD and print them only if the >> total count matches the count of facets used. >> >> declare variable $d as xs:string external; >> declare variable $f as xs:string external; >> let $db_ids := tokenize($d, '\|') >> return { >> for $facet in tokenize($f, '\|') >> ? let $split := tokenize($facet, ':') >> ? let $facet_type := $split[1] >> ? let $facet_term := $split[2] >> ? let $facet_db := 'facet-' || $facet_type >> ? return { >> ? ? for $ead in db:open($facet_db)/terms/term[@text=$facet_term >> and @db=$db_ids]/ead >> ? ? ? return $ead >> ? } >> } >> >> So in the hypothetical example above, I'd pass "12" as d (or >> multiple selected databases separated by bars) and >> "subject:Literature|geogname:Oregon" as f, and I'd get back a >> document like: >> >> >> ? >> ??? 12345 >> ??? 67890 >> ? >> ? >> ??? 12345 >> ? >> >> >> The count of "12345" will equal the count of the user's selected >> facets, so that result will be printed, but 67890 will not. >> >> Is there a more efficient way to do this? I'd prefer the XQuery to >> return only the EADs that meet all criteria, so only 12345 would >> be returned because it's in facet-subject under Literature /and/ >> in facet-geogname under "Oregon," and then I don't have to do any >> post-processing. >> > > I think you can use fold-left to reduce the found eas while > selecting them: > > > > let $db_ids := tokenize($d, '\|') > return > ??? { > ??????? let $facet-maps := > ????????? fold-left( > ??????????? for $facet in tokenize($f, '\|') > ????????????? let $split := tokenize($facet, ':') > ????????????? let $facet_type := $split[1] > ????????????? let $facet_term := $split[2] > ????????????? let $facet_db := 'facet-' || $facet_type > ??????????? return > ????????????? map:merge( > ????????????????? for $ead in > db:open($facet_db)/terms/term[@text=$facet_term and @db=$db_ids]/ead > ????????????????? return map:entry(string($ead), map { 'node' : > $ead, 'type' : $facet_type, 'term' : $facet_term }) > ????????????????? , > ????????????????? map { 'duplicates' : 'combine' } > ????????????? ) > ?????????? , > ?????????? map{}, > ?????????? function($ams, $m) { > ?????????????? for $m1 in $ams > ?????????????? return map:remove($m1, map:keys($m1)[not(. = > map:keys($m))]), > ?????????????? $m > ?????????? } > ????????? ) > ??????? return > ??????????? for $m in $facet-maps[exists(map:keys(.))] > ??????????? let $ead1 := $m?*[1] > ??????????? return > ??????????????? > ??????????????? { > ??????????????????? $m?*?node > ??????????????? } > ??????????????? > ??? } > > > > -- > > Tamara Marnell > IT Manager > Orbis Cascade Alliance (orbiscascade.org ) > Pronouns: she/her/hers -- Gerrit Imsieke Gesch?ftsf?hrer / Managing Director le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 110, Fax +49 341 355356 510 gerrit.imsieke at le-tex.de, http://www.le-tex.de Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 Gesch?ftsf?hrer / Managing Directors: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt From r.stapper at lijbrandt.nl Sat Aug 14 10:37:38 2021 From: r.stapper at lijbrandt.nl (Rob Stapper) Date: Sat, 14 Aug 2021 10:37:38 +0200 Subject: [basex-talk] for-each issue on child-elements Message-ID: Hi Christian, I encountered this erroneous behavior while using the for-each-function on a set with child-elements. The evident work-around [2] workd fine. I?m using BaseX 9.6 RC2. I attached the code as attachment. Hope this helps. [1] let $context := let $context.processor := function( $context as element( ) , $context.processor as function(*) ) as map(*) { map { $context => name() : $context/child::* => for-each( $context.processor( ? , $context.processor ) ) } } return $context => $context.processor( $context.processor ) [2] let $context := let $context.processor := function( $context as element( ) , $context.processor as function(*) ) as map(*) { map { $context => name() : $context/child::* => for-each( function( $child as element( ) ) { $child => $context.processor( $context.processor ) } ) } } return $context => $context.processor( $context.processor ) Rob Sent from Mail for Windows -- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 2021-08-13 for-each issue on child-elements.zip Type: application/zip Size: 837 bytes Desc: not available URL: From m.lettere at gmail.com Sat Aug 14 11:52:15 2021 From: m.lettere at gmail.com (Marco Lettere) Date: Sat, 14 Aug 2021 11:52:15 +0200 Subject: [basex-talk] Can XQuery return unique values present across multiple databases? In-Reply-To: <600a4702-6397-226e-7144-b1d9a5ae4c9c@le-tex.de> References: <16ad6d5e-0df4-208c-cc35-b1c82d508518@gmx.de> <600a4702-6397-226e-7144-b1d9a5ae4c9c@le-tex.de> Message-ID: <3103abb2-4992-e800-f098-f83220e61803@gmail.com> Welcome Tamara and yes, Gerrit is completely right about BaseX + RestXQ. Most of the time you don't need more! :-D M. On 13/08/21 22:07, Imsieke, Gerrit, le-tex wrote: > Tamara! Welcome to another proselyte in the Church of Xquery. > > This church is open to people from all walks of life, for example, > from XSLT or XForms backgrounds. > > But not from PHP. > > Just kidding, everyone is free to use the tools and languages they got > accustomed to (until they are made aware of the X stack, that is). > > Do more with BaseX and RESTXQ, it is quite rewarding! The community is > nice, inclusive, and welcoming. > > Gerrit > > On 13.08.2021 20:50, Tamara Marnell wrote: >> Thank you, Martin! I'm new to XQuery and didn't know about >> higher-order functions like fold-left. With a little tweaking, this >> is perfect for my application: >> >> declare variable $d as xs:string external; >> declare variable $f as xs:string external; >> declare function local:get_eads($facet as xs:string, $db_ids as >> item()+) as item()* { >> ?? let $split := tokenize($facet, ':') >> ?? return db:open('facet-' || $split[1])/terms/term[@text=$split[2] >> and @db=$db_ids]/ead >> }; >> let $db_ids := tokenize($d, '\|') >> let $facets := tokenize($f, '\|') >> let $eads := >> ?? fold-left( >> ?? ? $facets, >> ?? ? local:get_eads(head($facets), $db_ids), >> ?? ? function($all_eads, $facet) { >> ?? ? ? let $facet_eads := local:get_eads($facet, $db_ids) >> ?? ? ? let $eads_in_both := distinct-values($all_eads[.=$facet_eads]) >> ?? ? ? return $eads_in_both >> ?? ? } >> ?? ) >> return { >> ?? for $ead in $eads >> ?? ? return {$ead} >> } >> >> On Thu, Aug 12, 2021 at 11:27 PM Martin Honnen > > wrote: >> >> >> ??? Am 13.08.2021 um 00:12 schrieb Tamara Marnell: >>> ??? Short question: Is it possible to write an XQuery FLWOR statement >>> ??? that can return a set of unique values present across multiple >>> ??? databases? >>> >>> ??? Long question: Our new website in development displays EAD finding >>> ??? aids stored across 45 databases in BaseX. I've built "facet" >>> ??? databases that index terms in the EADs from controlled >>> ??? vocabularies like subjects, places, personal names, etc. The >>> ??? indexes follow this structure, where each EAD node contains a >>> ??? unique identifier: >>> >>> ??? >>> ??? ? >>> ??? ??? 12345 >>> ??? ??? 67890 >>> ??? ? >>> ??? ? >>> ??? ??? abcde >>> ??? ? >>> ??? ? {etc.} >>> ??? >>> >>> ??? In the search interface, users can select multiple facets to apply >>> ??? to one search. For example, they could browse database 12 for EADs >>> ??? with the subject "Literature" /and/ the place "Oregon," etc. >>> >>> ??? I currently use the REST server to run an XQuery file that loops >>> ??? through each selected facet and prints /all/ EAD IDs for each >>> ??? submitted term and database. Then after results are returned, I >>> ??? use PHP to count occurences of each EAD and print them only if the >>> ??? total count matches the count of facets used. >>> >>> ??? declare variable $d as xs:string external; >>> ??? declare variable $f as xs:string external; >>> ??? let $db_ids := tokenize($d, '\|') >>> ??? return { >>> ??? for $facet in tokenize($f, '\|') >>> ??? ? let $split := tokenize($facet, ':') >>> ??? ? let $facet_type := $split[1] >>> ??? ? let $facet_term := $split[2] >>> ??? ? let $facet_db := 'facet-' || $facet_type >>> ??? ? return { >>> ??? ? ? for $ead in db:open($facet_db)/terms/term[@text=$facet_term >>> ??? and @db=$db_ids]/ead >>> ??? ? ? ? return $ead >>> ??? ? } >>> ??? } >>> >>> ??? So in the hypothetical example above, I'd pass "12" as d (or >>> ??? multiple selected databases separated by bars) and >>> ??? "subject:Literature|geogname:Oregon" as f, and I'd get back a >>> ??? document like: >>> >>> ??? >>> ??? ? >>> ??? ??? 12345 >>> ??? ??? 67890 >>> ??? ? >>> ??? ? >>> ??? ??? 12345 >>> ??? ? >>> ??? >>> >>> ??? The count of "12345" will equal the count of the user's selected >>> ??? facets, so that result will be printed, but 67890 will not. >>> >>> ??? Is there a more efficient way to do this? I'd prefer the XQuery to >>> ??? return only the EADs that meet all criteria, so only 12345 would >>> ??? be returned because it's in facet-subject under Literature /and/ >>> ??? in facet-geogname under "Oregon," and then I don't have to do any >>> ??? post-processing. >>> >> >> ??? I think you can use fold-left to reduce the found eas while >> ??? selecting them: >> >> >> >> ??? let $db_ids := tokenize($d, '\|') >> ??? return >> ???? ??? { >> ???? ??????? let $facet-maps := >> ???? ????????? fold-left( >> ???? ??????????? for $facet in tokenize($f, '\|') >> ???? ????????????? let $split := tokenize($facet, ':') >> ???? ????????????? let $facet_type := $split[1] >> ???? ????????????? let $facet_term := $split[2] >> ???? ????????????? let $facet_db := 'facet-' || $facet_type >> ???? ??????????? return >> ???? ????????????? map:merge( >> ???? ????????????????? for $ead in >> ??? db:open($facet_db)/terms/term[@text=$facet_term and @db=$db_ids]/ead >> ???? ????????????????? return map:entry(string($ead), map { 'node' : >> ??? $ead, 'type' : $facet_type, 'term' : $facet_term }) >> ???? ????????????????? , >> ???? ????????????????? map { 'duplicates' : 'combine' } >> ???? ????????????? ) >> ???? ?????????? , >> ???? ?????????? map{}, >> ???? ?????????? function($ams, $m) { >> ???? ?????????????? for $m1 in $ams >> ???? ?????????????? return map:remove($m1, map:keys($m1)[not(. = >> ??? map:keys($m))]), >> ???? ?????????????? $m >> ???? ?????????? } >> ???? ????????? ) >> ???? ??????? return >> ???? ??????????? for $m in $facet-maps[exists(map:keys(.))] >> ???? ??????????? let $ead1 := $m?*[1] >> ???? ??????????? return >> ???? ??????????????? >> ???? ??????????????? { >> ???? ??????????????????? $m?*?node >> ???? ??????????????? } >> ???? ??????????????? >> ???? ??? } >> >> >> >> -- >> >> Tamara Marnell >> IT Manager >> Orbis Cascade Alliance (orbiscascade.org >> ) >> Pronouns: she/her/hers > From christian.gruen at gmail.com Sat Aug 14 12:51:00 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Sat, 14 Aug 2021 12:51:00 +0200 Subject: [basex-talk] for-each issue on child-elements In-Reply-To: References: Message-ID: Hi Rob, I?ve created an issue to track this down [1]. And I remember you have posted a similar bug in the past [2]? The challenge was/is to find out at compile time if a function is being inlined that has already been inlined. Another workaround: $context/child::* ! $context.processor(., $context.processor) Cheers, Christian [1] https://github.com/BaseXdb/basex/issues/2033 [2] https://github.com/BaseXdb/basex/issues/879 On Sat, Aug 14, 2021 at 10:37 AM Rob Stapper wrote: > Hi Christian, > > > > I encountered this erroneous behavior while using the for-each-function on > a set with child-elements. > > The evident work-around [2] workd fine. > > I?m using BaseX 9.6 RC2. > > I attached the code as attachment. > > Hope this helps. > > > > [1] > > let $context := > > > > > let $context.processor := > > function( $context as element( ) > > , $context.processor as function(*) > > ) as map(*) > > { map { $context => name() : $context/child::* > > => for-each( $context.processor( ? > > , > $context.processor > > ) > > ) > > } > > } > > return $context > > => $context.processor( $context.processor > > ) > > [2] > > let $context := > > > > > let $context.processor := > > function( $context as element( ) > > , $context.processor as function(*) > > ) as map(*) > > { map { $context => name() : $context/child::* > > => for-each( function( $child as > element( ) > > ) > > { $child > > => > $context.processor( $context.processor > > > ) > > } > > ) > > } > > } > > return $context > > => $context.processor( $context.processor > > ) > > > > Rob > > > > Sent from Mail for > Windows > > > > > Virus-free. > www.avast.com > > <#m_3245395734233364133_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamjameslaw at gmail.com Sun Aug 15 12:11:19 2021 From: adamjameslaw at gmail.com (Adam Law) Date: Sun, 15 Aug 2021 18:11:19 +0800 Subject: [basex-talk] Polling break for loop In-Reply-To: References: Message-ID: Hi Christian - many thanks for the pointer. hof:until works well and without a double http:send-request. let $pollingResult := hof:until(function($result) {$result?3//status/text()= 'done'},function ($input){[$input?1 + 1,prof:sleep(5000),http:send-request($requestPolling)]}, [1,0,http:send-request($requestPolling)]) On Fri, Aug 13, 2021 at 6:29 PM Christian Gr?n wrote: > > If polling a url n times and breaking if response is 'completed', is the > best to approach to use try catch and error() to get around immutability? > I need the full response on complete so I redo the last http get. It is not > a biggie requesting twice. Adam > > The hof:until function may help you [1]. Don?t hesitate to supply us > with a minimized code snippet. > > In general, it?s almost always a good advice not to use try/catch > unless you need to catch real errors. > > [1] https://docs.basex.org/wiki/Higher-Order_Functions_Module#hof:until > -------------- next part -------------- An HTML attachment was scrubbed... URL: From adamjameslaw at gmail.com Sun Aug 15 12:16:48 2021 From: adamjameslaw at gmail.com (Adam Law) Date: Sun, 15 Aug 2021 18:16:48 +0800 Subject: [basex-talk] Polling break for loop In-Reply-To: References: Message-ID: Slight improvement let $polling := hof:until(function($result) {$result?3//status/text()= 'done' or $result?1 > 10},function ($input){[$input?1 + 1,prof:sleep(5000),http:send-request($requestPolling)]}, [1,0,http:send-request($requestPolling)]) -------------- next part -------------- An HTML attachment was scrubbed... URL: From mrdziuban at gmail.com Tue Aug 17 23:33:37 2021 From: mrdziuban at gmail.com (Matthew Dziuban) Date: Tue, 17 Aug 2021 17:33:37 -0400 Subject: [basex-talk] org.basex.core.BaseXException with no error message In-Reply-To: References: Message-ID: Hi Christian, Apologies for the delay on my end. Unfortunately I can't reproduce it consistently, but it seems to happen most often when I run another query (either via the REST interface of the java client) while the original query is still running. Are there any known issues with multiple simultaneous connections or query executions? Thanks, Matt On Thu, Aug 12, 2021 at 1:59 PM Christian Gr?n wrote: > Hi Matt, > > It?s difficult to give a general answer. Do you think you can share a > reproducible test case with us? > > Thanks in advance > Christian > > > > On Thu, Aug 12, 2021 at 3:01 PM Matthew Dziuban > wrote: > > > > Hi all, > > > > I'm using the java ClientSession class defined in the basex-api module > and I'm seeing intermittent org.basex.core.BaseXException errors with an > empty error message when executing long-running read queries or CREATE DB > commands. The stack trace of the most recent error points to > ClientSession.receive ( > https://github.com/BaseXdb/basex/blob/9.5.2/basex-core/src/main/java/org/basex/api/client/ClientSession.java#L190 > ) > > > > org.basex.core.BaseXException: > > org.basex.api.client.ClientSession.receive(ClientSession.java:190) > > org.basex.api.client.ClientSession.send(ClientSession.java:178) > > org.basex.api.client.ClientSession.send(ClientSession.java:215) > > org.basex.api.client.ClientSession.create(ClientSession.java:128) > > ... > > > > Unfortunately since the message is empty it's difficult to debug what's > going wrong. I've checked the log files in basex/data/.logs but haven't > found any information about the failure. Is there another place I can look? > Or do you have any other recommendations for debugging the errors? > > > > Thanks in advance, > > Matt > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.gruen at gmail.com Tue Aug 17 23:41:42 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Tue, 17 Aug 2021 23:41:42 +0200 Subject: [basex-talk] org.basex.core.BaseXException with no error message In-Reply-To: References: Message-ID: > Are there any known issues with multiple simultaneous connections or query executions None that at least I am aware of. Have you encountered problems, or have you rather been distracted by the (unexpected) error message output? Matthew Dziuban schrieb am Di., 17. Aug. 2021, 23:34: > Hi Christian, > > Apologies for the delay on my end. Unfortunately I can't reproduce it > consistently, but it seems to happen most often when I run another query > (either via the REST interface of the java client) while the original query > is still running. Are there any known issues with multiple simultaneous > connections or query executions? > > Thanks, > Matt > > On Thu, Aug 12, 2021 at 1:59 PM Christian Gr?n > wrote: > >> Hi Matt, >> >> It?s difficult to give a general answer. Do you think you can share a >> reproducible test case with us? >> >> Thanks in advance >> Christian >> >> >> >> On Thu, Aug 12, 2021 at 3:01 PM Matthew Dziuban >> wrote: >> > >> > Hi all, >> > >> > I'm using the java ClientSession class defined in the basex-api module >> and I'm seeing intermittent org.basex.core.BaseXException errors with an >> empty error message when executing long-running read queries or CREATE DB >> commands. The stack trace of the most recent error points to >> ClientSession.receive ( >> https://github.com/BaseXdb/basex/blob/9.5.2/basex-core/src/main/java/org/basex/api/client/ClientSession.java#L190 >> ) >> > >> > org.basex.core.BaseXException: >> > org.basex.api.client.ClientSession.receive(ClientSession.java:190) >> > org.basex.api.client.ClientSession.send(ClientSession.java:178) >> > org.basex.api.client.ClientSession.send(ClientSession.java:215) >> > org.basex.api.client.ClientSession.create(ClientSession.java:128) >> > ... >> > >> > Unfortunately since the message is empty it's difficult to debug what's >> going wrong. I've checked the log files in basex/data/.logs but haven't >> found any information about the failure. Is there another place I can look? >> Or do you have any other recommendations for debugging the errors? >> > >> > Thanks in advance, >> > Matt >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.gruen at gmail.com Thu Aug 19 14:22:20 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Thu, 19 Aug 2021 14:22:20 +0200 Subject: [basex-talk] BaseX 9.6: The Summer Edition Message-ID: Dear all, We provide you with a new and fresh version of BaseX, our open source XML framework, database system and XQuery 3.1 processor: https://basex.org/ Apart from our main focus (query rewritings and optimizations), we have added the following enhancements: XQUERY: MODULES, FEATURES - Archive Module, archive:write: stream large archives to file - SQL Module: support for more SQL types - Full-Text Module, ft:thesaurus: perform Thesaurus queries - Fulltext, fuzzy search: specify Levenshtein limit - UNROLLLIMIT option: control limit for unrolling loops XQUERY: JAVA BINDINGS - Java objects of unknown type are wrapped into function items - results of constructor calls are returned as function items - the standard package "java.lang." has become optional - array arguments can be specified with the middle dot notation - conversion can be controlled with the WRAPJAVA option - better support for XQuery arrays and maps WEB APPLICATIONS - RESTXQ: Server-Timing HTTP headers are attached to the response For a more comprehensive list of added and updated features, look into our documentation (docs.basex.org) and check out the GitHub issues (github.com/BaseXdb/basex/issues). Have fun, Your BaseX Team From m.lettere at gmail.com Thu Aug 19 14:37:13 2021 From: m.lettere at gmail.com (Marco Lettere) Date: Thu, 19 Aug 2021 14:37:13 +0200 Subject: [basex-talk] BaseX 9.6: The Summer Edition In-Reply-To: References: Message-ID: <119073a9-bacd-1f9f-aaef-a3d08ba18793@gmail.com> Thank you very much! M. On 19/08/21 14:22, Christian Gr?n wrote: > Dear all, > > We provide you with a new and fresh version of BaseX, our open source > XML framework, database system and XQuery 3.1 processor: > > https://basex.org/ > > Apart from our main focus (query rewritings and optimizations), we > have added the following enhancements: > > XQUERY: MODULES, FEATURES > - Archive Module, archive:write: stream large archives to file > - SQL Module: support for more SQL types > - Full-Text Module, ft:thesaurus: perform Thesaurus queries > - Fulltext, fuzzy search: specify Levenshtein limit > - UNROLLLIMIT option: control limit for unrolling loops > > XQUERY: JAVA BINDINGS > - Java objects of unknown type are wrapped into function items > - results of constructor calls are returned as function items > - the standard package "java.lang." has become optional > - array arguments can be specified with the middle dot notation > - conversion can be controlled with the WRAPJAVA option > - better support for XQuery arrays and maps > > WEB APPLICATIONS > - RESTXQ: Server-Timing HTTP headers are attached to the response > > For a more comprehensive list of added and updated features, look into > our documentation (docs.basex.org) and check out the GitHub issues > (github.com/BaseXdb/basex/issues). > > Have fun, > Your BaseX Team From bdysonsmith at gmail.com Thu Aug 19 15:33:25 2021 From: bdysonsmith at gmail.com (Bridger Dyson-Smith) Date: Thu, 19 Aug 2021 09:33:25 -0400 Subject: [basex-talk] BaseX 9.6: The Summer Edition In-Reply-To: References: Message-ID: Dear Christian and everyone else on the BaseX team: As always, thank you all so much for your time and effort! Looking forward to 9.6! Best, Bridger On Thu, Aug 19, 2021 at 8:22 AM Christian Gr?n wrote: > Dear all, > > We provide you with a new and fresh version of BaseX, our open source > XML framework, database system and XQuery 3.1 processor: > > https://basex.org/ > > Apart from our main focus (query rewritings and optimizations), we > have added the following enhancements: > > XQUERY: MODULES, FEATURES > - Archive Module, archive:write: stream large archives to file > - SQL Module: support for more SQL types > - Full-Text Module, ft:thesaurus: perform Thesaurus queries > - Fulltext, fuzzy search: specify Levenshtein limit > - UNROLLLIMIT option: control limit for unrolling loops > > XQUERY: JAVA BINDINGS > - Java objects of unknown type are wrapped into function items > - results of constructor calls are returned as function items > - the standard package "java.lang." has become optional > - array arguments can be specified with the middle dot notation > - conversion can be controlled with the WRAPJAVA option > - better support for XQuery arrays and maps > > WEB APPLICATIONS > - RESTXQ: Server-Timing HTTP headers are attached to the response > > For a more comprehensive list of added and updated features, look into > our documentation (docs.basex.org) and check out the GitHub issues > (github.com/BaseXdb/basex/issues). > > Have fun, > Your BaseX Team > -------------- next part -------------- An HTML attachment was scrubbed... URL: From sdm7g at virginia.edu Thu Aug 19 20:36:59 2021 From: sdm7g at virginia.edu (Majewski, Steven Dennis (sdm7g)) Date: Thu, 19 Aug 2021 18:36:59 +0000 Subject: [basex-talk] BaseX 9.6: The Summer Edition In-Reply-To: References: Message-ID: Thank you. But a head?s up for any Mac/Homebrew users: The BaseX Homebrew formula was not yet update, so I impatiently edited my local copy of the formula to 9.6 and I repeatedly got: basex 9.5.2 is installed but outdated ==> Upgrading basex 9.5.2 -> 9.6 ==> Downloading https://ghcr.io/v2/homebrew/core/basex/manifests/9.6 curl: (22) The requested URL returned error: 404 Error: Failed to download resource "basex_bottle_manifest" Download failed: https://ghcr.io/v2/homebrew/core/basex/manifests/9.6 I googled for similar errors and tried various suggestions, none of which worked. Eventually, I tried just deleting the following function from the formula, and it successfully installed. bottle do sha256 cellar: :any_skip_relocation, all: "29de8b648eba2d7d20a37ba168ae1757a4724eb43c5307d99291329518a06c46" end I only hesitate to submit that patched formula to Homebrew because I don?t actually understand what I?ve done or why it works! ;-) , but offering it here as a suggestion in case anyone else runs into that problem. ? Steve M. > On Aug 19, 2021, at 8:22 AM, Christian Gr?n wrote: > > Dear all, > > We provide you with a new and fresh version of BaseX, our open source > XML framework, database system and XQuery 3.1 processor: > > https://basex.org/ > > Apart from our main focus (query rewritings and optimizations), we > have added the following enhancements: > > XQUERY: MODULES, FEATURES > - Archive Module, archive:write: stream large archives to file > - SQL Module: support for more SQL types > - Full-Text Module, ft:thesaurus: perform Thesaurus queries > - Fulltext, fuzzy search: specify Levenshtein limit > - UNROLLLIMIT option: control limit for unrolling loops > > XQUERY: JAVA BINDINGS > - Java objects of unknown type are wrapped into function items > - results of constructor calls are returned as function items > - the standard package "java.lang." has become optional > - array arguments can be specified with the middle dot notation > - conversion can be controlled with the WRAPJAVA option > - better support for XQuery arrays and maps > > WEB APPLICATIONS > - RESTXQ: Server-Timing HTTP headers are attached to the response > > For a more comprehensive list of added and updated features, look into > our documentation (docs.basex.org) and check out the GitHub issues > (github.com/BaseXdb/basex/issues). > > Have fun, > Your BaseX Team -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3342 bytes Desc: not available URL: From patrick at durusau.net Thu Aug 19 23:56:16 2021 From: patrick at durusau.net (Patrick Durusau) Date: Thu, 19 Aug 2021 17:56:16 -0400 Subject: [basex-talk] BaseX 9.6 - BaseX96.zip - missing? Image not found: /img/c_go.png and Image not found: /img/c_editopen.png Message-ID: Great to see the new version! Running ./basexgui 2 image not found messages (omitting the at messages) Image not found: /img/c_go.png and Image not found: /img/c_editopen.png On Debian (Buster I think). Thanks for all the hard work! Patrick -- Patrick Durusau patrick at durusau.net Technical Advisory Board, OASIS (TAB) Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) Another Word For It (blog): http://tm.durusau.net Homepage: http://www.durusau.net Twitter: patrickDurusau From martin.honnen at gmx.de Fri Aug 20 00:04:54 2021 From: martin.honnen at gmx.de (Martin Honnen) Date: Fri, 20 Aug 2021 00:04:54 +0200 Subject: [basex-talk] BaseX 9.6 - BaseX96.zip - missing? Image not found: /img/c_go.png and Image not found: /img/c_editopen.png In-Reply-To: References: Message-ID: <1c1c902d-6ff1-d40a-b4b1-d7fbc856ae58@gmx.de> On 19.08.2021 23:56, Patrick Durusau wrote: > Running ./basexgui > > 2 image not found messages (omitting the at messages) > > Image not found: /img/c_go.png and Image not found: /img/c_editopen.png > > On Debian (Buster I think). On Windows (installed with BaseX96.exe) I see a yellow triangle with an exclamation mark icon for the "Run query" button in the GUI. That icon indeed differs from 9.5. Same for the "Choose directory" button. From martin.honnen at gmx.de Fri Aug 20 00:13:18 2021 From: martin.honnen at gmx.de (Martin Honnen) Date: Fri, 20 Aug 2021 00:13:18 +0200 Subject: [basex-talk] BaseX 9.6 - BaseX96.zip - missing? Image not found: /img/c_go.png and Image not found: /img/c_editopen.png In-Reply-To: <1c1c902d-6ff1-d40a-b4b1-d7fbc856ae58@gmx.de> References: <1c1c902d-6ff1-d40a-b4b1-d7fbc856ae58@gmx.de> Message-ID: <90ff3dff-eadf-a934-c7ca-adf27bf9c357@gmx.de> On 20.08.2021 00:04, Martin Honnen wrote: > On 19.08.2021 23:56, Patrick Durusau wrote: > >> Running ./basexgui >> >> 2 image not found messages (omitting the at messages) >> >> Image not found: /img/c_go.png and Image not found: /img/c_editopen.png >> >> On Debian (Buster I think). > > On Windows (installed with BaseX96.exe) I see a yellow triangle with an > exclamation mark icon for the "Run query" button in the GUI. That icon > indeed differs from 9.5. > > Same for the "Choose directory" button. It seems both issues are already fixed in the repository :) https://github.com/BaseXdb/basex/commit/c0c8cfacb0689bb0432d72194c33b8e5301f7449 From patrick at durusau.net Fri Aug 20 02:45:15 2021 From: patrick at durusau.net (Patrick Durusau) Date: Thu, 19 Aug 2021 20:45:15 -0400 Subject: [basex-talk] BaseX 9.6 - BaseX96.zip - missing? Image not found: /img/c_go.png and Image not found: /img/c_editopen.png In-Reply-To: <90ff3dff-eadf-a934-c7ca-adf27bf9c357@gmx.de> References: <1c1c902d-6ff1-d40a-b4b1-d7fbc856ae58@gmx.de> <90ff3dff-eadf-a934-c7ca-adf27bf9c357@gmx.de> Message-ID: Arg! Apologies for not checking the issues list! But thanks for the great software! Patrick On 8/19/21 6:13 PM, Martin Honnen wrote: > On 20.08.2021 00:04, Martin Honnen wrote: >> On 19.08.2021 23:56, Patrick Durusau wrote: >> >>> Running ./basexgui >>> >>> 2 image not found messages (omitting the at messages) >>> >>> Image not found: /img/c_go.png and Image not found: /img/c_editopen.png >>> >>> On Debian (Buster I think). >> >> On Windows (installed with BaseX96.exe) I see a yellow triangle with an >> exclamation mark icon for the "Run query" button in the GUI. That icon >> indeed differs from 9.5. >> >> Same for the "Choose directory" button. > > > It seems both issues are already fixed in the repository :) > https://github.com/BaseXdb/basex/commit/c0c8cfacb0689bb0432d72194c33b8e5301f7449 > -- Patrick Durusau patrick at durusau.net Technical Advisory Board, OASIS (TAB) Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) Another Word For It (blog): http://tm.durusau.net Homepage: http://www.durusau.net Twitter: patrickDurusau From christian.gruen at gmail.com Fri Aug 20 09:09:34 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Fri, 20 Aug 2021 09:09:34 +0200 Subject: [basex-talk] BaseX 9.6 - BaseX96.zip - missing? Image not found: /img/c_go.png and Image not found: /img/c_editopen.png In-Reply-To: References: <1c1c902d-6ff1-d40a-b4b1-d7fbc856ae58@gmx.de> <90ff3dff-eadf-a934-c7ca-adf27bf9c357@gmx.de> Message-ID: Patrick, Martin, Thanks for your feedback. We received various replies regarding the unfortunate GUI bug, and as you?ve already found out, the thing has been fixed, and a new snapshot is available [1]. A little patch release will follow soon. Cheers, Christian [1] https://files.basex.org/releases/latest/ On Fri, Aug 20, 2021 at 2:45 AM Patrick Durusau wrote: > > Arg! > > Apologies for not checking the issues list! > > But thanks for the great software! > > Patrick > > On 8/19/21 6:13 PM, Martin Honnen wrote: > > On 20.08.2021 00:04, Martin Honnen wrote: > >> On 19.08.2021 23:56, Patrick Durusau wrote: > >> > >>> Running ./basexgui > >>> > >>> 2 image not found messages (omitting the at messages) > >>> > >>> Image not found: /img/c_go.png and Image not found: /img/c_editopen.png > >>> > >>> On Debian (Buster I think). > >> > >> On Windows (installed with BaseX96.exe) I see a yellow triangle with an > >> exclamation mark icon for the "Run query" button in the GUI. That icon > >> indeed differs from 9.5. > >> > >> Same for the "Choose directory" button. > > > > > > It seems both issues are already fixed in the repository :) > > https://github.com/BaseXdb/basex/commit/c0c8cfacb0689bb0432d72194c33b8e5301f7449 > > > > -- > Patrick Durusau > patrick at durusau.net > Technical Advisory Board, OASIS (TAB) > Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300 > Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps) > > Another Word For It (blog): http://tm.durusau.net > Homepage: http://www.durusau.net > Twitter: patrickDurusau > From hrennau at yahoo.de Fri Aug 20 13:08:09 2021 From: hrennau at yahoo.de (Hans-Juergen Rennau) Date: Fri, 20 Aug 2021 11:08:09 +0000 (UTC) Subject: [basex-talk] BaseX 9.6: The Summer Edition In-Reply-To: References: Message-ID: <1672568020.527926.1629457689544@mail.yahoo.com> Another Rolls-Royce of functionality stopped inaudibly at the curb under my window. Am Donnerstag, 19. August 2021, 14:22:42 MESZ hat Christian Gr?n Folgendes geschrieben: Dear all, We provide you with a new and fresh version of BaseX, our open source XML framework, database system and XQuery 3.1 processor: ? https://basex.org/ Apart from our main focus (query rewritings and optimizations), we have added the following enhancements: XQUERY: MODULES, FEATURES - Archive Module, archive:write: stream large archives to file - SQL Module: support for more SQL types - Full-Text Module, ft:thesaurus: perform Thesaurus queries - Fulltext, fuzzy search: specify Levenshtein limit - UNROLLLIMIT option: control limit for unrolling loops XQUERY: JAVA BINDINGS - Java objects of unknown type are wrapped into function items - results of constructor calls are returned as function items - the standard package "java.lang." has become optional - array arguments can be specified with the middle dot notation - conversion can be controlled with the WRAPJAVA option - better support for XQuery arrays and maps WEB APPLICATIONS - RESTXQ: Server-Timing HTTP headers are attached to the response For a more comprehensive list of added and updated features, look into our documentation (docs.basex.org) and check out the GitHub issues (github.com/BaseXdb/basex/issues). Have fun, Your BaseX Team -------------- next part -------------- An HTML attachment was scrubbed... URL: From dudzikp at yahoo.com Wed Aug 25 13:57:55 2021 From: dudzikp at yahoo.com (dudzikp at yahoo.com) Date: Wed, 25 Aug 2021 11:57:55 +0000 (UTC) Subject: [basex-talk] EMail module and javax.activation.DataSource References: <1226308081.348411.1629892675689.ref@mail.yahoo.com> Message-ID: <1226308081.348411.1629892675689@mail.yahoo.com> Dear all, I am trying to use a basex Email module http://files.basex.org/modules/org/basex/modules/email/EMail.jar. I downloaded a new basex instance (9.6 version) and added this jar to lib directory. Based on the xquery/email.xq file I created the following file: import module namespace email = 'http://basex.org/modules/email/EMail'; let $mail := ? ??? myuser at machine-office ??? myuser at machine-office ??? localhost ??? Hello! ??? Enjoy ? return ? email:send($mail) While running the file I obtain: Stopped at /home/myuser/Downloads/basex/file, 12/13: [XPTY0004] javax.activation.DataSource. Caused by: org.basex.modules.email.EMail:send(element()). What's the problem? Shouldn't I use this module? BR From nicolas at abes.fr Wed Aug 25 15:12:52 2021 From: nicolas at abes.fr (Yann NICOLAS (ABES)) Date: Wed, 25 Aug 2021 15:12:52 +0200 Subject: [basex-talk] XQuery output without namespace declaration Message-ID: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> Hi all, I am looking for the equivalent instruction of XSLT attribute @omit-xml-declaration in XQuery. My input is : > > ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"*> > ??? 01321nam a22002772a 4500 > ??? > ????? > ??????? 1808001595 > ????? > ??? > ? > My query is : > declare namespace marc="http://www.loc.gov/MARC21/slim"; > > for $record in db:open('marcxml_full')/marc/marc:record > return > insert node $record/c into db:open('uk_parlement_ead')/dsc The ouput is : > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" *level="item"> > ????? > ??????? 1808001595 > ????? > ??? As you can see, there are no marc: elements in this output, hence no need for the marc: namespace. How to get rid of @xmlns:marc and xmlns:xsi ? Thanks a lot for your help ! Regards Yann -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.honnen at gmx.de Wed Aug 25 15:20:44 2021 From: martin.honnen at gmx.de (Martin Honnen) Date: Wed, 25 Aug 2021 15:20:44 +0200 Subject: [basex-talk] XQuery output without namespace declaration In-Reply-To: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> References: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> Message-ID: Am 25.08.2021 um 15:12 schrieb Yann NICOLAS (ABES): > > Hi all, > > I am looking for the equivalent instruction of XSLT attribute > @omit-xml-declaration in XQuery. > In the Query prolog you can declare declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization"; declare option output:method 'xml'; declare option output:omit-xml-declaration 'yes'; > My input is : > >> >> ? > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"*> >> ??? 01321nam a22002772a 4500 >> ??? >> ????? >> ??????? 1808001595 >> ????? >> ??? >> ? >> > > My query is : > >> declare namespace marc="http://www.loc.gov/MARC21/slim"; >> >> for $record in db:open('marcxml_full')/marc/marc:record >> return >> insert node $record/c into db:open('uk_parlement_ead')/dsc > The ouput is : > >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" *level="item"> >> ????? >> ??????? 1808001595 >> ????? >> ??? > As you can see, there are no marc: elements in this output, hence no > need for the marc: namespace. > How to get rid of @xmlns:marc and xmlns:xsi ? That seems to be a different issue from the XML declaration, if the nodes you copy from the one db into the other have a namespace in scope than that namespace is copied through. Perhaps ?? insert node $record/c ! element { node-name() } {? @*, node() } into db:open('uk_parlement_ead')/dsc does what you need. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Omar.Siam at oeaw.ac.at Wed Aug 25 15:54:22 2021 From: Omar.Siam at oeaw.ac.at (Omar Siam) Date: Wed, 25 Aug 2021 15:54:22 +0200 Subject: [basex-talk] EMail module and javax.activation.DataSource In-Reply-To: <1226308081.348411.1629892675689@mail.yahoo.com> References: <1226308081.348411.1629892675689.ref@mail.yahoo.com> <1226308081.348411.1629892675689@mail.yahoo.com> Message-ID: <16e6c83a-0540-9af8-c113-dd15859a01f4@oeaw.ac.at> Hello, Are you using JDK 11 (or newer)? javax.activation is no longer part of the JDK but the jar is available separately. I stumbled upon this in exist-db but maybe it is the same problem here? So JDK 1.8 should work and adding the jar https://search.maven.org/remotecontent?filepath=javax/activation/activation/1.1.1/activation-1.1.1.jar to the lib or lib/custom folder should work to. Best regards Omar Siam Am 25.08.2021 um 13:57 schrieb dudzikp at yahoo.com: > Dear all, > > I am trying to use a basex Email module http://files.basex.org/modules/org/basex/modules/email/EMail.jar. I downloaded a new basex instance (9.6 version) and added this jar to lib directory. Based on the xquery/email.xq file I created the following file: > > import module namespace email = 'http://basex.org/modules/email/EMail'; > > let $mail := > ? > ??? myuser at machine-office > ??? myuser at machine-office > ??? localhost > ??? Hello! > ??? Enjoy > ? > return > ? email:send($mail) > > While running the file I obtain: > > Stopped at /home/myuser/Downloads/basex/file, 12/13: > [XPTY0004] javax.activation.DataSource. Caused by: org.basex.modules.email.EMail:send(element()). > > What's the problem? Shouldn't I use this module? > > BR -- Mag. Ing. Omar Siam Austrian Center for Digital Humanities and Cultural Heritage ?sterreichische Akademie der Wissenschaften | Austrian Academy of Sciences Stellvertretende Behindertenvertrauensperson | Deputy representative for disabled persons Wohllebengasse 12-14, 1040 Wien, ?sterreich | Vienna, Austria T: +43 1 51581-7295 omar.siam at oeaw.ac.at | www.oeaw.ac.at/acdh From nicolas at abes.fr Wed Aug 25 16:50:22 2021 From: nicolas at abes.fr (Yann NICOLAS (ABES)) Date: Wed, 25 Aug 2021 16:50:22 +0200 Subject: [basex-talk] XQuery output without namespace declaration In-Reply-To: References: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> Message-ID: <9cc10f96-486d-8ff1-fa02-ceaa50e9688d@abes.fr> Le 25/08/2021 ? 15:20, Martin Honnen a ?crit?: > > > Am 25.08.2021 um 15:12 schrieb Yann NICOLAS (ABES): >> >> Hi all, >> >> I am looking for the equivalent instruction of XSLT attribute >> @omit-xml-declaration in XQuery. >> > > In the Query prolog you can declare > > > declare namespace output = > "http://www.w3.org/2010/xslt-xquery-serialization"; > > declare option output:method 'xml'; > declare option output:omit-xml-declaration 'yes'; > Thanks Martin. In the user interface, it is working when the xml source is stored in a let variable, but it's not when the xml source is retrieved from a BaseX db. > declare namespace marc="http://www.loc.gov/MARC21/slim"; > > declare namespace output = > "http://www.w3.org/2010/xslt-xquery-serialization"; > > declare option output:method 'xml'; > declare option output:omit-xml-declaration 'yes'; > > for $record in *db:open('marcxml_full')*//marc:record[1] > > return > $record/c -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas at abes.fr Wed Aug 25 17:16:27 2021 From: nicolas at abes.fr (Yann NICOLAS (ABES)) Date: Wed, 25 Aug 2021 17:16:27 +0200 Subject: [basex-talk] XQuery output without namespace declaration In-Reply-To: <9cc10f96-486d-8ff1-fa02-ceaa50e9688d@abes.fr> References: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> <9cc10f96-486d-8ff1-fa02-ceaa50e9688d@abes.fr> Message-ID: <8187a609-c062-dd33-1927-c4884216c216@abes.fr> Actually, i am trying to omit the *namespaces*, not the xml declaration. Sorry for the mistake in my first post, Martin. So i am looking for something like : *@exclude-result-prefixes* (as found in XSLT 3.0). And indeed, in BaseX (9.5.1), it seems to be a different behaviour if the xml source is stored in a let variable or in a db. If the xml source is stored in a variable, the exclusion of prefixes is automatic, as in : > declare namespace marc="http://www.loc.gov/MARC21/slim"; > > let $xml := > > ? xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > ??? 01321nam a22002772a 4500 > ??? > ????? > ??????? 1808001595 > ????? > ??? > ? > > > for $record in $xml/marc:record[1] > > return > $record/c which gives a nice : > > ? > ??? 1808001595 > ? > Le 25/08/2021 ? 16:50, Yann NICOLAS (ABES) a ?crit?: > > > Le 25/08/2021 ? 15:20, Martin Honnen a ?crit?: >> >> >> Am 25.08.2021 um 15:12 schrieb Yann NICOLAS (ABES): >>> >>> Hi all, >>> >>> I am looking for the equivalent instruction of XSLT attribute >>> @omit-xml-declaration in XQuery. >>> >> >> In the Query prolog you can declare >> >> >> declare namespace output = >> "http://www.w3.org/2010/xslt-xquery-serialization"; >> >> declare option output:method 'xml'; >> declare option output:omit-xml-declaration 'yes'; >> > Thanks Martin. > > In the user interface, it is working when the xml source is stored in > a let variable, but it's not when the xml source is retrieved from a > BaseX db. > >> declare namespace marc="http://www.loc.gov/MARC21/slim"; >> >> declare namespace output = >> "http://www.w3.org/2010/xslt-xquery-serialization"; >> >> declare option output:method 'xml'; >> declare option output:omit-xml-declaration 'yes'; >> >> for $record in *db:open('marcxml_full')*//marc:record[1] >> >> return >> $record/c > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.honnen at gmx.de Wed Aug 25 17:20:07 2021 From: martin.honnen at gmx.de (Martin Honnen) Date: Wed, 25 Aug 2021 17:20:07 +0200 Subject: [basex-talk] XQuery output without namespace declaration In-Reply-To: <8187a609-c062-dd33-1927-c4884216c216@abes.fr> References: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> <9cc10f96-486d-8ff1-fa02-ceaa50e9688d@abes.fr> <8187a609-c062-dd33-1927-c4884216c216@abes.fr> Message-ID: <9991b742-e1c9-8c1b-160e-3ab956a3a30d@gmx.de> Am 25.08.2021 um 17:16 schrieb Yann NICOLAS (ABES): > > Actually, i am trying to omit the *namespaces*, not the xml > declaration. Sorry for the mistake in my first post, Martin. > Did you see my other suggestion in the first answer? to try to change your XQuery code to use ?? insert node $record/c ! element { node-name() } {? @*, node() } into db:open('uk_parlement_ead')/dsc -------------- next part -------------- An HTML attachment was scrubbed... URL: From nicolas at abes.fr Wed Aug 25 17:41:22 2021 From: nicolas at abes.fr (Yann NICOLAS (ABES)) Date: Wed, 25 Aug 2021 17:41:22 +0200 Subject: [basex-talk] XQuery output without namespace declaration In-Reply-To: <9991b742-e1c9-8c1b-160e-3ab956a3a30d@gmx.de> References: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> <9cc10f96-486d-8ff1-fa02-ceaa50e9688d@abes.fr> <8187a609-c062-dd33-1927-c4884216c216@abes.fr> <9991b742-e1c9-8c1b-160e-3ab956a3a30d@gmx.de> Message-ID: Le 25/08/2021 ? 17:20, Martin Honnen a ?crit?: > > > Am 25.08.2021 um 17:16 schrieb Yann NICOLAS (ABES): >> >> Actually, i am trying to omit the *namespaces*, not the xml >> declaration. Sorry for the mistake in my first post, Martin. >> > > Did you see my other suggestion in the first answer? to try to change > your XQuery code to use > > ?? insert node $record/c ! element { node-name() } {? @*, node() } > into db:open('uk_parlement_ead')/dsc > Oh, i missed it ! Sorry. It is working ... at the level : > > ? xmlns:marc="http://www.loc.gov/MARC21/slim"*> > ??? 1808001595 > ??? Select Committee on Acts regarding Use of Broad Wheels, > and Regulations for Preservation of Turnpike Roads and Highways of > United Kingdom First Report, Appendix > ??? 1808 > ??? Vol.II, 135 pp. > ??? 225 pages > ??? xxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxx > HTTP://parlipapers.proquest.com/parlipapers/docview/t70.d75.1808-001595 > ? > ? xmlns:marc="http://www.loc.gov/MARC21/slim"> > ??? Roads and bridges > ??? Transport and communication > ??? Turnpike roads > ??? Turnpike roads and trusts > ? > -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin.honnen at gmx.de Wed Aug 25 17:54:39 2021 From: martin.honnen at gmx.de (Martin Honnen) Date: Wed, 25 Aug 2021 17:54:39 +0200 Subject: [basex-talk] XQuery output without namespace declaration In-Reply-To: References: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> <9cc10f96-486d-8ff1-fa02-ceaa50e9688d@abes.fr> <8187a609-c062-dd33-1927-c4884216c216@abes.fr> <9991b742-e1c9-8c1b-160e-3ab956a3a30d@gmx.de> Message-ID: Am 25.08.2021 um 17:41 schrieb Yann NICOLAS (ABES): >> >> Did you see my other suggestion in the first answer? to try to change >> your XQuery code to use >> >> ?? insert node $record/c ! element { node-name() } {? @*, node() } >> into db:open('uk_parlement_ead')/dsc >> > Oh, i missed it ! Sorry. > > It is working ... at the level : > >> >> ? > xmlns:marc="http://www.loc.gov/MARC21/slim"*> I see, I guess one way would be to write a recursive function you pass that `c` element to that then recreates any element like in the above snippet, only recursively e.g. declare function local:strip-namespaces($node as node()) as node() { ??? typeswitch($node) ????? case element() ??????? return element { node-name($node) } { $node/@*, $node/node()!local:strip-namespaces(.) } ????? default ??????? return $node }; and then use e.g. insert node $record/c ! local:strip-namespaces(.) into db:open('uk_parlement_ead')/dsc Hopefully there is an easier way using XQuery update instructions but I am not good enough with them to know. -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.gruen at gmail.com Wed Aug 25 18:00:57 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Wed, 25 Aug 2021 18:00:57 +0200 Subject: [basex-talk] XQuery output without namespace declaration In-Reply-To: References: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> <9cc10f96-486d-8ff1-fa02-ceaa50e9688d@abes.fr> <8187a609-c062-dd33-1927-c4884216c216@abes.fr> <9991b742-e1c9-8c1b-160e-3ab956a3a30d@gmx.de> Message-ID: Hi Yann, The common way to do this is as Martin proposed: You can strip namespaces via a recursive function. See [1] for an example. As this is a frequently asked feature, it would about time to define a mode or built-in function for this purpose in BaseX. An equivalent solution for exclude-result-prefixes could also be proposed for XQuery 4.0 [2]? Salutations, Christian [1] https://www.mail-archive.com/basex-talk at mailman.uni-konstanz.de/msg13678.html [2] https://github.com/qt4cg/qtspecs/issues On Wed, Aug 25, 2021 at 5:54 PM Martin Honnen wrote: > > > Am 25.08.2021 um 17:41 schrieb Yann NICOLAS (ABES): > > Did you see my other suggestion in the first answer to try to change your XQuery code to use > > insert node $record/c ! element { node-name() } { @*, node() } into db:open('uk_parlement_ead')/dsc > > Oh, i missed it ! Sorry. > > It is working ... at the level : > > > > > > > I see, I guess one way would be to write a recursive function you pass that `c` element to that then recreates any element like in the above snippet, only recursively e.g. > > > declare function local:strip-namespaces($node as node()) as node() > { > typeswitch($node) > case element() > return element { node-name($node) } { $node/@*, $node/node()!local:strip-namespaces(.) } > default > return $node > > }; > > > and then use e.g. > > > insert node $record/c ! local:strip-namespaces(.) into db:open('uk_parlement_ead')/dsc > > > Hopefully there is an easier way using XQuery update instructions but I am not good enough with them to know. From nicolas at abes.fr Wed Aug 25 18:13:01 2021 From: nicolas at abes.fr (Yann NICOLAS (ABES)) Date: Wed, 25 Aug 2021 18:13:01 +0200 Subject: [basex-talk] XQuery output without namespace declaration In-Reply-To: References: <2b1c1d85-6da4-13dc-9d89-63878d06b40c@abes.fr> <9cc10f96-486d-8ff1-fa02-ceaa50e9688d@abes.fr> <8187a609-c062-dd33-1927-c4884216c216@abes.fr> <9991b742-e1c9-8c1b-160e-3ab956a3a30d@gmx.de> Message-ID: @Martin You solved my problem ! Thanks a lot because i have learned a lot today (! operator, typeswitch). @Christian Indeed it would be a convenient feature in BaseX, even better in the spec. Yann Le 25/08/2021 ? 18:00, Christian Gr?n a ?crit?: > Hi Yann, > > The common way to do this is as Martin proposed: You can strip > namespaces via a recursive function. See [1] for an example. > > As this is a frequently asked feature, it would about time to define a > mode or built-in function for this purpose in BaseX. An equivalent > solution for exclude-result-prefixes could also be proposed for XQuery > 4.0 [2]? > > Salutations, > Christian > > [1] https://www.mail-archive.com/basex-talk at mailman.uni-konstanz.de/msg13678.html > [2] https://github.com/qt4cg/qtspecs/issues > > > > > On Wed, Aug 25, 2021 at 5:54 PM Martin Honnen wrote: >> >> Am 25.08.2021 um 17:41 schrieb Yann NICOLAS (ABES): >> >> Did you see my other suggestion in the first answer to try to change your XQuery code to use >> >> insert node $record/c ! element { node-name() } { @*, node() } into db:open('uk_parlement_ead')/dsc >> >> Oh, i missed it ! Sorry. >> >> It is working ... at the level : >> >> >> >> >> >> >> I see, I guess one way would be to write a recursive function you pass that `c` element to that then recreates any element like in the above snippet, only recursively e.g. >> >> >> declare function local:strip-namespaces($node as node()) as node() >> { >> typeswitch($node) >> case element() >> return element { node-name($node) } { $node/@*, $node/node()!local:strip-namespaces(.) } >> default >> return $node >> >> }; >> >> >> and then use e.g. >> >> >> insert node $record/c ! local:strip-namespaces(.) into db:open('uk_parlement_ead')/dsc >> >> >> Hopefully there is an easier way using XQuery update instructions but I am not good enough with them to know. From kim.galeazzi at inspirage.com Wed Aug 25 22:25:35 2021 From: kim.galeazzi at inspirage.com (Kim Galeazzi) Date: Wed, 25 Aug 2021 20:25:35 +0000 Subject: [basex-talk] Error running dba in Tomcat 9.0 with BaseX v. 9.5 and above Message-ID: Launching the dba application in BaseX 9.5 and above deployed on Tomcat 9.0 throws an error: Exception javax.servlet.ServletException: Servlet execution threw an exception org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) Root Cause java.lang.NoClassDefFoundError: org/eclipse/jetty/websocket/api/WebSocketAdapter java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:760) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478) org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215) org.basex.query.func.session.SessionFn.session(SessionFn.java:31) org.basex.query.func.session.SessionGet.value(SessionGet.java:17) org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46) org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71) org.basex.query.expr.If.expr(If.java:181) org.basex.query.expr.If.iter(If.java:161) org.basex.query.scope.MainModule.iter(MainModule.java:97) org.basex.query.QueryContext.iter(QueryContext.java:326) org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84) org.basex.http.web.WebResponse.create(WebResponse.java:66) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69) org.basex.http.BaseXServlet.service(BaseXServlet.java:65) javax.servlet.http.HttpServlet.service(HttpServlet.java:764) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) Root Cause java.lang.ClassNotFoundException: org.eclipse.jetty.websocket.api.WebSocketAdapter org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1407) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215) java.lang.ClassLoader.defineClass1(Native Method) java.lang.ClassLoader.defineClass(ClassLoader.java:760) java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478) org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215) org.basex.query.func.session.SessionFn.session(SessionFn.java:31) org.basex.query.func.session.SessionGet.value(SessionGet.java:17) org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46) org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71) org.basex.query.expr.If.expr(If.java:181) org.basex.query.expr.If.iter(If.java:161) org.basex.query.scope.MainModule.iter(MainModule.java:97) org.basex.query.QueryContext.iter(QueryContext.java:326) org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84) org.basex.http.web.WebResponse.create(WebResponse.java:66) org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69) org.basex.http.BaseXServlet.service(BaseXServlet.java:65) javax.servlet.http.HttpServlet.service(HttpServlet.java:764) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) I tried adding the Ecplise websocket API jar to the lib folder without success. Any ideas? We rely on the RESTXQ for our implementations and find the dba web application very convenient for accessing the logs and managing the database. Thank you. [cid:image001.jpg at 01D799B4.AF02AC70] Kim Galeazzi | Manager, Solution Architecture, Oracle/Agile PLM Consulting Office: 408-680-8837 | Mobile: 408-466-2121 | Campbell, CA This email communication is considered business confidential and intended for the original recipient of this email only. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 1831 bytes Desc: image001.jpg URL: From christian.gruen at gmail.com Thu Aug 26 09:53:08 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Thu, 26 Aug 2021 09:53:08 +0200 Subject: [basex-talk] Error running dba in Tomcat 9.0 with BaseX v. 9.5 and above In-Reply-To: References: Message-ID: Hi Kim, Thanks for the observation. As BaseX WebSocket support is tightly coupled with Jetty, newer WAR files cannot be deployed with other web servers anymore (namely, Tomcat, Jboss, possibly others). I?ve opened an issue to get this fixed in a future release [1]. Best, Christian [1] https://github.com/BaseXdb/basex/issues/2037 On Wed, Aug 25, 2021 at 10:25 PM Kim Galeazzi wrote: > Launching the dba application in BaseX 9.5 and above deployed on Tomcat > 9.0 throws an error: > > > > *Exception* > > javax.servlet.ServletException: Servlet execution threw an exception > > > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) > > *Root Cause* > > java.lang.NoClassDefFoundError: > org/eclipse/jetty/websocket/api/WebSocketAdapter > > java.lang.ClassLoader.defineClass1(Native Method) > > java.lang.ClassLoader.defineClass(ClassLoader.java:760) > > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > > > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478) > > > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870) > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371) > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215) > > org.basex.query.func.session.SessionFn.session(SessionFn.java:31) > > org.basex.query.func.session.SessionGet.value(SessionGet.java:17) > > org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46) > > org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71) > > org.basex.query.expr.If.expr(If.java:181) > > org.basex.query.expr.If.iter(If.java:161) > > org.basex.query.scope.MainModule.iter(MainModule.java:97) > > org.basex.query.QueryContext.iter(QueryContext.java:326) > > > org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84) > > org.basex.http.web.WebResponse.create(WebResponse.java:66) > > org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69) > > org.basex.http.BaseXServlet.service(BaseXServlet.java:65) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:764) > > > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) > > *Root Cause* > > java.lang.ClassNotFoundException: > org.eclipse.jetty.websocket.api.WebSocketAdapter > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1407) > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215) > > java.lang.ClassLoader.defineClass1(Native Method) > > java.lang.ClassLoader.defineClass(ClassLoader.java:760) > > > java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) > > > org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478) > > > org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870) > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371) > > > org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215) > > org.basex.query.func.session.SessionFn.session(SessionFn.java:31) > > org.basex.query.func.session.SessionGet.value(SessionGet.java:17) > > org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46) > > org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71) > > org.basex.query.expr.If.expr(If.java:181) > > org.basex.query.expr.If.iter(If.java:161) > > org.basex.query.scope.MainModule.iter(MainModule.java:97) > > org.basex.query.QueryContext.iter(QueryContext.java:326) > > > org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84) > > org.basex.http.web.WebResponse.create(WebResponse.java:66) > > org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69) > > org.basex.http.BaseXServlet.service(BaseXServlet.java:65) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:764) > > > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) > > > > I tried adding the Ecplise websocket API jar to the lib folder without > success. Any ideas? > > > > We rely on the RESTXQ for our implementations and find the dba web > application very convenient for accessing the logs and managing the > database. > > > > Thank you. > > > > *Kim Galeazzi |* Manager, Solution Architecture, Oracle/Agile PLM > Consulting > > Office: 408-680-8837 <%28408%29%20680-8837> | Mobile: 408-466-2121 > <%28408%29%20466-2121> | Campbell, CA > > *This email communication is considered business confidential and intended > for the original recipient of this email only.* > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.jpg Type: image/jpeg Size: 1831 bytes Desc: not available URL: From christian.gruen at gmail.com Thu Aug 26 11:27:35 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Thu, 26 Aug 2021 11:27:35 +0200 Subject: [basex-talk] BaseX 9.6.1: Patch release In-Reply-To: References: Message-ID: Hi again, A new BaseX patch release is available, which resolves a GUI icon bug and includes minor new XQuery tweaks: https://basex.org/ Next, due to privacy concerns, we have disabled the automatic GUI update check at startup time. You can manually re-enable it by choosing: 1. Help ? Check for Updates 2. Do you want to have automatic checks for updates? ? Yes For those who are interested in what?s going on: The URL https://files.basex.org/version.txt is called via a standard HttpURLConnection instance [1]; no additional user-specific data will (and has ever) be sent to our server. Have fun, and thanks for your support, Christian [1] https://github.com/BaseXdb/basex/blob/2672bee5797f59aa4e8a67461db5d906d8e29341/basex-core/src/main/java/org/basex/gui/GUI.java#L706 From skynexion at gmail.com Fri Aug 27 11:17:07 2021 From: skynexion at gmail.com (Artur Moor) Date: Fri, 27 Aug 2021 11:17:07 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= Message-ID: *Dear all,* *When executing an SQL query with the SQL module:* sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") *I get the following error message:* Error: Stopped at /Users/sa/staging/file, 3/19: [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. Compiling: - inline let $connection_0 := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") - simplify FLWOR expression: sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE") Optimized Query: (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")) Query: sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") Query Plan: com.microsoft.sqlserver.jdbc.SQLServerDriver jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME username pa$$w0rd SELECT * FROM TABLE *Does anyone have an idea what the problem is?* *Any hints are welcome!* -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.gruen at gmail.com Fri Aug 27 11:37:59 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Fri, 27 Aug 2021 11:37:59 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= In-Reply-To: References: Message-ID: Hi Artur, Thanks for the full info view output. The issue seems to be specific to MS SQL. Could you run basex on command line with the -d flag and share the output with us? Thanks in advance Christian On Fri, Aug 27, 2021 at 11:17 AM Artur Moor wrote: > > Dear all, > > When executing an SQL query with the SQL module: > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), > let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > return sql:execute($connection, "SELECT * FROM TABLE") > > I get the following error message: > Error: > Stopped at /Users/sa/staging/file, 3/19: > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > Compiling: > - inline let $connection_0 := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > - simplify FLWOR expression: sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE") > Optimized Query: > (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")) > Query: > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") > Query Plan: > > > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > > > jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME > username > pa$$w0rd > > > > SELECT * FROM TABLE > > > > > > Does anyone have an idea what the problem is? > > Any hints are welcome! From skynexion at gmail.com Fri Aug 27 12:29:42 2021 From: skynexion at gmail.com (Artur Moor) Date: Fri, 27 Aug 2021 12:29:42 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= In-Reply-To: References: Message-ID: Hi Christian, # cat mssql-min.xq sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $c := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($c, "SELECT * FROM TABL") # basex -d ~/staging/mssql-min.xq Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL WARNUNG: TLSv1 was negotiated. Please update server and client to use TLSv1.2 at minimum. com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde geschlossen. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) at org.basex.query.QueryContext.next(QueryContext.java:347) at org.basex.query.expr.IterMap$1.next(IterMap.java:75) at org.basex.query.QueryContext.next(QueryContext.java:347) at org.basex.query.expr.List$1.next(List.java:164) at org.basex.query.scope.MainModule$1.next(MainModule.java:104) 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.BaseX.(BaseX.java:107) at org.basex.BaseX.main(BaseX.java:43) org.basex.query.QueryException: An SQL exception occurred: Das Resultset wurde geschlossen. at org.basex.query.QueryError.get(QueryError.java:1429) at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) at org.basex.query.QueryContext.next(QueryContext.java:347) at org.basex.query.expr.IterMap$1.next(IterMap.java:75) at org.basex.query.QueryContext.next(QueryContext.java:347) at org.basex.query.expr.List$1.next(List.java:164) at org.basex.query.scope.MainModule$1.next(MainModule.java:104) 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.BaseX.(BaseX.java:107) at org.basex.BaseX.main(BaseX.java:43) Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde geschlossen. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) ... 14 more org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 3/19: [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. 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.BaseX.(BaseX.java:107) at org.basex.BaseX.main(BaseX.java:43) Caused by: org.basex.query.QueryException: An SQL exception occurred: Das Resultset wurde geschlossen. at org.basex.query.QueryError.get(QueryError.java:1429) at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) at org.basex.query.QueryContext.next(QueryContext.java:347) at org.basex.query.expr.IterMap$1.next(IterMap.java:75) at org.basex.query.QueryContext.next(QueryContext.java:347) at org.basex.query.expr.List$1.next(List.java:164) at org.basex.query.scope.MainModule$1.next(MainModule.java:104) 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) ... 5 more Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde geschlossen. at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) ... 14 more Stopped at /Users/sa/staging/mssql-min.xq, 3/19: [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. Same invocation on version 9.5 of basex runs without errors: # ./basex95/bin/basex -d ~/staging/mssql-min.xq Aug. 27, 2021 12:25:49 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL WARNUNG: TLSv1 was negotiated. Please update server and client to use TLSv1.2 at minimum. ? I think the warning about TSL negotiation can be ignored. Am Fr., 27. Aug. 2021 um 11:38 Uhr schrieb Christian Gr?n : > > Hi Artur, > > Thanks for the full info view output. > > The issue seems to be specific to MS SQL. Could you run basex on > command line with the -d flag and share the output with us? > > Thanks in advance > Christian > > > On Fri, Aug 27, 2021 at 11:17 AM Artur Moor wrote: > > > > Dear all, > > > > When executing an SQL query with the SQL module: > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), > > let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > return sql:execute($connection, "SELECT * FROM TABLE") > > > > I get the following error message: > > Error: > > Stopped at /Users/sa/staging/file, 3/19: > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > Compiling: > > - inline let $connection_0 := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > - simplify FLWOR expression: sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE") > > Optimized Query: > > (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")) > > Query: > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") > > Query Plan: > > > > > > > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > > > > > > > jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME > > username > > pa$$w0rd > > > > > > > > SELECT * FROM TABLE > > > > > > > > > > > > Does anyone have an idea what the problem is? > > > > Any hints are welcome! From christian.gruen at gmail.com Fri Aug 27 12:57:07 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Fri, 27 Aug 2021 12:57:07 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= In-Reply-To: References: Message-ID: > return sql:execute($c, "SELECT * FROM TABL") Some wild guesses: ? I assume that "TABL" is correct? ? If your database contains a lot of entries: What happens if you request small results? ? What happens if you execute "SELECT 1 + 1"? ? Do you get the same error with sql:prepare and sql:execute-prepared? ? You could check the web for "makeFromDriverError SQLServerException: The connection is closed" I have currently no MS SQL instance running; maybe someone else has? Cheers, Christian > # basex -d ~/staging/mssql-min.xq > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > WARNUNG: TLSv1 was negotiated. Please update server and client to use > TLSv1.2 at minimum. > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde > geschlossen. > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > at org.basex.query.QueryContext.next(QueryContext.java:347) > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > at org.basex.query.QueryContext.next(QueryContext.java:347) > at org.basex.query.expr.List$1.next(List.java:164) > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > 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.BaseX.(BaseX.java:107) > at org.basex.BaseX.main(BaseX.java:43) > org.basex.query.QueryException: An SQL exception occurred: Das > Resultset wurde geschlossen. > at org.basex.query.QueryError.get(QueryError.java:1429) > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > at org.basex.query.QueryContext.next(QueryContext.java:347) > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > at org.basex.query.QueryContext.next(QueryContext.java:347) > at org.basex.query.expr.List$1.next(List.java:164) > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > 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.BaseX.(BaseX.java:107) > at org.basex.BaseX.main(BaseX.java:43) > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > Resultset wurde geschlossen. > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > ... 14 more > org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > 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.BaseX.(BaseX.java:107) > at org.basex.BaseX.main(BaseX.java:43) > Caused by: org.basex.query.QueryException: An SQL exception occurred: > Das Resultset wurde geschlossen. > at org.basex.query.QueryError.get(QueryError.java:1429) > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > at org.basex.query.QueryContext.next(QueryContext.java:347) > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > at org.basex.query.QueryContext.next(QueryContext.java:347) > at org.basex.query.expr.List$1.next(List.java:164) > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > 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) > ... 5 more > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > Resultset wurde geschlossen. > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > ... 14 more > Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > Same invocation on version 9.5 of basex runs without errors: > # ./basex95/bin/basex -d ~/staging/mssql-min.xq > Aug. 27, 2021 12:25:49 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > WARNUNG: TLSv1 was negotiated. Please update server and client to use > TLSv1.2 at minimum. > ? > > I think the warning about TSL negotiation can be ignored. > > Am Fr., 27. Aug. 2021 um 11:38 Uhr schrieb Christian Gr?n > : > > > > Hi Artur, > > > > Thanks for the full info view output. > > > > The issue seems to be specific to MS SQL. Could you run basex on > > command line with the -d flag and share the output with us? > > > > Thanks in advance > > Christian > > > > > > On Fri, Aug 27, 2021 at 11:17 AM Artur Moor wrote: > > > > > > Dear all, > > > > > > When executing an SQL query with the SQL module: > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), > > > let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > return sql:execute($connection, "SELECT * FROM TABLE") > > > > > > I get the following error message: > > > Error: > > > Stopped at /Users/sa/staging/file, 3/19: > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > Compiling: > > > - inline let $connection_0 := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > - simplify FLWOR expression: sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE") > > > Optimized Query: > > > (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")) > > > Query: > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") > > > Query Plan: > > > > > > > > > > > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > > > > > > > > > > > jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME > > > username > > > pa$$w0rd > > > > > > > > > > > > SELECT * FROM TABLE > > > > > > > > > > > > > > > > > > Does anyone have an idea what the problem is? > > > > > > Any hints are welcome! From skynexion at gmail.com Fri Aug 27 13:16:08 2021 From: skynexion at gmail.com (Artur Moor) Date: Fri, 27 Aug 2021 13:16:08 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= In-Reply-To: References: Message-ID: Hi, Christian, > I assume that "TABL" is correct? YES > If your database contains a lot of entries: What happens if you request small results? Same error > What happens if you execute "SELECT 1 + 1"? Same error > Do you get the same error with sql:prepare and sql:execute-prepared? Yes > You could check the web for "makeFromDriverError SQLServerException: The connection is closed". I think this is not the right direction because the error occurs only on the version 9.6 and 9.6.1 all previous versions work fine. Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Gr?n : > > > return sql:execute($c, "SELECT * FROM TABL") > > Some wild guesses: > > ? I assume that "TABL" is correct? > ? If your database contains a lot of entries: What happens if you > request small results? > ? What happens if you execute "SELECT 1 + 1"? > ? Do you get the same error with sql:prepare and sql:execute-prepared? > ? You could check the web for "makeFromDriverError SQLServerException: > The connection is closed" > > I have currently no MS SQL instance running; maybe someone else has? > > Cheers, > Christian > > > > # basex -d ~/staging/mssql-min.xq > > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > TLSv1.2 at minimum. > > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde > > geschlossen. > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > at org.basex.query.expr.List$1.next(List.java:164) > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > 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.BaseX.(BaseX.java:107) > > at org.basex.BaseX.main(BaseX.java:43) > > org.basex.query.QueryException: An SQL exception occurred: Das > > Resultset wurde geschlossen. > > at org.basex.query.QueryError.get(QueryError.java:1429) > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > at org.basex.query.expr.List$1.next(List.java:164) > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > 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.BaseX.(BaseX.java:107) > > at org.basex.BaseX.main(BaseX.java:43) > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > Resultset wurde geschlossen. > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > ... 14 more > > org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > 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.BaseX.(BaseX.java:107) > > at org.basex.BaseX.main(BaseX.java:43) > > Caused by: org.basex.query.QueryException: An SQL exception occurred: > > Das Resultset wurde geschlossen. > > at org.basex.query.QueryError.get(QueryError.java:1429) > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > at org.basex.query.expr.List$1.next(List.java:164) > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > 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) > > ... 5 more > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > Resultset wurde geschlossen. > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > ... 14 more > > Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > Same invocation on version 9.5 of basex runs without errors: > > # ./basex95/bin/basex -d ~/staging/mssql-min.xq > > Aug. 27, 2021 12:25:49 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > TLSv1.2 at minimum. > > ? > > > > I think the warning about TSL negotiation can be ignored. > > > > Am Fr., 27. Aug. 2021 um 11:38 Uhr schrieb Christian Gr?n > > : > > > > > > Hi Artur, > > > > > > Thanks for the full info view output. > > > > > > The issue seems to be specific to MS SQL. Could you run basex on > > > command line with the -d flag and share the output with us? > > > > > > Thanks in advance > > > Christian > > > > > > > > > On Fri, Aug 27, 2021 at 11:17 AM Artur Moor wrote: > > > > > > > > Dear all, > > > > > > > > When executing an SQL query with the SQL module: > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), > > > > let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > return sql:execute($connection, "SELECT * FROM TABLE") > > > > > > > > I get the following error message: > > > > Error: > > > > Stopped at /Users/sa/staging/file, 3/19: > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > Compiling: > > > > - inline let $connection_0 := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > - simplify FLWOR expression: sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE") > > > > Optimized Query: > > > > (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")) > > > > Query: > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") > > > > Query Plan: > > > > > > > > > > > > > > > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > > > > > > > > > > > > > > > jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME > > > > username > > > > pa$$w0rd > > > > > > > > > > > > > > > > SELECT * FROM TABLE > > > > > > > > > > > > > > > > > > > > > > > > Does anyone have an idea what the problem is? > > > > > > > > Any hints are welcome! From christian.gruen at gmail.com Fri Aug 27 13:17:56 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Fri, 27 Aug 2021 13:17:56 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= In-Reply-To: References: Message-ID: > I think this is not the right direction because the error occurs only > on the version 9.6 and 9.6.1 all previous versions work fine. Thanks, that?s an important hint. I?ll try to reproduce this in a while (but it may take some time; I?ll be offline for a couple of days in September). > Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Gr?n > : > > > > > return sql:execute($c, "SELECT * FROM TABL") > > > > Some wild guesses: > > > > ? I assume that "TABL" is correct? > > ? If your database contains a lot of entries: What happens if you > > request small results? > > ? What happens if you execute "SELECT 1 + 1"? > > ? Do you get the same error with sql:prepare and sql:execute-prepared? > > ? You could check the web for "makeFromDriverError SQLServerException: > > The connection is closed" > > > > I have currently no MS SQL instance running; maybe someone else has? > > > > Cheers, > > Christian > > > > > > > # basex -d ~/staging/mssql-min.xq > > > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > > TLSv1.2 at minimum. > > > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde > > > geschlossen. > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > at org.basex.query.expr.List$1.next(List.java:164) > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > 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.BaseX.(BaseX.java:107) > > > at org.basex.BaseX.main(BaseX.java:43) > > > org.basex.query.QueryException: An SQL exception occurred: Das > > > Resultset wurde geschlossen. > > > at org.basex.query.QueryError.get(QueryError.java:1429) > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > at org.basex.query.expr.List$1.next(List.java:164) > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > 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.BaseX.(BaseX.java:107) > > > at org.basex.BaseX.main(BaseX.java:43) > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > > Resultset wurde geschlossen. > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > ... 14 more > > > org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > 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.BaseX.(BaseX.java:107) > > > at org.basex.BaseX.main(BaseX.java:43) > > > Caused by: org.basex.query.QueryException: An SQL exception occurred: > > > Das Resultset wurde geschlossen. > > > at org.basex.query.QueryError.get(QueryError.java:1429) > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > at org.basex.query.expr.List$1.next(List.java:164) > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > 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) > > > ... 5 more > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > > Resultset wurde geschlossen. > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > ... 14 more > > > Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > > Same invocation on version 9.5 of basex runs without errors: > > > # ./basex95/bin/basex -d ~/staging/mssql-min.xq > > > Aug. 27, 2021 12:25:49 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > > TLSv1.2 at minimum. > > > ? > > > > > > I think the warning about TSL negotiation can be ignored. > > > > > > Am Fr., 27. Aug. 2021 um 11:38 Uhr schrieb Christian Gr?n > > > : > > > > > > > > Hi Artur, > > > > > > > > Thanks for the full info view output. > > > > > > > > The issue seems to be specific to MS SQL. Could you run basex on > > > > command line with the -d flag and share the output with us? > > > > > > > > Thanks in advance > > > > Christian > > > > > > > > > > > > On Fri, Aug 27, 2021 at 11:17 AM Artur Moor wrote: > > > > > > > > > > Dear all, > > > > > > > > > > When executing an SQL query with the SQL module: > > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), > > > > > let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > > return sql:execute($connection, "SELECT * FROM TABLE") > > > > > > > > > > I get the following error message: > > > > > Error: > > > > > Stopped at /Users/sa/staging/file, 3/19: > > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > Compiling: > > > > > - inline let $connection_0 := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > > - simplify FLWOR expression: sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE") > > > > > Optimized Query: > > > > > (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")) > > > > > Query: > > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") > > > > > Query Plan: > > > > > > > > > > > > > > > > > > > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > > > > > > > > > > > > > > > > > > > jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME > > > > > username > > > > > pa$$w0rd > > > > > > > > > > > > > > > > > > > > SELECT * FROM TABLE > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Does anyone have an idea what the problem is? > > > > > > > > > > Any hints are welcome! From skynexion at gmail.com Fri Aug 27 13:22:36 2021 From: skynexion at gmail.com (Artur Moor) Date: Fri, 27 Aug 2021 13:22:36 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= In-Reply-To: References: Message-ID: Christian, thank you very much for your support! Probably there is somebody who has a MS SQL database and can check the sql module in Basex 9.6.1. Am Fr., 27. Aug. 2021 um 13:18 Uhr schrieb Christian Gr?n : > > > I think this is not the right direction because the error occurs only > > on the version 9.6 and 9.6.1 all previous versions work fine. > > Thanks, that?s an important hint. I?ll try to reproduce this in a > while (but it may take some time; I?ll be offline for a couple of days > in September). > > > > Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Gr?n > > : > > > > > > > return sql:execute($c, "SELECT * FROM TABL") > > > > > > Some wild guesses: > > > > > > ? I assume that "TABL" is correct? > > > ? If your database contains a lot of entries: What happens if you > > > request small results? > > > ? What happens if you execute "SELECT 1 + 1"? > > > ? Do you get the same error with sql:prepare and sql:execute-prepared? > > > ? You could check the web for "makeFromDriverError SQLServerException: > > > The connection is closed" > > > > > > I have currently no MS SQL instance running; maybe someone else has? > > > > > > Cheers, > > > Christian > > > > > > > > > > # basex -d ~/staging/mssql-min.xq > > > > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > > > TLSv1.2 at minimum. > > > > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde > > > > geschlossen. > > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > at org.basex.query.expr.List$1.next(List.java:164) > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > > 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.BaseX.(BaseX.java:107) > > > > at org.basex.BaseX.main(BaseX.java:43) > > > > org.basex.query.QueryException: An SQL exception occurred: Das > > > > Resultset wurde geschlossen. > > > > at org.basex.query.QueryError.get(QueryError.java:1429) > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > at org.basex.query.expr.List$1.next(List.java:164) > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > > 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.BaseX.(BaseX.java:107) > > > > at org.basex.BaseX.main(BaseX.java:43) > > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > > > Resultset wurde geschlossen. > > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > > ... 14 more > > > > org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > 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.BaseX.(BaseX.java:107) > > > > at org.basex.BaseX.main(BaseX.java:43) > > > > Caused by: org.basex.query.QueryException: An SQL exception occurred: > > > > Das Resultset wurde geschlossen. > > > > at org.basex.query.QueryError.get(QueryError.java:1429) > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > at org.basex.query.expr.List$1.next(List.java:164) > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > > 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) > > > > ... 5 more > > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > > > Resultset wurde geschlossen. > > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > > ... 14 more > > > > Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > > > > Same invocation on version 9.5 of basex runs without errors: > > > > # ./basex95/bin/basex -d ~/staging/mssql-min.xq > > > > Aug. 27, 2021 12:25:49 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > > > TLSv1.2 at minimum. > > > > ? > > > > > > > > I think the warning about TSL negotiation can be ignored. > > > > > > > > Am Fr., 27. Aug. 2021 um 11:38 Uhr schrieb Christian Gr?n > > > > : > > > > > > > > > > Hi Artur, > > > > > > > > > > Thanks for the full info view output. > > > > > > > > > > The issue seems to be specific to MS SQL. Could you run basex on > > > > > command line with the -d flag and share the output with us? > > > > > > > > > > Thanks in advance > > > > > Christian > > > > > > > > > > > > > > > On Fri, Aug 27, 2021 at 11:17 AM Artur Moor wrote: > > > > > > > > > > > > Dear all, > > > > > > > > > > > > When executing an SQL query with the SQL module: > > > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), > > > > > > let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > > > return sql:execute($connection, "SELECT * FROM TABLE") > > > > > > > > > > > > I get the following error message: > > > > > > Error: > > > > > > Stopped at /Users/sa/staging/file, 3/19: > > > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > > Compiling: > > > > > > - inline let $connection_0 := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > > > - simplify FLWOR expression: sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE") > > > > > > Optimized Query: > > > > > > (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")) > > > > > > Query: > > > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") > > > > > > Query Plan: > > > > > > > > > > > > > > > > > > > > > > > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > > > > > > > > > > > > > > > > > > > > > > > jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME > > > > > > username > > > > > > pa$$w0rd > > > > > > > > > > > > > > > > > > > > > > > > SELECT * FROM TABLE > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Does anyone have an idea what the problem is? > > > > > > > > > > > > Any hints are welcome! From christian.gruen at gmail.com Fri Aug 27 13:26:32 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Fri, 27 Aug 2021 13:26:32 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= In-Reply-To: References: Message-ID: ?and I should have slowed down: I found a FindBug ?bug fix? that, I believe, has caused the issue [1]. Could you give the latest snapshot a try[2]? [1] https://github.com/BaseXdb/basex/commit/993d137f108461e4eec862640d23eb4ba98b59b5 [2] https://files.basex.org/releases/latest/ On Fri, Aug 27, 2021 at 1:22 PM Artur Moor wrote: > > Christian, thank you very much for your support! > > Probably there is somebody who has a MS SQL database and can check the > sql module in Basex 9.6.1. > > Am Fr., 27. Aug. 2021 um 13:18 Uhr schrieb Christian Gr?n > : > > > > > I think this is not the right direction because the error occurs only > > > on the version 9.6 and 9.6.1 all previous versions work fine. > > > > Thanks, that?s an important hint. I?ll try to reproduce this in a > > while (but it may take some time; I?ll be offline for a couple of days > > in September). > > > > > > > Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Gr?n > > > : > > > > > > > > > return sql:execute($c, "SELECT * FROM TABL") > > > > > > > > Some wild guesses: > > > > > > > > ? I assume that "TABL" is correct? > > > > ? If your database contains a lot of entries: What happens if you > > > > request small results? > > > > ? What happens if you execute "SELECT 1 + 1"? > > > > ? Do you get the same error with sql:prepare and sql:execute-prepared? > > > > ? You could check the web for "makeFromDriverError SQLServerException: > > > > The connection is closed" > > > > > > > > I have currently no MS SQL instance running; maybe someone else has? > > > > > > > > Cheers, > > > > Christian > > > > > > > > > > > > > # basex -d ~/staging/mssql-min.xq > > > > > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > > > > TLSv1.2 at minimum. > > > > > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde > > > > > geschlossen. > > > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > at org.basex.query.expr.List$1.next(List.java:164) > > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > > > 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.BaseX.(BaseX.java:107) > > > > > at org.basex.BaseX.main(BaseX.java:43) > > > > > org.basex.query.QueryException: An SQL exception occurred: Das > > > > > Resultset wurde geschlossen. > > > > > at org.basex.query.QueryError.get(QueryError.java:1429) > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > at org.basex.query.expr.List$1.next(List.java:164) > > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > > > 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.BaseX.(BaseX.java:107) > > > > > at org.basex.BaseX.main(BaseX.java:43) > > > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > > > > Resultset wurde geschlossen. > > > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > > > ... 14 more > > > > > org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > 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.BaseX.(BaseX.java:107) > > > > > at org.basex.BaseX.main(BaseX.java:43) > > > > > Caused by: org.basex.query.QueryException: An SQL exception occurred: > > > > > Das Resultset wurde geschlossen. > > > > > at org.basex.query.QueryError.get(QueryError.java:1429) > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > at org.basex.query.expr.List$1.next(List.java:164) > > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > > > 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) > > > > > ... 5 more > > > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > > > > Resultset wurde geschlossen. > > > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > > > ... 14 more > > > > > Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > > > > > > Same invocation on version 9.5 of basex runs without errors: > > > > > # ./basex95/bin/basex -d ~/staging/mssql-min.xq > > > > > Aug. 27, 2021 12:25:49 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > > > > TLSv1.2 at minimum. > > > > > ? > > > > > > > > > > I think the warning about TSL negotiation can be ignored. > > > > > > > > > > Am Fr., 27. Aug. 2021 um 11:38 Uhr schrieb Christian Gr?n > > > > > : > > > > > > > > > > > > Hi Artur, > > > > > > > > > > > > Thanks for the full info view output. > > > > > > > > > > > > The issue seems to be specific to MS SQL. Could you run basex on > > > > > > command line with the -d flag and share the output with us? > > > > > > > > > > > > Thanks in advance > > > > > > Christian > > > > > > > > > > > > > > > > > > On Fri, Aug 27, 2021 at 11:17 AM Artur Moor wrote: > > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > When executing an SQL query with the SQL module: > > > > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), > > > > > > > let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > > > > return sql:execute($connection, "SELECT * FROM TABLE") > > > > > > > > > > > > > > I get the following error message: > > > > > > > Error: > > > > > > > Stopped at /Users/sa/staging/file, 3/19: > > > > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > > > Compiling: > > > > > > > - inline let $connection_0 := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > > > > - simplify FLWOR expression: sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE") > > > > > > > Optimized Query: > > > > > > > (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")) > > > > > > > Query: > > > > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") > > > > > > > Query Plan: > > > > > > > > > > > > > > > > > > > > > > > > > > > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > > > > > > > > > > > > > > > > > > > > > > > > > > > jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME > > > > > > > username > > > > > > > pa$$w0rd > > > > > > > > > > > > > > > > > > > > > > > > > > > > SELECT * FROM TABLE > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Does anyone have an idea what the problem is? > > > > > > > > > > > > > > Any hints are welcome! From skynexion at gmail.com Fri Aug 27 13:33:26 2021 From: skynexion at gmail.com (Artur Moor) Date: Fri, 27 Aug 2021 13:33:26 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= In-Reply-To: References: Message-ID: The build https://files.basex.org/releases/latest/BaseX962-20210827.132409.zip runs without errors! Am Fr., 27. Aug. 2021 um 13:26 Uhr schrieb Christian Gr?n : > > ?and I should have slowed down: I found a FindBug ?bug fix? that, I > believe, has caused the issue [1]. Could you give the latest snapshot > a try[2]? > > [1] https://github.com/BaseXdb/basex/commit/993d137f108461e4eec862640d23eb4ba98b59b5 > [2] https://files.basex.org/releases/latest/ > > > > On Fri, Aug 27, 2021 at 1:22 PM Artur Moor wrote: > > > > Christian, thank you very much for your support! > > > > Probably there is somebody who has a MS SQL database and can check the > > sql module in Basex 9.6.1. > > > > Am Fr., 27. Aug. 2021 um 13:18 Uhr schrieb Christian Gr?n > > : > > > > > > > I think this is not the right direction because the error occurs only > > > > on the version 9.6 and 9.6.1 all previous versions work fine. > > > > > > Thanks, that?s an important hint. I?ll try to reproduce this in a > > > while (but it may take some time; I?ll be offline for a couple of days > > > in September). > > > > > > > > > > Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Gr?n > > > > : > > > > > > > > > > > return sql:execute($c, "SELECT * FROM TABL") > > > > > > > > > > Some wild guesses: > > > > > > > > > > ? I assume that "TABL" is correct? > > > > > ? If your database contains a lot of entries: What happens if you > > > > > request small results? > > > > > ? What happens if you execute "SELECT 1 + 1"? > > > > > ? Do you get the same error with sql:prepare and sql:execute-prepared? > > > > > ? You could check the web for "makeFromDriverError SQLServerException: > > > > > The connection is closed" > > > > > > > > > > I have currently no MS SQL instance running; maybe someone else has? > > > > > > > > > > Cheers, > > > > > Christian > > > > > > > > > > > > > > > > # basex -d ~/staging/mssql-min.xq > > > > > > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > > > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > > > > > TLSv1.2 at minimum. > > > > > > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde > > > > > > geschlossen. > > > > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > > at org.basex.query.expr.List$1.next(List.java:164) > > > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > > > > 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.BaseX.(BaseX.java:107) > > > > > > at org.basex.BaseX.main(BaseX.java:43) > > > > > > org.basex.query.QueryException: An SQL exception occurred: Das > > > > > > Resultset wurde geschlossen. > > > > > > at org.basex.query.QueryError.get(QueryError.java:1429) > > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > > at org.basex.query.expr.List$1.next(List.java:164) > > > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > > > > 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.BaseX.(BaseX.java:107) > > > > > > at org.basex.BaseX.main(BaseX.java:43) > > > > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > > > > > Resultset wurde geschlossen. > > > > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > > > > ... 14 more > > > > > > org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > > 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.BaseX.(BaseX.java:107) > > > > > > at org.basex.BaseX.main(BaseX.java:43) > > > > > > Caused by: org.basex.query.QueryException: An SQL exception occurred: > > > > > > Das Resultset wurde geschlossen. > > > > > > at org.basex.query.QueryError.get(QueryError.java:1429) > > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123) > > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75) > > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347) > > > > > > at org.basex.query.expr.List$1.next(List.java:164) > > > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104) > > > > > > 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) > > > > > > ... 5 more > > > > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das > > > > > > Resultset wurde geschlossen. > > > > > > at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234) > > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450) > > > > > > at com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992) > > > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84) > > > > > > ... 14 more > > > > > > Stopped at /Users/sa/staging/mssql-min.xq, 3/19: > > > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > > > > > > > > Same invocation on version 9.5 of basex runs without errors: > > > > > > # ./basex95/bin/basex -d ~/staging/mssql-min.xq > > > > > > Aug. 27, 2021 12:25:49 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL > > > > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use > > > > > > TLSv1.2 at minimum. > > > > > > ? > > > > > > > > > > > > I think the warning about TSL negotiation can be ignored. > > > > > > > > > > > > Am Fr., 27. Aug. 2021 um 11:38 Uhr schrieb Christian Gr?n > > > > > > : > > > > > > > > > > > > > > Hi Artur, > > > > > > > > > > > > > > Thanks for the full info view output. > > > > > > > > > > > > > > The issue seems to be specific to MS SQL. Could you run basex on > > > > > > > command line with the -d flag and share the output with us? > > > > > > > > > > > > > > Thanks in advance > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > On Fri, Aug 27, 2021 at 11:17 AM Artur Moor wrote: > > > > > > > > > > > > > > > > Dear all, > > > > > > > > > > > > > > > > When executing an SQL query with the SQL module: > > > > > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), > > > > > > > > let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > > > > > return sql:execute($connection, "SELECT * FROM TABLE") > > > > > > > > > > > > > > > > I get the following error message: > > > > > > > > Error: > > > > > > > > Stopped at /Users/sa/staging/file, 3/19: > > > > > > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen. > > > > > > > > Compiling: > > > > > > > > - inline let $connection_0 := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") > > > > > > > > - simplify FLWOR expression: sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE") > > > > > > > > Optimized Query: > > > > > > > > (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")) > > > > > > > > Query: > > > > > > > > sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE") > > > > > > > > Query Plan: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > com.microsoft.sqlserver.jdbc.SQLServerDriver > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME > > > > > > > > username > > > > > > > > pa$$w0rd > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > SELECT * FROM TABLE > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Does anyone have an idea what the problem is? > > > > > > > > > > > > > > > > Any hints are welcome! From christian.gruen at gmail.com Fri Aug 27 13:33:54 2021 From: christian.gruen at gmail.com (=?UTF-8?Q?Christian_Gr=C3=BCn?=) Date: Fri, 27 Aug 2021 13:33:54 +0200 Subject: [basex-talk] =?utf-8?q?Error_executing_an_SQL_query_using_=C2=AB?= =?utf-8?q?SQL_Module=C2=BB?= In-Reply-To: References: Message-ID: Awesome. On Fri, Aug 27, 2021 at 1:33 PM Artur Moor wrote: > > The build https://files.basex.org/releases/latest/BaseX962-20210827.132409.zip > runs without errors!