Re: [basex-talk] Incompatibility with Tomcat 10
Hi Christian, Many thanks. I hadn't tried that, but I'll definitely give it a go. It does sound like it will be a simple fix. RegardsMarc M. Balston M: +44 7786 263 906 On Tuesday, 5 April 2022, 17:54:45 BST, Christian Grün wrote: Maybe you can resolve the issue by following the instructions given on the homepage of Tomcat; did you try that? “Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 without changes. Java EE based applications designed for Tomcat 9 and earlier may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will automatically convert them to Jakarta EE and copy them to the webapps directory. This conversion is performed using the Apache Tomcat migration tool for Jakarta EE tool which is also available as a separate download for off-line use.” [1] Best, Christian [1] https://tomcat.apache.org/ On Tue, Apr 5, 2022 at 6:47 PM Christian Grün wrote: > > Hi Marc, > > Thanks for testing and the StackOverflow links. > > I think you’ve already discovered the weak spot, which is also > documented in the Tomcat Migration Guide [1]: The javax.servlet > packages are not available in Tomcat 10 anymore, so the import > statements of BaseX would need to be updated. > > As BaseX comes with Jetty as standard web server, which relies on the > javax.servlet package, the Open-Source version of BaseX will remain > unchanged; but we can offer a custom Tomcat 10 version of BaseX for > those who are using BaseX commercially. > > We’ll do some tests soon to confirm the assumption and update the > documentation [2]. > > Best, > Christian > > [1] https://tomcat.apache.org/migration-10.html > [2] https://github.com/BaseXdb/basex/issues/2085 > > > On Mon, Apr 4, 2022 at 2:34 PM Marc Balston wrote: > > > > Hi Christian, > > > > I was using BaseX 9.5 on Tomcat 8.5 and it was fine. > > > > On Tomcat 10.0.2 I couldn't get either BaseX 9.5 or 9.7 to work (same > > issue). > > > > I now have Tomcat 9.0.62 running and I've successfully run both BaseX 9.5 > > and 9.7. > > > > Regards > > Marc > > > > > > On Monday, 4 April 2022, 12:26:32 BST, Christian Grün > > wrote: > > > > > > Hi Marc, > > > > I remember there were problem with a past release of BaseX and Tomcat. > > Which version of BaseX are you using? > > > > Best, > > Christian > > > > > > > > On Sun, Apr 3, 2022 at 10:45 PM Marc Balston wrote: > > > > > > Hello, > > > > > > I've been successfully running BaseX on Amazon AWS using Tomcat 8.5, but > > > I've been looking to upgrade my server to Tomcat 10.0.2. > > > However, I've run into an issue: BaseX does not startup and from the logs > > > the cause appears to be a missing class: > > > java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionListener > > > > > > I believe this is because there was a change between Tomcat 9.x and > > > Tomcat 10 which led to a renaming of the javax.* package to jakata.* > > > (related to a change in the servlet API version) see here for a > > > discussion: > > > https://stackoverflow.com/questions/66711660/tomcat-10-x-throws-java-lang-noclassdeffounderror-on-javax-servlet > > > > > > Is my understanding correct and is this a known issue? > > > If it is a genuine incompatibility, it would be useful to mention this in > > > the documentation (Web Application - BaseX Documentation) > > > > > > Thanks > > > Marc > > > > > > > > > > > > Marc Balston > > >
[basex-talk] Reversal of Hebrew?
I have attached two images, one that shows an unpointed Hebrew word entered in find, and the result as presented in the result window. Notice the "b" and "r" read right to left in Find, but read left to right in the result. If you switch the character positions in the result it would be correct. I'm not sure that searching without pointing but returning pointed results is a feature, but it would be nice to turn that on or off. Including cantillation marks (which are a separate category of mark from vowels). That is: 1) match exact text as entered 2) match text if only consonants match (for both vowels and cantillation) 3) match text if consonants and vowels match but not cantillation 4) match text if some consonants, some vowels, or some cantillation matches (yes, I know about regexes but I can either ask scholars to type in their "find" conditions or I can try to teach them regexes. Which do you think I'm going to pick? If that's a problem we can always create a XQuery library/pod whatever to keep users from having to type the filters in manually. Thanks! Hope everyone is having a great week! Patrick -- Patrick Durusau patr...@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 OpenPGP_signature Description: OpenPGP digital signature
Re: [basex-talk] Incompatibility with Tomcat 10
Maybe you can resolve the issue by following the instructions given on the homepage of Tomcat; did you try that? “Applications that run on Tomcat 9 and earlier will not run on Tomcat 10 without changes. Java EE based applications designed for Tomcat 9 and earlier may be placed in the $CATALINA_BASE/webapps-javaee directory and Tomcat will automatically convert them to Jakarta EE and copy them to the webapps directory. This conversion is performed using the Apache Tomcat migration tool for Jakarta EE tool which is also available as a separate download for off-line use.” [1] Best, Christian [1] https://tomcat.apache.org/ On Tue, Apr 5, 2022 at 6:47 PM Christian Grün wrote: > > Hi Marc, > > Thanks for testing and the StackOverflow links. > > I think you’ve already discovered the weak spot, which is also > documented in the Tomcat Migration Guide [1]: The javax.servlet > packages are not available in Tomcat 10 anymore, so the import > statements of BaseX would need to be updated. > > As BaseX comes with Jetty as standard web server, which relies on the > javax.servlet package, the Open-Source version of BaseX will remain > unchanged; but we can offer a custom Tomcat 10 version of BaseX for > those who are using BaseX commercially. > > We’ll do some tests soon to confirm the assumption and update the > documentation [2]. > > Best, > Christian > > [1] https://tomcat.apache.org/migration-10.html > [2] https://github.com/BaseXdb/basex/issues/2085 > > > On Mon, Apr 4, 2022 at 2:34 PM Marc Balston wrote: > > > > Hi Christian, > > > > I was using BaseX 9.5 on Tomcat 8.5 and it was fine. > > > > On Tomcat 10.0.2 I couldn't get either BaseX 9.5 or 9.7 to work (same > > issue). > > > > I now have Tomcat 9.0.62 running and I've successfully run both BaseX 9.5 > > and 9.7. > > > > Regards > > Marc > > > > > > On Monday, 4 April 2022, 12:26:32 BST, Christian Grün > > wrote: > > > > > > Hi Marc, > > > > I remember there were problem with a past release of BaseX and Tomcat. > > Which version of BaseX are you using? > > > > Best, > > Christian > > > > > > > > On Sun, Apr 3, 2022 at 10:45 PM Marc Balston wrote: > > > > > > Hello, > > > > > > I've been successfully running BaseX on Amazon AWS using Tomcat 8.5, but > > > I've been looking to upgrade my server to Tomcat 10.0.2. > > > However, I've run into an issue: BaseX does not startup and from the logs > > > the cause appears to be a missing class: > > >java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionListener > > > > > > I believe this is because there was a change between Tomcat 9.x and > > > Tomcat 10 which led to a renaming of the javax.* package to jakata.* > > > (related to a change in the servlet API version) see here for a > > > discussion: > > > https://stackoverflow.com/questions/66711660/tomcat-10-x-throws-java-lang-noclassdeffounderror-on-javax-servlet > > > > > > Is my understanding correct and is this a known issue? > > > If it is a genuine incompatibility, it would be useful to mention this in > > > the documentation (Web Application - BaseX Documentation) > > > > > > Thanks > > > Marc > > > > > > > > > > > > Marc Balston > > >
Re: [basex-talk] Incompatibility with Tomcat 10
Hi Marc, Thanks for testing and the StackOverflow links. I think you’ve already discovered the weak spot, which is also documented in the Tomcat Migration Guide [1]: The javax.servlet packages are not available in Tomcat 10 anymore, so the import statements of BaseX would need to be updated. As BaseX comes with Jetty as standard web server, which relies on the javax.servlet package, the Open-Source version of BaseX will remain unchanged; but we can offer a custom Tomcat 10 version of BaseX for those who are using BaseX commercially. We’ll do some tests soon to confirm the assumption and update the documentation [2]. Best, Christian [1] https://tomcat.apache.org/migration-10.html [2] https://github.com/BaseXdb/basex/issues/2085 On Mon, Apr 4, 2022 at 2:34 PM Marc Balston wrote: > > Hi Christian, > > I was using BaseX 9.5 on Tomcat 8.5 and it was fine. > > On Tomcat 10.0.2 I couldn't get either BaseX 9.5 or 9.7 to work (same issue). > > I now have Tomcat 9.0.62 running and I've successfully run both BaseX 9.5 and > 9.7. > > Regards > Marc > > > On Monday, 4 April 2022, 12:26:32 BST, Christian Grün > wrote: > > > Hi Marc, > > I remember there were problem with a past release of BaseX and Tomcat. > Which version of BaseX are you using? > > Best, > Christian > > > > On Sun, Apr 3, 2022 at 10:45 PM Marc Balston wrote: > > > > Hello, > > > > I've been successfully running BaseX on Amazon AWS using Tomcat 8.5, but > > I've been looking to upgrade my server to Tomcat 10.0.2. > > However, I've run into an issue: BaseX does not startup and from the logs > > the cause appears to be a missing class: > >java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionListener > > > > I believe this is because there was a change between Tomcat 9.x and Tomcat > > 10 which led to a renaming of the javax.* package to jakata.* (related to a > > change in the servlet API version) see here for a discussion: > > https://stackoverflow.com/questions/66711660/tomcat-10-x-throws-java-lang-noclassdeffounderror-on-javax-servlet > > > > Is my understanding correct and is this a known issue? > > If it is a genuine incompatibility, it would be useful to mention this in > > the documentation (Web Application - BaseX Documentation) > > > > Thanks > > Marc > > > > > > > > Marc Balston > >
Re: [basex-talk] Enclosing strings by double quotes for CSV data output
Thanks a lot for the example, Markus. No quotes will be added, as your delimiter does not occur in the text value. The result can successfully be imported in spreadsheet applications without quotes. The quotes will be added if the delimiter occurs in the texts: declare option output:method 'csv'; declare option output:csv 'header=yes, quotes=yes, separator=|'; a b c|d … yields … one|two a b|"c|d" Hope this helps, Christian
Re: [basex-talk] Enclosing strings by double quotes for CSV data output
> > I did not observe text quotation during my software tests. > > See [1] for some instruction on how to create a reproducible example. I created a BaseX database from a single XML file which contains the following data for another test approach. 01 X Y Y, X I tried the following XQuery script out. declare option output:method "csv"; declare option output:csv "header=yes, quotes=yes, separator=|"; for $x in //test_data/row return {$x/ID/data()} {$x/T1/data()} {$x/T2/data()} Will the corresponding test result need any further clarification? ID|T1|T2 01|X Y|Y, X How good does such a data display fit to expectations on desirable software behaviour? https://docs.basex.org/wiki/CSV_Module#Options Regards, Markus
Re: [basex-talk] Support for performing queries on query results
> So when you attempt to print out {$incidence}, XQuery > finds a sequence (1, 1, 1) instead of the value you want, 3. Dear Tamara, I found this test result surprising. > To get the count of $incidence, you could return > {count($incidence)} instead. My understanding is still evolving also for implementation details according to FLWOR expressions. > But since you're not using the IDs at all, placing them in a sequence of > arrays first isn't necessary. I imagined that I would need a subquery. Thus I found the specification of an identification relevant (for a moment). > You can skip that part like: > > for $x in //test_data/product > let $count := count($x/contributor) > let $id := $x/id/data() > group by $count > let $incidence := count($id) My knowledge was improvable also for desirable variable bindings. > order by $incidence descending > return > > >{$count} >{$incidence} > > I thank you very much for the demonstration of a report approach which is working as expected finally. Will similar use cases become interesting for further clarification? Regards, Markus