Make use of external Identity Management for BaseX

Thursday, 29 April 2021 · 12 messages · last reply 4 May 2021
R
Rob29 Apr 2021 15:54 #
Hi, I have a question. Can BaseX make use of an Identity Management application like Keycloak for Users? I can’t find anything about it :) With kind regards, Rob Tjalma
CG
Christian Grün30 Apr 2021 08:47 #
Hi Rob, There is no prepackaged module for Keycloak (at least I’m aware of none), but you can write your own code with XQuery. See [1] for an example how this might look like. Are you using RESTXQ? Best, Christian [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery
Quoted text · Rob · 11 lines
On Thu, Apr 29, 2021 at 3:54 PM Rob <private at tjalma.com> wrote: > > Hi, > > I have a question. > Can BaseX make use of an Identity Management application like Keycloak for Users? > > I can’t find anything about it :) > > With kind regards, > Rob Tjalma
ML
Marco Lettere30 Apr 2021 09:37 #
Hi Christian and Rob, as the authors of the code you point to we confirm that interacting with Keycloak in XQuery and in particular RestXQ is rather comfortable. That example is mostly a demonstration code for a tool that scrapes a site index and registers sites named gateways as public clients (in Oauth2 sense) into a Keycloak instance. It is a proof of concept (as you can see from the credentials :-D) that has been used as a batch one-time migration in a particular setting. We have also a RestXQ module that in combination with basex:perm annotations protects access to a GUI implementing the Oauth2 Code-grant flow. If Rob is interested we could share. If there should be any plan of integrating Oauth2/OIDC flows more tightly into BaseX we could also be available for helping out. Regards, Marco.
Quoted text · Christian Grün · 26 lines
On 30/04/21 08:47, Christian Grün wrote: > Hi Rob, > > There is no prepackaged module for Keycloak (at least I’m aware of > none), but you can write your own code with XQuery. See [1] for an > example how this might look like. > > Are you using RESTXQ? > > Best, > Christian > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob <private at tjalma.com> wrote: >> Hi, >> >> I have a question. >> Can BaseX make use of an Identity Management application like Keycloak for Users? >> >> I can’t find anything about it :) >> >> With kind regards, >> Rob Tjalma
AL
Adam Law1 May 2021 05:29 #
If Rob isn't interested, I certain am... Yes please share
Quoted text · Marco Lettere · 1 line
>>We have also a RestXQ module that in combination with basex:perm
annotations protects access to a GUI implementing the Oauth2 Code-grant flow. If Rob is interested we could share. Many thanks for sharing https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery This is a bit forward of me, but would you consider changing the license away from European Union Public Licence which appears to be 'copyleft' to say BSD 3-Clause, MIT, ... Adam
Quoted text · PM · 127 lines
On Fri, Apr 30, 2021 at 6:00 PM <basex-talk-request at mailman.uni-konstanz.de> 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. Make use of external Identity Management for BaseX (Rob) > 2. Re: Reloading jars on a running http server. (Reece Dunn) > 3. Getting profile information in server responses. (Reece Dunn) > 4. Re: Make use of external Identity Management for BaseX > (Christian Gr?n) > 5. Re: Reloading jars on a running http server. (Christian Gr?n) > 6. Re: Getting profile information in server responses. > (Christian Gr?n) > 7. Re: Reloading jars on a running http server. (Reece Dunn) > 8. Re: Reloading jars on a running http server. (Christian Gr?n) > 9. Re: Make use of external Identity Management for BaseX > (Marco Lettere) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 29 Apr 2021 15:54:08 +0200 > From: Rob <private at tjalma.com> > To: BaseX <basex-talk at mailman.uni-konstanz.de> > Subject: [basex-talk] Make use of external Identity Management for > BaseX > Message-ID: <39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com> > Content-Type: text/plain; charset=utf-8 > > Hi, > > I have a question. > Can BaseX make use of an Identity Management application like Keycloak for > Users? > > I can?t find anything about it :) > > With kind regards, > Rob Tjalma > > ------------------------------ > > Message: 2 > Date: Thu, 29 Apr 2021 20:48:09 +0100 > From: Reece Dunn <msclrhd at googlemail.com> > To: Christian Gr?n <christian.gruen at gmail.com> > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > Subject: Re: [basex-talk] Reloading jars on a running http server. > Message-ID: > <CAGdtn24Qdgbe3= > nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com> > Content-Type: text/plain; charset="utf-8" > > Hi Christian, > > Thanks for the response. Unfortunately, I've not been able to get the > reloading working. > > Kind regards, > Reece > > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n <christian.gruen at gmail.com> > wrote: > > > Hi Reece, > > > > If you install your Java code as JAR file in the repository [1], the > > code will be loaded and unloaded every time when your query is > > executed. If you get an error message? > > > > java.lang.reflect.InaccessibleObjectException: Unable to make field > > private final jdk.internal.loader.URLClassPath > > java.net.URLClassLoader.ucp accessible: module java.base does not > > "opens java.net" to unnamed module @79e2c065 > > > > ?unloading fails [2], as you?re probably using a more recent version > > of the JDK, which restricts reflective access to internal variables. > > You can get around this by adding Java flags at startup time: > > > > --add-opens java.base/java.net=ALL-UNNAMED > > --add-opens java.base/jdk.internal.loader=ALL-UNNAMED > > > > Maybe there are better solutions to unload JAR files today. > > Suggestions are welcome! > > > > Hope this helps, > > Christian > > > > [1] https://docs.basex.org/wiki/Repository#Java > > [2] > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn <msclrhd at googlemail.com> > wrote: > > > > > > Hi all, > > > > > > I'm working on a Java class that I'm importing into an XQuery, so I can > > do additional processing on the data that isn't easily expressible in > > XQuery (or XSLT). In order to get BaseX to pick up a modified version of > > the jar file I'm building, I'm restarting the BaseX http server. > > > > > > This makes it slower to turn around testing the changes. Is there a > > better way of doing this? > > > > > > Kind regards, > > > Reece > > >
R
Rob1 May 2021 17:49 #
Hi all! Sorry for the late response! I’m reading all the emails now, haha. I’m very happy to hear that it’s possible, I see you shared the following: https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery Thanks for sharing! Based on the following quote from Marco’s mail: "We have also a RestXQ module that in combination with basex:perm annotations protects access to a GUI implementing the Oauth2 Code-grant flow. If Rob is interested we could share.” The link above, is that the RESTXQ module Marco’s been talking about? Or is there another RESTXQ module? With kind regards, Rob
Quoted text · Adam Law · 1327 lines
> Op 1 mei 2021, om 05:29 heeft Adam Law <adamjameslaw at gmail.com> het volgende geschreven: > > If Rob isn't interested, I certain am... Yes please share > > > >>We have also a RestXQ module that in combination with basex:perm > > annotations protects access to a GUI implementing the Oauth2 Code-grant > > flow. If Rob is interested we could share. > > > > Many thanks for sharing https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > This is a bit forward of me, but would you consider changing the license away from European Union Public Licence which appears to be 'copyleft' to say BSD 3-Clause, MIT, ... > > > Adam > > On Fri, Apr 30, 2021 at 6:00 PM <basex-talk-request at mailman.uni-konstanz.de> 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. Make use of external Identity Management for BaseX (Rob) > > > > 2. Re: Reloading jars on a running http server. (Reece Dunn) > > > > 3. Getting profile information in server responses. (Reece Dunn) > > > > 4. Re: Make use of external Identity Management for BaseX > > > > (Christian Gr?n) > > > > 5. Re: Reloading jars on a running http server. (Christian Gr?n) > > > > 6. Re: Getting profile information in server responses. > > > > (Christian Gr?n) > > > > 7. Re: Reloading jars on a running http server. (Reece Dunn) > > > > 8. Re: Reloading jars on a running http server. (Christian Gr?n) > > > > 9. Re: Make use of external Identity Management for BaseX > > > > (Marco Lettere) > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > Message: 1 > > > > Date: Thu, 29 Apr 2021 15:54:08 +0200 > > > > From: Rob <private at tjalma.com> > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > Subject: [basex-talk] Make use of external Identity Management for > > > > BaseX > > > > Message-ID: <39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com> > > > > Content-Type: text/plain; charset=utf-8 > > > > > > > > Hi, > > > > > > > > I have a question. > > > > Can BaseX make use of an Identity Management application like Keycloak for Users? > > > > > > > > I can?t find anything about it :) > > > > > > > > With kind regards, > > > > Rob Tjalma > > > > > > > > ------------------------------ > > > > > > > > Message: 2 > > > > Date: Thu, 29 Apr 2021 20:48:09 +0100 > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > Subject: Re: [basex-talk] Reloading jars on a running http server. > > > > Message-ID: > > > > <CAGdtn24Qdgbe3=nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com> > > > > Content-Type: text/plain; charset="utf-8" > > > > > > > > Hi Christian, > > > > > > > > Thanks for the response. Unfortunately, I've not been able to get the > > > > reloading working. > > > > > > > > Kind regards, > > > > Reece > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > wrote: > > > > > > > > > Hi Reece, > > > > > > > > > > If you install your Java code as JAR file in the repository [1], the > > > > > code will be loaded and unloaded every time when your query is > > > > > executed. If you get an error message? > > > > > > > > > > java.lang.reflect.InaccessibleObjectException: Unable to make field > > > > > private final jdk.internal.loader.URLClassPath > > > > > java.net.URLClassLoader.ucp accessible: module java.base does not > > > > > "opens java.net" to unnamed module @79e2c065 > > > > > > > > > > ?unloading fails [2], as you?re probably using a more recent version > > > > > of the JDK, which restricts reflective access to internal variables. > > > > > You can get around this by adding Java flags at startup time: > > > > > > > > > > --add-opens java.base/java.net=ALL-UNNAMED > > > > > --add-opens java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > Maybe there are better solutions to unload JAR files today. > > > > > Suggestions are welcome! > > > > > > > > > > Hope this helps, > > > > > Christian > > > > > > > > > > [1] https://docs.basex.org/wiki/Repository#Java > > > > > [2] > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > > > > > On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn <msclrhd at googlemail.com> wrote: > > > > > > > > > > > > Hi all, > > > > > > > > > > > > I'm working on a Java class that I'm importing into an XQuery, so I can > > > > > do additional processing on the data that isn't easily expressible in > > > > > XQuery (or XSLT). In order to get BaseX to pick up a modified version of > > > > > the jar file I'm building, I'm restarting the BaseX http server. > > > > > > > > > > > > This makes it slower to turn around testing the changes. Is there a > > > > > better way of doing this? > > > > > > > > > > > > Kind regards, > > > > > > Reece > > > > > > > > > -------------- next part -------------- > > > > An HTML attachment was scrubbed... > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/fba079e2/attachment-0001.htm> > > > > > > > > ------------------------------ > > > > > > > > Message: 3 > > > > Date: Thu, 29 Apr 2021 20:50:40 +0100 > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > Subject: [basex-talk] Getting profile information in server responses. > > > > Message-ID: > > > > <CAGdtn26mnN7Bu3bqUN8pkS1da4eq2tQstFOnx5nqqEvZPnHdkA at mail.gmail.com> > > > > Content-Type: text/plain; charset="utf-8" > > > > > > > > Hi all, > > > > > > > > In BaseX, is there a way to get the profile timings (compile, run, print, > > > > etc.) in the response of a HTTP request via the Server-Timing header ( > > > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > Kind regards, > > > > Reece > > > > -------------- next part -------------- > > > > An HTML attachment was scrubbed... > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/12a4d4fa/attachment-0001.htm> > > > > > > > > ------------------------------ > > > > > > > > Message: 4 > > > > Date: Fri, 30 Apr 2021 08:47:36 +0200 > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > To: Rob <private at tjalma.com> > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > Subject: Re: [basex-talk] Make use of external Identity Management for > > > > BaseX > > > > Message-ID: > > > > <CAP94bnP_-nFY6BQv38gqQdy9aoFn_gtRzgM1rW+GB7yjr=xTrA at mail.gmail.com> > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > Hi Rob, > > > > > > > > There is no prepackaged module for Keycloak (at least I?m aware of > > > > none), but you can write your own code with XQuery. See [1] for an > > > > example how this might look like. > > > > > > > > Are you using RESTXQ? > > > > > > > > Best, > > > > Christian > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob <private at tjalma.com> wrote: > > > > > > > > > > Hi, > > > > > > > > > > I have a question. > > > > > Can BaseX make use of an Identity Management application like Keycloak for Users? > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > With kind regards, > > > > > Rob Tjalma > > > > > > > > > > > > ------------------------------ > > > > > > > > Message: 5 > > > > Date: Fri, 30 Apr 2021 08:48:36 +0200 > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > Subject: Re: [basex-talk] Reloading jars on a running http server. > > > > Message-ID: > > > > <CAP94bnNs_gmotGxEa2Mp-fcJzQxiO3HdzLfcG0_KknotrZ6APQ at mail.gmail.com> > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > Hi Reece, > > > > > > > > I?m sorry to hear that. Did you build a custom JAR file, or do you > > > > encounter problems with the JDK? > > > > > > > > Cheers, > > > > Christian > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM Reece Dunn <msclrhd at googlemail.com> wrote: > > > > > > > > > > Hi Christian, > > > > > > > > > > Thanks for the response. Unfortunately, I've not been able to get the reloading working. > > > > > > > > > > Kind regards, > > > > > Reece > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n <christian.gruen at gmail.com> wrote: > > > > >> > > > > >> Hi Reece, > > > > >> > > > > >> If you install your Java code as JAR file in the repository [1], the > > > > >> code will be loaded and unloaded every time when your query is > > > > >> executed. If you get an error message? > > > > >> > > > > >> java.lang.reflect.InaccessibleObjectException: Unable to make field > > > > >> private final jdk.internal.loader.URLClassPath > > > > >> java.net.URLClassLoader.ucp accessible: module java.base does not > > > > >> "opens java.net" to unnamed module @79e2c065 > > > > >> > > > > >> ?unloading fails [2], as you?re probably using a more recent version > > > > >> of the JDK, which restricts reflective access to internal variables. > > > > >> You can get around this by adding Java flags at startup time: > > > > >> > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > >> --add-opens java.base/jdk.internal.loader=ALL-UNNAMED > > > > >> > > > > >> Maybe there are better solutions to unload JAR files today. > > > > >> Suggestions are welcome! > > > > >> > > > > >> Hope this helps, > > > > >> Christian > > > > >> > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > >> > > > > >> > > > > >> > > > > >> On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn <msclrhd at googlemail.com> wrote: > > > > >> > > > > > >> > Hi all, > > > > >> > > > > > >> > I'm working on a Java class that I'm importing into an XQuery, so I can do additional processing on the data that isn't easily expressible in XQuery (or XSLT). In order to get BaseX to pick up a modified version of the jar file I'm building, I'm restarting the BaseX http server. > > > > >> > > > > > >> > This makes it slower to turn around testing the changes. Is there a better way of doing this? > > > > >> > > > > > >> > Kind regards, > > > > >> > Reece > > > > > > > > > > > > ------------------------------ > > > > > > > > Message: 6 > > > > Date: Fri, 30 Apr 2021 08:55:49 +0200 > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > Subject: Re: [basex-talk] Getting profile information in server > > > > responses. > > > > Message-ID: > > > > <CAP94bnMCyZqRYvMEJG7EkON+FjNS0fsGWwx-_2EQrzzYPV-hZQ at mail.gmail.com> > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > A good idea; I?ll think of ways to get this included. One challenge > > > > might be that the response is streamed to the client. This means that > > > > when creating the HTTP request headers, it will not be known yet how > > > > long the evaluation will take (and the time for evaluation may also > > > > depend on the connection speed). The time for parsing and compiling > > > > the query should be known at that time, though. ? Maybe we could > > > > suppress result streaming when timings are requested. > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:50 PM Reece Dunn <msclrhd at googlemail.com> wrote: > > > > > > > > > > Hi all, > > > > > > > > > > In BaseX, is there a way to get the profile timings (compile, run, print, etc.) in the response of a HTTP request via the Server-Timing header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > Kind regards, > > > > > Reece > > > > > > > > > > > > ------------------------------ > > > > > > > > Message: 7 > > > > Date: Fri, 30 Apr 2021 08:14:21 +0100 > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > Subject: Re: [basex-talk] Reloading jars on a running http server. > > > > Message-ID: > > > > <CAGdtn25JU3aGsHZepExgDigQX7asNDOF=2C6PWJcz1kgQqZEfA at mail.gmail.com> > > > > Content-Type: text/plain; charset="utf-8" > > > > > > > > Hi Christian, > > > > > > > > I'm not seeing any exceptions in the console window, even when enabling the > > > > debug setting. I'm using the AdoptOpenJDK 1.8. I also have AdoptOpenJDK 11, > > > > but I assume that will have the issue you described. > > > > > > > > It's a custom-built jar using Kotlin, built via gradle. > > > > > > > > One thing that it could be is that I'm using Kotlin objects (not classes), > > > > e.g.: > > > > > > > > package test > > > > object Test { fun f(): String = "test" } > > > > > > > > and using it like: > > > > > > > > declare namespace Test = "java:test.Test"; > > > > > > > > declare function test:f() as xs:string { > > > > Test::f(Test::INSTANCE()) > > > > }; > > > > > > > > The build.gradle file is simple. It looks something like this (removing > > > > things like the junit configuration): > > > > > > > > ----- > > > > buildscript { > > > > ext.kotlin_version = "1.4.32" > > > > ext.kotlin_stdlib = "kotlin-stdlib" > > > > ext.java_version = "1.8" > > > > > > > > repositories { mavenCentral() } > > > > dependencies { classpath > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } > > > > } > > > > > > > > apply plugin: 'kotlin' > > > > > > > > repositories { > > > > mavenCentral() > > > > mavenLocal() > > > > } > > > > > > > > compileKotlin { kotlinOptions { jvmTarget = java_version } } > > > > compileTestKotlin { kotlinOptions { jvmTarget = java_version } } > > > > > > > > dependencies { > > > > implementation "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > } > > > > ----- > > > > > > > > You'll need to copy the kotlin-stdlib-1.4.32.jar file in addition to the > > > > test.jar file to BaseX's lib directory. > > > > > > > > Kind regards, > > > > Reece > > > > > > > > On Fri, 30 Apr 2021 at 07:48, Christian Gr?n <christian.gruen at gmail.com> > > > > wrote: > > > > > > > > > Hi Reece, > > > > > > > > > > I?m sorry to hear that. Did you build a custom JAR file, or do you > > > > > encounter problems with the JDK? > > > > > > > > > > Cheers, > > > > > Christian > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM Reece Dunn <msclrhd at googlemail.com> wrote: > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > Thanks for the response. Unfortunately, I've not been able to get the > > > > > reloading working. > > > > > > > > > > > > Kind regards, > > > > > > Reece > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > > wrote: > > > > > >> > > > > > >> Hi Reece, > > > > > >> > > > > > >> If you install your Java code as JAR file in the repository [1], the > > > > > >> code will be loaded and unloaded every time when your query is > > > > > >> executed. If you get an error message? > > > > > >> > > > > > >> java.lang.reflect.InaccessibleObjectException: Unable to make field > > > > > >> private final jdk.internal.loader.URLClassPath > > > > > >> java.net.URLClassLoader.ucp accessible: module java.base does not > > > > > >> "opens java.net" to unnamed module @79e2c065 > > > > > >> > > > > > >> ?unloading fails [2], as you?re probably using a more recent version > > > > > >> of the JDK, which restricts reflective access to internal variables. > > > > > >> You can get around this by adding Java flags at startup time: > > > > > >> > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > >> --add-opens java.base/jdk.internal.loader=ALL-UNNAMED > > > > > >> > > > > > >> Maybe there are better solutions to unload JAR files today. > > > > > >> Suggestions are welcome! > > > > > >> > > > > > >> Hope this helps, > > > > > >> Christian > > > > > >> > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > >> [2] > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > >> > > > > > >> > > > > > >> > > > > > >> On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > > > wrote: > > > > > >> > > > > > > >> > Hi all, > > > > > >> > > > > > > >> > I'm working on a Java class that I'm importing into an XQuery, so I > > > > > can do additional processing on the data that isn't easily expressible in > > > > > XQuery (or XSLT). In order to get BaseX to pick up a modified version of > > > > > the jar file I'm building, I'm restarting the BaseX http server. > > > > > >> > > > > > > >> > This makes it slower to turn around testing the changes. Is there a > > > > > better way of doing this? > > > > > >> > > > > > > >> > Kind regards, > > > > > >> > Reece > > > > > > > > > -------------- next part -------------- > > > > An HTML attachment was scrubbed... > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210430/1b9943e9/attachment-0001.htm> > > > > > > > > ------------------------------ > > > > > > > > Message: 8 > > > > Date: Fri, 30 Apr 2021 09:30:17 +0200 > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > Subject: Re: [basex-talk] Reloading jars on a running http server. > > > > Message-ID: > > > > <CAP94bnN5QnMVBoaNzAL8WOuUo7N8MDYbM4+z=3fTqdn_eUVyZg at mail.gmail.com> > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > Hi Reece, > > > > > > > > > You'll need to copy the kotlin-stdlib-1.4.32.jar file in addition to the test.jar file to BaseX's lib directory. > > > > > > > > Please note that JAR libraries will only be unregistered after query > > > > evalution if they are moved into the repo directory. If a library is > > > > copied into the lib directory, it will be added to the static > > > > classpath. > > > > > > > > In the given case, you could probably keep kotlin-stdlib-1.4.32.jar in > > > > the lib directory, but you?ll need to keep your development code in > > > > the repository (as described in the Wiki). It?s no problem, though, to > > > > directly modify the repo code (you don?t have to use REPO INSTALL or > > > > repo:install for that). > > > > > > > > If the problem persists, feel free to send me a little test.jar, I can > > > > then do further testing. > > > > > > > > Hope this helps, > > > > Christian > > > > > > > > > > > > On Fri, Apr 30, 2021 at 9:14 AM Reece Dunn <msclrhd at googlemail.com> wrote: > > > > > > > > > > Hi Christian, > > > > > > > > > > I'm not seeing any exceptions in the console window, even when enabling the debug setting. I'm using the AdoptOpenJDK 1.8. I also have AdoptOpenJDK 11, but I assume that will have the issue you described. > > > > > > > > > > It's a custom-built jar using Kotlin, built via gradle. > > > > > > > > > > One thing that it could be is that I'm using Kotlin objects (not classes), e.g.: > > > > > > > > > > package test > > > > > object Test { fun f(): String = "test" } > > > > > > > > > > and using it like: > > > > > > > > > > declare namespace Test = "java:test.Test"; > > > > > > > > > > declare function test:f() as xs:string { > > > > > Test::f(Test::INSTANCE()) > > > > > }; > > > > > > > > > > The build.gradle file is simple. It looks something like this (removing things like the junit configuration): > > > > > > > > > > ----- > > > > > buildscript { > > > > > ext.kotlin_version = "1.4.32" > > > > > ext.kotlin_stdlib = "kotlin-stdlib" > > > > > ext.java_version = "1.8" > > > > > > > > > > repositories { mavenCentral() } > > > > > dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } > > > > > } > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > repositories { > > > > > mavenCentral() > > > > > mavenLocal() > > > > > } > > > > > > > > > > compileKotlin { kotlinOptions { jvmTarget = java_version } } > > > > > compileTestKotlin { kotlinOptions { jvmTarget = java_version } } > > > > > > > > > > dependencies { > > > > > implementation "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > } > > > > > ----- > > > > > > > > > > You'll need to copy the kotlin-stdlib-1.4.32.jar file in addition to the test.jar file to BaseX's lib directory. > > > > > > > > > > Kind regards, > > > > > Reece > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, Christian Gr?n <christian.gruen at gmail.com> wrote: > > > > >> > > > > >> Hi Reece, > > > > >> > > > > >> I?m sorry to hear that. Did you build a custom JAR file, or do you > > > > >> encounter problems with the JDK? > > > > >> > > > > >> Cheers, > > > > >> Christian > > > > >> > > > > >> > > > > >> > > > > >> On Thu, Apr 29, 2021 at 9:48 PM Reece Dunn <msclrhd at googlemail.com> wrote: > > > > >> > > > > > >> > Hi Christian, > > > > >> > > > > > >> > Thanks for the response. Unfortunately, I've not been able to get the reloading working. > > > > >> > > > > > >> > Kind regards, > > > > >> > Reece > > > > >> > > > > > >> > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n <christian.gruen at gmail.com> wrote: > > > > >> >> > > > > >> >> Hi Reece, > > > > >> >> > > > > >> >> If you install your Java code as JAR file in the repository [1], the > > > > >> >> code will be loaded and unloaded every time when your query is > > > > >> >> executed. If you get an error message? > > > > >> >> > > > > >> >> java.lang.reflect.InaccessibleObjectException: Unable to make field > > > > >> >> private final jdk.internal.loader.URLClassPath > > > > >> >> java.net.URLClassLoader.ucp accessible: module java.base does not > > > > >> >> "opens java.net" to unnamed module @79e2c065 > > > > >> >> > > > > >> >> ?unloading fails [2], as you?re probably using a more recent version > > > > >> >> of the JDK, which restricts reflective access to internal variables. > > > > >> >> You can get around this by adding Java flags at startup time: > > > > >> >> > > > > >> >> --add-opens java.base/java.net=ALL-UNNAMED > > > > >> >> --add-opens java.base/jdk.internal.loader=ALL-UNNAMED > > > > >> >> > > > > >> >> Maybe there are better solutions to unload JAR files today. > > > > >> >> Suggestions are welcome! > > > > >> >> > > > > >> >> Hope this helps, > > > > >> >> Christian > > > > >> >> > > > > >> >> [1] https://docs.basex.org/wiki/Repository#Java > > > > >> >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > >> >> > > > > >> >> > > > > >> >> > > > > >> >> On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn <msclrhd at googlemail.com> wrote: > > > > >> >> > > > > > >> >> > Hi all, > > > > >> >> > > > > > >> >> > I'm working on a Java class that I'm importing into an XQuery, so I can do additional processing on the data that isn't easily expressible in XQuery (or XSLT). In order to get BaseX to pick up a modified version of the jar file I'm building, I'm restarting the BaseX http server. > > > > >> >> > > > > > >> >> > This makes it slower to turn around testing the changes. Is there a better way of doing this? > > > > >> >> > > > > > >> >> > Kind regards, > > > > >> >> > Reece > > > > > > > > > > > > ------------------------------ > > > > > > > > Message: 9 > > > > Date: Fri, 30 Apr 2021 09:37:14 +0200 > > > > From: Marco Lettere <m.lettere at gmail.com> > > > > To: basex-talk at mailman.uni-konstanz.de > > > > Subject: Re: [basex-talk] Make use of external Identity Management for > > > > BaseX > > > > Message-ID: <1a8d807b-9cb3-3cd4-f1b7-22aff5446154 at gmail.com> > > > > Content-Type: text/plain; charset=utf-8; format=flowed > > > > > > > > Hi Christian and Rob, > > > > as the authors of the code you point to we confirm that interacting with > > > > Keycloak in XQuery and in particular RestXQ is rather comfortable. > > > > That example is mostly a demonstration code for a tool that scrapes a > > > > site index and registers sites named gateways as public clients (in > > > > Oauth2 sense) into a Keycloak instance. > > > > It is a proof of concept (as you can see from the credentials? :-D) that > > > > has been used as a batch one-time migration in a particular setting. > > > > > > > > We have also a RestXQ module that in combination with basex:perm > > > > annotations protects access to a GUI implementing the Oauth2 Code-grant > > > > flow. If Rob is interested we could share. > > > > > > > > If there should be any plan of integrating Oauth2/OIDC flows more > > > > tightly into BaseX we could also be available for helping out. > > > > > > > > Regards, > > > > Marco. > > > > > > > > On 30/04/21 08:47, Christian Gr?n wrote: > > > > > Hi Rob, > > > > > > > > > > There is no prepackaged module for Keycloak (at least I?m aware of > > > > > none), but you can write your own code with XQuery. See [1] for an > > > > > example how this might look like. > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > Best, > > > > > Christian > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob <private at tjalma.com> wrote: > > > > >> Hi, > > > > >> > > > > >> I have a question. > > > > >> Can BaseX make use of an Identity Management application like Keycloak for Users? > > > > >> > > > > >> I can?t find anything about it :) > > > > >> > > > > >> With kind regards, > > > > >> Rob Tjalma > > > > > > > > > > > > > > > > > > > > End of BaseX-Talk Digest, Vol 136, Issue 17 > > > > *******************************************
ML
Marco Letterein reply to Adam Law, 1 May 2021, 05:293 May 2021 09:20 #
Hi Adam, sorry but licensing terms are out of our choice. We've developed that code in the framework of EU H2020 funded projects [1,2] thus we have to adhere to the policies of the Institution we cooperate with (Italian Council of Research). Anyway as I told this code is more a proof of concept for administrative activities related to batch creation of clients ... Feel free to use and adapt the code as you prefer. Regards, Marco. [1] https://www.blue-cloud.org/ [2] http://project.sobigdata.eu/
Quoted text · Adam Law · 164 lines
On 01/05/21 05:29, Adam Law wrote: > If Rob isn't interested, I certain am... Yes please share > > >>We have also a RestXQ module that in combination with basex:perm > annotations protects access to a GUI implementing the Oauth2 Code-grant > flow. If Rob is interested we could share. > > Many thanks for sharing > https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > <https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery> > > This is a bit forward of me, but would you consider changing the > license away from European Union Public Licence which appears to be > 'copyleft' to say BSD 3-Clause, MIT, ... > > Adam > > On Fri, Apr 30, 2021 at 6:00 PM > <basex-talk-request at mailman.uni-konstanz.de > <mailto:basex-talk-request at mailman.uni-konstanz.de>> wrote: > > Send BaseX-Talk mailing list submissions to > basex-talk at mailman.uni-konstanz.de > <mailto: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 > <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 > <mailto: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 > <mailto: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. Make use of external Identity Management for BaseX (Rob) > 2. Re: Reloading jars on a running http server. (Reece Dunn) > 3. Getting profile information in server responses. (Reece Dunn) > 4. Re: Make use of external Identity Management for BaseX > (Christian Gr?n) > 5. Re: Reloading jars on a running http server. (Christian Gr?n) > 6. Re: Getting profile information in server responses. > (Christian Gr?n) > 7. Re: Reloading jars on a running http server. (Reece Dunn) > 8. Re: Reloading jars on a running http server. (Christian Gr?n) > 9. Re: Make use of external Identity Management for BaseX > (Marco Lettere) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 29 Apr 2021 15:54:08 +0200 > From: Rob <private at tjalma.com <mailto:private at tjalma.com>> > To: BaseX <basex-talk at mailman.uni-konstanz.de > <mailto:basex-talk at mailman.uni-konstanz.de>> > Subject: [basex-talk] Make use of external Identity Management for > BaseX > Message-ID: <39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com > <mailto:39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com>> > Content-Type: text/plain; charset=utf-8 > > Hi, > > I have a question. > Can BaseX make use of an Identity Management application like > Keycloak for Users? > > I can?t find anything about it :) > > With kind regards, > Rob Tjalma > > ------------------------------ > > Message: 2 > Date: Thu, 29 Apr 2021 20:48:09 +0100 > From: Reece Dunn <msclrhd at googlemail.com > <mailto:msclrhd at googlemail.com>> > To: Christian Gr?n <christian.gruen at gmail.com > <mailto:christian.gruen at gmail.com>> > Cc: BaseX <basex-talk at mailman.uni-konstanz.de > <mailto:basex-talk at mailman.uni-konstanz.de>> > Subject: Re: [basex-talk] Reloading jars on a running http server. > Message-ID: > > <CAGdtn24Qdgbe3=nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com > <mailto:nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com>> > Content-Type: text/plain; charset="utf-8" > > Hi Christian, > > Thanks for the response. Unfortunately, I've not been able to get the > reloading working. > > Kind regards, > Reece > > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n > <christian.gruen at gmail.com <mailto:christian.gruen at gmail.com>> > wrote: > > > Hi Reece, > > > > If you install your Java code as JAR file in the repository [1], the > > code will be loaded and unloaded every time when your query is > > executed. If you get an error message? > > > > java.lang.reflect.InaccessibleObjectException: Unable to make > field > > private final jdk.internal.loader.URLClassPath > > java.net.URLClassLoader.ucp accessible: module java.base does not > > "opens java.net <http://java.net>" to unnamed module @79e2c065 > > > > ?unloading fails [2], as you?re probably using a more recent version > > of the JDK, which restricts reflective access to internal variables. > > You can get around this by adding Java flags at startup time: > > > > --add-opens java.base/java.net <http://java.net>=ALL-UNNAMED > > --add-opens java.base/jdk.internal.loader=ALL-UNNAMED > > > > Maybe there are better solutions to unload JAR files today. > > Suggestions are welcome! > > > > Hope this helps, > > Christian > > > > [1] https://docs.basex.org/wiki/Repository#Java > <https://docs.basex.org/wiki/Repository#Java> > > [2] > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > <https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34> > > > > > > > > On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn > <msclrhd at googlemail.com <mailto:msclrhd at googlemail.com>> wrote: > > > > > > Hi all, > > > > > > I'm working on a Java class that I'm importing into an XQuery, > so I can > > do additional processing on the data that isn't easily > expressible in > > XQuery (or XSLT). In order to get BaseX to pick up a modified > version of > > the jar file I'm building, I'm restarting the BaseX http server. > > > > > > This makes it slower to turn around testing the changes. Is > there a > > better way of doing this? > > > > > > Kind regards, > > > Reece > > >
ML
Marco Letterein reply to Rob, 1 May 2021, 17:493 May 2021 09:23 #
Hi Rob, no the code in the repository the link refers to is more like administrative tooling for batch importing configuration into Keycloak for administration purposes. I'll work on creating an excerpt of the code that realizes Oauth2 code grant flow with RestXQ and Keycloak and I'll share by tonight hopefully. Regards, Marco.
Quoted text · Rob · 1624 lines
On 01/05/21 17:49, Rob wrote: > > Hi all! > > > > > Sorry for the late response! > > I’m reading all the emails now, haha. > > > > > > I’m very happy to hear that it’s possible, I see you > shared the following: > > https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > Thanks for sharing! > > > > > > Based on the following quote from Marco’s mail: > > "We have also a RestXQ module that in > combination with basex:perm annotations protects access to a > GUI implementing the Oauth2 Code-grant flow. If Rob is > interested we could share.” > > > > > > > The link above, is that the RESTXQ module Marco’s > been talking about? > > Or is there another RESTXQ module? > > > > > > > > With kind regards, > > Rob > > > > > > > Op 1 mei 2021, om 05:29 heeft Adam Law <adamjameslaw at gmail.com> > > het volgende geschreven: > > > > > > > > > > > > If Rob isn't interested, I certain am... > > Yes please share > > > > > > > > > > > > >>We have also a RestXQ module that > > in combination with basex:perm > > > > annotations protects access to a GUI implementing the > > Oauth2 Code-grant > > > > flow. If Rob is interested we could share. > > > > > > > > > > > > > > > > Many thanks for sharing https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > This is a bit forward of me, but would you > > consider changing the license away from European Union > > Public Licence which appears to be 'copyleft' to say > > BSD 3-Clause, MIT, ... > > > > > > > > > > > > Adam > > > > > > > > > > On Fri, Apr 30, 2021 > > at 6:00 PM <basex-talk-request at mailman.uni-konstanz.de> > > 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. Make use of external Identity Management for > > > BaseX (Rob) > > > > > > 2. Re: Reloading jars on a running http server. > > > (Reece Dunn) > > > > > > 3. Getting profile information in server > > > responses. (Reece Dunn) > > > > > > 4. Re: Make use of external Identity Management > > > for BaseX > > > > > > (Christian Gr?n) > > > > > > 5. Re: Reloading jars on a running http server. > > > (Christian Gr?n) > > > > > > 6. Re: Getting profile information in server > > > responses. > > > > > > (Christian Gr?n) > > > > > > 7. Re: Reloading jars on a running http server. > > > (Reece Dunn) > > > > > > 8. Re: Reloading jars on a running http server. > > > (Christian Gr?n) > > > > > > 9. Re: Make use of external Identity Management > > > for BaseX > > > > > > (Marco Lettere) > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > > > > > Message: 1 > > > > > > Date: Thu, 29 Apr 2021 15:54:08 +0200 > > > > > > From: Rob <private at tjalma.com> > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > Subject: [basex-talk] Make use of external Identity > > > Management for > > > > > > BaseX > > > > > > Message-ID: <39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com> > > > > > > Content-Type: text/plain; charset=utf-8 > > > > > > > > > > > > Hi, > > > > > > > > > > > > I have a question. > > > > > > Can BaseX make use of an Identity Management > > > application like Keycloak for Users? > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > With kind regards, > > > > > > Rob Tjalma > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > Message: 2 > > > > > > Date: Thu, 29 Apr 2021 20:48:09 +0100 > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > Subject: Re: [basex-talk] Reloading jars on a > > > running http server. > > > > > > Message-ID: > > > > > > <CAGdtn24Qdgbe3=nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com> > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > Thanks for the response. Unfortunately, I've not > > > been able to get the > > > > > > reloading working. > > > > > > > > > > > > Kind regards, > > > > > > Reece > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > > > wrote: > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > If you install your Java code as JAR file in > > > the repository [1], the > > > > > > > code will be loaded and unloaded every time > > > when your query is > > > > > > > executed. If you get an error message? > > > > > > > > > > > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > Unable to make field > > > > > > > private final jdk.internal.loader.URLClassPath > > > > > > > java.net.URLClassLoader.ucp accessible: module > > > java.base does not > > > > > > > "opens java.net" to unnamed > > > module @79e2c065 > > > > > > > > > > > > > > ?unloading fails [2], as you?re probably using > > > a more recent version > > > > > > > of the JDK, which restricts reflective access > > > to internal variables. > > > > > > > You can get around this by adding Java flags at > > > startup time: > > > > > > > > > > > > > > --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > --add-opens > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > Maybe there are better solutions to unload JAR > > > files today. > > > > > > > Suggestions are welcome! > > > > > > > > > > > > > > Hope this helps, > > > > > > > Christian > > > > > > > > > > > > > > [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > [2] > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > wrote: > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > I'm working on a Java class that I'm > > > importing into an XQuery, so I can > > > > > > > do additional processing on the data that isn't > > > easily expressible in > > > > > > > XQuery (or XSLT). In order to get BaseX to pick > > > up a modified version of > > > > > > > the jar file I'm building, I'm restarting the > > > BaseX http server. > > > > > > > > > > > > > > > > This makes it slower to turn around > > > testing the changes. Is there a > > > > > > > better way of doing this? > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > Reece > > > > > > > > > > > > > -------------- next part -------------- > > > > > > An HTML attachment was scrubbed... > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/fba079e2/attachment-0001.htm> > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > Message: 3 > > > > > > Date: Thu, 29 Apr 2021 20:50:40 +0100 > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > Subject: [basex-talk] Getting profile information in > > > server responses. > > > > > > Message-ID: > > > > > > <CAGdtn26mnN7Bu3bqUN8pkS1da4eq2tQstFOnx5nqqEvZPnHdkA at mail.gmail.com> > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > > > > > > > Hi all, > > > > > > > > > > > > In BaseX, is there a way to get the profile timings > > > (compile, run, print, > > > > > > etc.) in the response of a HTTP request via the > > > Server-Timing header ( > > > > > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > Kind regards, > > > > > > Reece > > > > > > -------------- next part -------------- > > > > > > An HTML attachment was scrubbed... > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/12a4d4fa/attachment-0001.htm> > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > Message: 4 > > > > > > Date: Fri, 30 Apr 2021 08:47:36 +0200 > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > To: Rob <private at tjalma.com> > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > Subject: Re: [basex-talk] Make use of external > > > Identity Management for > > > > > > BaseX > > > > > > Message-ID: > > > > > > > > > <CAP94bnP_-nFY6BQv38gqQdy9aoFn_gtRzgM1rW+GB7yjr=xTrA at mail.gmail.com> > > > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > There is no prepackaged module for Keycloak (at > > > least I?m aware of > > > > > > none), but you can write your own code with XQuery. > > > See [1] for an > > > > > > example how this might look like. > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > Best, > > > > > > Christian > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob <private at tjalma.com> > > > wrote: > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > I have a question. > > > > > > > Can BaseX make use of an Identity Management > > > application like Keycloak for Users? > > > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > > > With kind regards, > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > Message: 5 > > > > > > Date: Fri, 30 Apr 2021 08:48:36 +0200 > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > Subject: Re: [basex-talk] Reloading jars on a > > > running http server. > > > > > > Message-ID: > > > > > > <CAP94bnNs_gmotGxEa2Mp-fcJzQxiO3HdzLfcG0_KknotrZ6APQ at mail.gmail.com> > > > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > I?m sorry to hear that. Did you build a custom JAR > > > file, or do you > > > > > > encounter problems with the JDK? > > > > > > > > > > > > Cheers, > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM Reece Dunn <msclrhd at googlemail.com> > > > wrote: > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > Thanks for the response. Unfortunately, I've > > > not been able to get the reloading working. > > > > > > > > > > > > > > Kind regards, > > > > > > > Reece > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n > > > <christian.gruen at gmail.com> > > > wrote: > > > > > > >> > > > > > > >> Hi Reece, > > > > > > >> > > > > > > >> If you install your Java code as JAR file > > > in the repository [1], the > > > > > > >> code will be loaded and unloaded every time > > > when your query is > > > > > > >> executed. If you get an error message? > > > > > > >> > > > > > > >> > > > java.lang.reflect.InaccessibleObjectException: > > > Unable to make field > > > > > > >> private final > > > jdk.internal.loader.URLClassPath > > > > > > >> java.net.URLClassLoader.ucp accessible: > > > module java.base does not > > > > > > >> "opens java.net" to unnamed > > > module @79e2c065 > > > > > > >> > > > > > > >> ?unloading fails [2], as you?re probably > > > using a more recent version > > > > > > >> of the JDK, which restricts reflective > > > access to internal variables. > > > > > > >> You can get around this by adding Java > > > flags at startup time: > > > > > > >> > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > >> --add-opens > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > >> > > > > > > >> Maybe there are better solutions to unload > > > JAR files today. > > > > > > >> Suggestions are welcome! > > > > > > >> > > > > > > >> Hope this helps, > > > > > > >> Christian > > > > > > >> > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn > > > <msclrhd at googlemail.com> > > > wrote: > > > > > > >> > > > > > > > >> > Hi all, > > > > > > >> > > > > > > > >> > I'm working on a Java class that I'm > > > importing into an XQuery, so I can do additional > > > processing on the data that isn't easily expressible > > > in XQuery (or XSLT). In order to get BaseX to pick > > > up a modified version of the jar file I'm building, > > > I'm restarting the BaseX http server. > > > > > > >> > > > > > > > >> > This makes it slower to turn around > > > testing the changes. Is there a better way of doing > > > this? > > > > > > >> > > > > > > > >> > Kind regards, > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > Message: 6 > > > > > > Date: Fri, 30 Apr 2021 08:55:49 +0200 > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > Subject: Re: [basex-talk] Getting profile > > > information in server > > > > > > responses. > > > > > > Message-ID: > > > > > > <CAP94bnMCyZqRYvMEJG7EkON+FjNS0fsGWwx-_2EQrzzYPV-hZQ at mail.gmail.com> > > > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > > > > > A good idea; I?ll think of ways to get this > > > included. One challenge > > > > > > might be that the response is streamed to the > > > client. This means that > > > > > > when creating the HTTP request headers, it will not > > > be known yet how > > > > > > long the evaluation will take (and the time for > > > evaluation may also > > > > > > depend on the connection speed). The time for > > > parsing and compiling > > > > > > the query should be known at that time, though. ? > > > Maybe we could > > > > > > suppress result streaming when timings are > > > requested. > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:50 PM Reece Dunn <msclrhd at googlemail.com> > > > wrote: > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > In BaseX, is there a way to get the profile > > > timings (compile, run, print, etc.) in the response > > > of a HTTP request via the Server-Timing header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > Kind regards, > > > > > > > Reece > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > Message: 7 > > > > > > Date: Fri, 30 Apr 2021 08:14:21 +0100 > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > Subject: Re: [basex-talk] Reloading jars on a > > > running http server. > > > > > > Message-ID: > > > > > > <CAGdtn25JU3aGsHZepExgDigQX7asNDOF=2C6PWJcz1kgQqZEfA at mail.gmail.com> > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > I'm not seeing any exceptions in the console window, > > > even when enabling the > > > > > > debug setting. I'm using the AdoptOpenJDK 1.8. I > > > also have AdoptOpenJDK 11, > > > > > > but I assume that will have the issue you described. > > > > > > > > > > > > It's a custom-built jar using Kotlin, built via > > > gradle. > > > > > > > > > > > > One thing that it could be is that I'm using Kotlin > > > objects (not classes), > > > > > > e.g.: > > > > > > > > > > > > package test > > > > > > object Test { fun f(): String = "test" } > > > > > > > > > > > > and using it like: > > > > > > > > > > > > declare namespace Test = "java:test.Test"; > > > > > > > > > > > > declare function test:f() as xs:string { > > > > > > Test::f(Test::INSTANCE()) > > > > > > }; > > > > > > > > > > > > The build.gradle file is simple. It looks something > > > like this (removing > > > > > > things like the junit configuration): > > > > > > > > > > > > ----- > > > > > > buildscript { > > > > > > ext.kotlin_version = "1.4.32" > > > > > > ext.kotlin_stdlib = "kotlin-stdlib" > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > repositories { mavenCentral() } > > > > > > dependencies { classpath > > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } > > > > > > } > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > repositories { > > > > > > mavenCentral() > > > > > > mavenLocal() > > > > > > } > > > > > > > > > > > > compileKotlin { kotlinOptions { jvmTarget = > > > java_version } } > > > > > > compileTestKotlin { kotlinOptions { jvmTarget = > > > java_version } } > > > > > > > > > > > > dependencies { > > > > > > implementation > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > } > > > > > > ----- > > > > > > > > > > > > You'll need to copy the kotlin-stdlib-1.4.32.jar > > > file in addition to the > > > > > > test.jar file to BaseX's lib directory. > > > > > > > > > > > > Kind regards, > > > > > > Reece > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, Christian Gr?n <christian.gruen at gmail.com> > > > > > > wrote: > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > I?m sorry to hear that. Did you build a custom > > > JAR file, or do you > > > > > > > encounter problems with the JDK? > > > > > > > > > > > > > > Cheers, > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM Reece Dunn <msclrhd at googlemail.com> > > > wrote: > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > Thanks for the response. Unfortunately, > > > I've not been able to get the > > > > > > > reloading working. > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > Reece > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian > > > Gr?n <christian.gruen at gmail.com> > > > > > > > wrote: > > > > > > > >> > > > > > > > >> Hi Reece, > > > > > > > >> > > > > > > > >> If you install your Java code as JAR > > > file in the repository [1], the > > > > > > > >> code will be loaded and unloaded every > > > time when your query is > > > > > > > >> executed. If you get an error message? > > > > > > > >> > > > > > > > >> > > > java.lang.reflect.InaccessibleObjectException: > > > Unable to make field > > > > > > > >> private final > > > jdk.internal.loader.URLClassPath > > > > > > > >> java.net.URLClassLoader.ucp > > > accessible: module java.base does not > > > > > > > >> "opens java.net" to unnamed > > > module @79e2c065 > > > > > > > >> > > > > > > > >> ?unloading fails [2], as you?re > > > probably using a more recent version > > > > > > > >> of the JDK, which restricts reflective > > > access to internal variables. > > > > > > > >> You can get around this by adding Java > > > flags at startup time: > > > > > > > >> > > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > >> --add-opens > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > >> > > > > > > > >> Maybe there are better solutions to > > > unload JAR files today. > > > > > > > >> Suggestions are welcome! > > > > > > > >> > > > > > > > >> Hope this helps, > > > > > > > >> Christian > > > > > > > >> > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > >> [2] > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > >> > > > > > > > >> > > > > > > > >> > > > > > > > >> On Tue, Apr 20, 2021 at 6:44 PM Reece > > > Dunn <msclrhd at googlemail.com> > > > > > > > wrote: > > > > > > > >> > > > > > > > > >> > Hi all, > > > > > > > >> > > > > > > > > >> > I'm working on a Java class that > > > I'm importing into an XQuery, so I > > > > > > > can do additional processing on the data that > > > isn't easily expressible in > > > > > > > XQuery (or XSLT). In order to get BaseX to pick > > > up a modified version of > > > > > > > the jar file I'm building, I'm restarting the > > > BaseX http server. > > > > > > > >> > > > > > > > > >> > This makes it slower to turn > > > around testing the changes. Is there a > > > > > > > better way of doing this? > > > > > > > >> > > > > > > > > >> > Kind regards, > > > > > > > >> > Reece > > > > > > > > > > > > > -------------- next part -------------- > > > > > > An HTML attachment was scrubbed... > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210430/1b9943e9/attachment-0001.htm> > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > Message: 8 > > > > > > Date: Fri, 30 Apr 2021 09:30:17 +0200 > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > Subject: Re: [basex-talk] Reloading jars on a > > > running http server. > > > > > > Message-ID: > > > > > > <CAP94bnN5QnMVBoaNzAL8WOuUo7N8MDYbM4+z=3fTqdn_eUVyZg at mail.gmail.com> > > > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > You'll need to copy the > > > kotlin-stdlib-1.4.32.jar file in addition to the > > > test.jar file to BaseX's lib directory. > > > > > > > > > > > > Please note that JAR libraries will only be > > > unregistered after query > > > > > > evalution if they are moved into the repo directory. > > > If a library is > > > > > > copied into the lib directory, it will be added to > > > the static > > > > > > classpath. > > > > > > > > > > > > In the given case, you could probably keep > > > kotlin-stdlib-1.4.32.jar in > > > > > > the lib directory, but you?ll need to keep your > > > development code in > > > > > > the repository (as described in the Wiki). It?s no > > > problem, though, to > > > > > > directly modify the repo code (you don?t have to use > > > REPO INSTALL or > > > > > > repo:install for that). > > > > > > > > > > > > If the problem persists, feel free to send me a > > > little test.jar, I can > > > > > > then do further testing. > > > > > > > > > > > > Hope this helps, > > > > > > Christian > > > > > > > > > > > > > > > > > > On Fri, Apr 30, 2021 at 9:14 AM Reece Dunn <msclrhd at googlemail.com> > > > wrote: > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > I'm not seeing any exceptions in the console > > > window, even when enabling the debug setting. I'm > > > using the AdoptOpenJDK 1.8. I also have AdoptOpenJDK > > > 11, but I assume that will have the issue you > > > described. > > > > > > > > > > > > > > It's a custom-built jar using Kotlin, built via > > > gradle. > > > > > > > > > > > > > > One thing that it could be is that I'm using > > > Kotlin objects (not classes), e.g.: > > > > > > > > > > > > > > package test > > > > > > > object Test { fun f(): String = "test" } > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > declare namespace Test = "java:test.Test"; > > > > > > > > > > > > > > declare function test:f() as xs:string { > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > }; > > > > > > > > > > > > > > The build.gradle file is simple. It looks > > > something like this (removing things like the junit > > > configuration): > > > > > > > > > > > > > > ----- > > > > > > > buildscript { > > > > > > > ext.kotlin_version = "1.4.32" > > > > > > > ext.kotlin_stdlib = "kotlin-stdlib" > > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > > > repositories { mavenCentral() } > > > > > > > dependencies { classpath > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" > > > } > > > > > > > } > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > repositories { > > > > > > > mavenCentral() > > > > > > > mavenLocal() > > > > > > > } > > > > > > > > > > > > > > compileKotlin { kotlinOptions { jvmTarget = > > > java_version } } > > > > > > > compileTestKotlin { kotlinOptions { jvmTarget = > > > java_version } } > > > > > > > > > > > > > > dependencies { > > > > > > > implementation > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > } > > > > > > > ----- > > > > > > > > > > > > > > You'll need to copy the > > > kotlin-stdlib-1.4.32.jar file in addition to the > > > test.jar file to BaseX's lib directory. > > > > > > > > > > > > > > Kind regards, > > > > > > > Reece > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, Christian Gr?n > > > <christian.gruen at gmail.com> > > > wrote: > > > > > > >> > > > > > > >> Hi Reece, > > > > > > >> > > > > > > >> I?m sorry to hear that. Did you build a > > > custom JAR file, or do you > > > > > > >> encounter problems with the JDK? > > > > > > >> > > > > > > >> Cheers, > > > > > > >> Christian > > > > > > >> > > > > > > >> > > > > > > >> > > > > > > >> On Thu, Apr 29, 2021 at 9:48 PM Reece Dunn > > > <msclrhd at googlemail.com> > > > wrote: > > > > > > >> > > > > > > > >> > Hi Christian, > > > > > > >> > > > > > > > >> > Thanks for the response. > > > Unfortunately, I've not been able to get the > > > reloading working. > > > > > > >> > > > > > > > >> > Kind regards, > > > > > > >> > Reece > > > > > > >> > > > > > > > >> > On Wed, 21 Apr 2021 at 18:49, > > > Christian Gr?n <christian.gruen at gmail.com> > > > wrote: > > > > > > >> >> > > > > > > >> >> Hi Reece, > > > > > > >> >> > > > > > > >> >> If you install your Java code as > > > JAR file in the repository [1], the > > > > > > >> >> code will be loaded and unloaded > > > every time when your query is > > > > > > >> >> executed. If you get an error > > > message? > > > > > > >> >> > > > > > > >> >> > > > java.lang.reflect.InaccessibleObjectException: > > > Unable to make field > > > > > > >> >> private final > > > jdk.internal.loader.URLClassPath > > > > > > >> >> java.net.URLClassLoader.ucp > > > accessible: module java.base does not > > > > > > >> >> "opens java.net" to unnamed > > > module @79e2c065 > > > > > > >> >> > > > > > > >> >> ?unloading fails [2], as you?re > > > probably using a more recent version > > > > > > >> >> of the JDK, which restricts > > > reflective access to internal variables. > > > > > > >> >> You can get around this by adding > > > Java flags at startup time: > > > > > > >> >> > > > > > > >> >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > >> >> --add-opens > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > >> >> > > > > > > >> >> Maybe there are better solutions > > > to unload JAR files today. > > > > > > >> >> Suggestions are welcome! > > > > > > >> >> > > > > > > >> >> Hope this helps, > > > > > > >> >> Christian > > > > > > >> >> > > > > > > >> >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > >> >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> > > > > > > >> >> On Tue, Apr 20, 2021 at 6:44 PM > > > Reece Dunn <msclrhd at googlemail.com> > > > wrote: > > > > > > >> >> > > > > > > > >> >> > Hi all, > > > > > > >> >> > > > > > > > >> >> > I'm working on a Java class > > > that I'm importing into an XQuery, so I can do > > > additional processing on the data that isn't easily > > > expressible in XQuery (or XSLT). In order to get > > > BaseX to pick up a modified version of the jar file > > > I'm building, I'm restarting the BaseX http server. > > > > > > >> >> > > > > > > > >> >> > This makes it slower to turn > > > around testing the changes. Is there a better way of > > > doing this? > > > > > > >> >> > > > > > > > >> >> > Kind regards, > > > > > > >> >> > Reece > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > Message: 9 > > > > > > Date: Fri, 30 Apr 2021 09:37:14 +0200 > > > > > > From: Marco Lettere <m.lettere at gmail.com> > > > > > > To: basex-talk at mailman.uni-konstanz.de > > > > > > Subject: Re: [basex-talk] Make use of external > > > Identity Management for > > > > > > BaseX > > > > > > Message-ID: <1a8d807b-9cb3-3cd4-f1b7-22aff5446154 at gmail.com> > > > > > > Content-Type: text/plain; charset=utf-8; > > > format=flowed > > > > > > > > > > > > Hi Christian and Rob, > > > > > > as the authors of the code you point to we confirm > > > that interacting with > > > > > > Keycloak in XQuery and in particular RestXQ is > > > rather comfortable. > > > > > > That example is mostly a demonstration code for a > > > tool that scrapes a > > > > > > site index and registers sites named gateways as > > > public clients (in > > > > > > Oauth2 sense) into a Keycloak instance. > > > > > > It is a proof of concept (as you can see from the > > > credentials? :-D) that > > > > > > has been used as a batch one-time migration in a > > > particular setting. > > > > > > > > > > > > We have also a RestXQ module that in combination > > > with basex:perm > > > > > > annotations protects access to a GUI implementing > > > the Oauth2 Code-grant > > > > > > flow. If Rob is interested we could share. > > > > > > > > > > > > If there should be any plan of integrating > > > Oauth2/OIDC flows more > > > > > > tightly into BaseX we could also be available for > > > helping out. > > > > > > > > > > > > Regards, > > > > > > Marco. > > > > > > > > > > > > On 30/04/21 08:47, Christian Gr?n wrote: > > > > > > > Hi Rob, > > > > > > > > > > > > > > There is no prepackaged module for Keycloak (at > > > least I?m aware of > > > > > > > none), but you can write your own code with > > > XQuery. See [1] for an > > > > > > > example how this might look like. > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > Best, > > > > > > > Christian > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob <private at tjalma.com> > > > wrote: > > > > > > >> Hi, > > > > > > >> > > > > > > >> I have a question. > > > > > > >> Can BaseX make use of an Identity > > > Management application like Keycloak for Users? > > > > > > >> > > > > > > >> I can?t find anything about it :) > > > > > > >> > > > > > > >> With kind regards, > > > > > > >> Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > End of BaseX-Talk Digest, Vol 136, Issue 17 > > > > > > ******************************************* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
R
Rob3 May 2021 12:50 #
Hi Marco, Got it! Looking forward to the code! :) With kind regards, Rob
Quoted text · Marco Lettere · 1660 lines
> Op 3 mei 2021, om 09:23 heeft Marco Lettere <m.lettere at gmail.com> het volgende geschreven: > > > > > > > Hi Rob, > > no the code in the repository the link > refers to is more like administrative tooling for batch importing > configuration into Keycloak for administration purposes. > > I'll work on creating an excerpt of the > code that realizes Oauth2 code grant flow with RestXQ and Keycloak > and I'll share by tonight hopefully. > > Regards, > > Marco. > > > > > > > > On 01/05/21 17:49, Rob wrote: > > > > > > > > Hi all! > > > > > > > > > > Sorry for the late response! > > > > I’m reading all the emails now, haha. > > > > > > > > > > > > I’m very happy to hear that it’s possible, I see you > > shared the following: > > > > https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > Thanks for sharing! > > > > > > > > > > > > Based on the following quote from Marco’s mail: > > > > "We have also a RestXQ module that in > > combination with basex:perm annotations protects access to a > > GUI implementing the Oauth2 Code-grant flow. If Rob is > > interested we could share.” > > > > > > > > > > > > > > The link above, is that the RESTXQ module Marco’s > > been talking about? > > > > Or is there another RESTXQ module? > > > > > > > > > > > > > > > > With kind regards, > > > > Rob > > > > > > > > > > > > > Op 1 mei 2021, om 05:29 heeft Adam Law <adamjameslaw at gmail.com> > > > het volgende geschreven: > > > > > > > > > > > > > > > > > > If Rob isn't interested, I certain am... > > > Yes please share > > > > > > > > > > > > > > > > > > >>We have also a RestXQ module that > > > in combination with basex:perm > > > > > > annotations protects access to a GUI implementing the > > > Oauth2 Code-grant > > > > > > flow. If Rob is interested we could share. > > > > > > > > > > > > > > > > > > > > > > > > Many thanks for sharing https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > This is a bit forward of me, but would you > > > consider changing the license away from European Union > > > Public Licence which appears to be 'copyleft' to say > > > BSD 3-Clause, MIT, ... > > > > > > > > > > > > > > > > > > Adam > > > > > > > > > > > > > > > On Fri, Apr 30, 2021 > > > at 6:00 PM <basex-talk-request at mailman.uni-konstanz.de> > > > 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. Make use of external Identity Management for > > > > BaseX (Rob) > > > > > > > > 2. Re: Reloading jars on a running http server. > > > > (Reece Dunn) > > > > > > > > 3. Getting profile information in server > > > > responses. (Reece Dunn) > > > > > > > > 4. Re: Make use of external Identity Management > > > > for BaseX > > > > > > > > (Christian Gr?n) > > > > > > > > 5. Re: Reloading jars on a running http server. > > > > (Christian Gr?n) > > > > > > > > 6. Re: Getting profile information in server > > > > responses. > > > > > > > > (Christian Gr?n) > > > > > > > > 7. Re: Reloading jars on a running http server. > > > > (Reece Dunn) > > > > > > > > 8. Re: Reloading jars on a running http server. > > > > (Christian Gr?n) > > > > > > > > 9. Re: Make use of external Identity Management > > > > for BaseX > > > > > > > > (Marco Lettere) > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > > > > > > > > > Message: 1 > > > > > > > > Date: Thu, 29 Apr 2021 15:54:08 +0200 > > > > > > > > From: Rob <private at tjalma.com> > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > Subject: [basex-talk] Make use of external Identity > > > > Management for > > > > > > > > BaseX > > > > > > > > Message-ID: <39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com> > > > > > > > > Content-Type: text/plain; charset=utf-8 > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > I have a question. > > > > > > > > Can BaseX make use of an Identity Management > > > > application like Keycloak for Users? > > > > > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > Message: 2 > > > > > > > > Date: Thu, 29 Apr 2021 20:48:09 +0100 > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > Subject: Re: [basex-talk] Reloading jars on a > > > > running http server. > > > > > > > > Message-ID: > > > > > > > > <CAGdtn24Qdgbe3=nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com> > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > Thanks for the response. Unfortunately, I've not > > > > been able to get the > > > > > > > > reloading working. > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > Reece > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > If you install your Java code as JAR file in > > > > the repository [1], the > > > > > > > > > code will be loaded and unloaded every time > > > > when your query is > > > > > > > > > executed. If you get an error message? > > > > > > > > > > > > > > > > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > Unable to make field > > > > > > > > > private final jdk.internal.loader.URLClassPath > > > > > > > > > java.net.URLClassLoader.ucp accessible: module > > > > java.base does not > > > > > > > > > "opens java.net" to unnamed > > > > module @79e2c065 > > > > > > > > > > > > > > > > > > ?unloading fails [2], as you?re probably using > > > > a more recent version > > > > > > > > > of the JDK, which restricts reflective access > > > > to internal variables. > > > > > > > > > You can get around this by adding Java flags at > > > > startup time: > > > > > > > > > > > > > > > > > > --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > --add-opens > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > > > > > Maybe there are better solutions to unload JAR > > > > files today. > > > > > > > > > Suggestions are welcome! > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > [2] > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > > wrote: > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > I'm working on a Java class that I'm > > > > importing into an XQuery, so I can > > > > > > > > > do additional processing on the data that isn't > > > > easily expressible in > > > > > > > > > XQuery (or XSLT). In order to get BaseX to pick > > > > up a modified version of > > > > > > > > > the jar file I'm building, I'm restarting the > > > > BaseX http server. > > > > > > > > > > > > > > > > > > > > This makes it slower to turn around > > > > testing the changes. Is there a > > > > > > > > > better way of doing this? > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > -------------- next part -------------- > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/fba079e2/attachment-0001.htm> > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > Message: 3 > > > > > > > > Date: Thu, 29 Apr 2021 20:50:40 +0100 > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > Subject: [basex-talk] Getting profile information in > > > > server responses. > > > > > > > > Message-ID: > > > > > > > > <CAGdtn26mnN7Bu3bqUN8pkS1da4eq2tQstFOnx5nqqEvZPnHdkA at mail.gmail.com> > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > In BaseX, is there a way to get the profile timings > > > > (compile, run, print, > > > > > > > > etc.) in the response of a HTTP request via the > > > > Server-Timing header ( > > > > > > > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > Reece > > > > > > > > -------------- next part -------------- > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/12a4d4fa/attachment-0001.htm> > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > Message: 4 > > > > > > > > Date: Fri, 30 Apr 2021 08:47:36 +0200 > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > To: Rob <private at tjalma.com> > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > Subject: Re: [basex-talk] Make use of external > > > > Identity Management for > > > > > > > > BaseX > > > > > > > > Message-ID: > > > > > > > > > > > > <CAP94bnP_-nFY6BQv38gqQdy9aoFn_gtRzgM1rW+GB7yjr=xTrA at mail.gmail.com> > > > > > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > There is no prepackaged module for Keycloak (at > > > > least I?m aware of > > > > > > > > none), but you can write your own code with XQuery. > > > > See [1] for an > > > > > > > > example how this might look like. > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > Best, > > > > > > > > Christian > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob <private at tjalma.com> > > > > wrote: > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > I have a question. > > > > > > > > > Can BaseX make use of an Identity Management > > > > application like Keycloak for Users? > > > > > > > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > Message: 5 > > > > > > > > Date: Fri, 30 Apr 2021 08:48:36 +0200 > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > Subject: Re: [basex-talk] Reloading jars on a > > > > running http server. > > > > > > > > Message-ID: > > > > > > > > <CAP94bnNs_gmotGxEa2Mp-fcJzQxiO3HdzLfcG0_KknotrZ6APQ at mail.gmail.com> > > > > > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > I?m sorry to hear that. Did you build a custom JAR > > > > file, or do you > > > > > > > > encounter problems with the JDK? > > > > > > > > > > > > > > > > Cheers, > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM Reece Dunn <msclrhd at googlemail.com> > > > > wrote: > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > Thanks for the response. Unfortunately, I've > > > > not been able to get the reloading working. > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian Gr?n > > > > <christian.gruen at gmail.com> > > > > wrote: > > > > > > > > >> > > > > > > > > >> Hi Reece, > > > > > > > > >> > > > > > > > > >> If you install your Java code as JAR file > > > > in the repository [1], the > > > > > > > > >> code will be loaded and unloaded every time > > > > when your query is > > > > > > > > >> executed. If you get an error message? > > > > > > > > >> > > > > > > > > >> > > > > java.lang.reflect.InaccessibleObjectException: > > > > Unable to make field > > > > > > > > >> private final > > > > jdk.internal.loader.URLClassPath > > > > > > > > >> java.net.URLClassLoader.ucp accessible: > > > > module java.base does not > > > > > > > > >> "opens java.net" to unnamed > > > > module @79e2c065 > > > > > > > > >> > > > > > > > > >> ?unloading fails [2], as you?re probably > > > > using a more recent version > > > > > > > > >> of the JDK, which restricts reflective > > > > access to internal variables. > > > > > > > > >> You can get around this by adding Java > > > > flags at startup time: > > > > > > > > >> > > > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > >> --add-opens > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > >> > > > > > > > > >> Maybe there are better solutions to unload > > > > JAR files today. > > > > > > > > >> Suggestions are welcome! > > > > > > > > >> > > > > > > > > >> Hope this helps, > > > > > > > > >> Christian > > > > > > > > >> > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> On Tue, Apr 20, 2021 at 6:44 PM Reece Dunn > > > > <msclrhd at googlemail.com> > > > > wrote: > > > > > > > > >> > > > > > > > > > >> > Hi all, > > > > > > > > >> > > > > > > > > > >> > I'm working on a Java class that I'm > > > > importing into an XQuery, so I can do additional > > > > processing on the data that isn't easily expressible > > > > in XQuery (or XSLT). In order to get BaseX to pick > > > > up a modified version of the jar file I'm building, > > > > I'm restarting the BaseX http server. > > > > > > > > >> > > > > > > > > > >> > This makes it slower to turn around > > > > testing the changes. Is there a better way of doing > > > > this? > > > > > > > > >> > > > > > > > > > >> > Kind regards, > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > Message: 6 > > > > > > > > Date: Fri, 30 Apr 2021 08:55:49 +0200 > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > Subject: Re: [basex-talk] Getting profile > > > > information in server > > > > > > > > responses. > > > > > > > > Message-ID: > > > > > > > > <CAP94bnMCyZqRYvMEJG7EkON+FjNS0fsGWwx-_2EQrzzYPV-hZQ at mail.gmail.com> > > > > > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > > > > > > > > > A good idea; I?ll think of ways to get this > > > > included. One challenge > > > > > > > > might be that the response is streamed to the > > > > client. This means that > > > > > > > > when creating the HTTP request headers, it will not > > > > be known yet how > > > > > > > > long the evaluation will take (and the time for > > > > evaluation may also > > > > > > > > depend on the connection speed). The time for > > > > parsing and compiling > > > > > > > > the query should be known at that time, though. ? > > > > Maybe we could > > > > > > > > suppress result streaming when timings are > > > > requested. > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:50 PM Reece Dunn <msclrhd at googlemail.com> > > > > wrote: > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > In BaseX, is there a way to get the profile > > > > timings (compile, run, print, etc.) in the response > > > > of a HTTP request via the Server-Timing header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > Message: 7 > > > > > > > > Date: Fri, 30 Apr 2021 08:14:21 +0100 > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > Subject: Re: [basex-talk] Reloading jars on a > > > > running http server. > > > > > > > > Message-ID: > > > > > > > > <CAGdtn25JU3aGsHZepExgDigQX7asNDOF=2C6PWJcz1kgQqZEfA at mail.gmail.com> > > > > > > > > Content-Type: text/plain; charset="utf-8" > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > I'm not seeing any exceptions in the console window, > > > > even when enabling the > > > > > > > > debug setting. I'm using the AdoptOpenJDK 1.8. I > > > > also have AdoptOpenJDK 11, > > > > > > > > but I assume that will have the issue you described. > > > > > > > > > > > > > > > > It's a custom-built jar using Kotlin, built via > > > > gradle. > > > > > > > > > > > > > > > > One thing that it could be is that I'm using Kotlin > > > > objects (not classes), > > > > > > > > e.g.: > > > > > > > > > > > > > > > > package test > > > > > > > > object Test { fun f(): String = "test" } > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > declare namespace Test = "java:test.Test"; > > > > > > > > > > > > > > > > declare function test:f() as xs:string { > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > }; > > > > > > > > > > > > > > > > The build.gradle file is simple. It looks something > > > > like this (removing > > > > > > > > things like the junit configuration): > > > > > > > > > > > > > > > > ----- > > > > > > > > buildscript { > > > > > > > > ext.kotlin_version = "1.4.32" > > > > > > > > ext.kotlin_stdlib = "kotlin-stdlib" > > > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > > > > > repositories { mavenCentral() } > > > > > > > > dependencies { classpath > > > > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } > > > > > > > > } > > > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > > > repositories { > > > > > > > > mavenCentral() > > > > > > > > mavenLocal() > > > > > > > > } > > > > > > > > > > > > > > > > compileKotlin { kotlinOptions { jvmTarget = > > > > java_version } } > > > > > > > > compileTestKotlin { kotlinOptions { jvmTarget = > > > > java_version } } > > > > > > > > > > > > > > > > dependencies { > > > > > > > > implementation > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > } > > > > > > > > ----- > > > > > > > > > > > > > > > > You'll need to copy the kotlin-stdlib-1.4.32.jar > > > > file in addition to the > > > > > > > > test.jar file to BaseX's lib directory. > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > Reece > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > I?m sorry to hear that. Did you build a custom > > > > JAR file, or do you > > > > > > > > > encounter problems with the JDK? > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM Reece Dunn <msclrhd at googlemail.com> > > > > wrote: > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > Thanks for the response. Unfortunately, > > > > I've not been able to get the > > > > > > > > > reloading working. > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian > > > > Gr?n <christian.gruen at gmail.com> > > > > > > > > > wrote: > > > > > > > > > >> > > > > > > > > > >> Hi Reece, > > > > > > > > > >> > > > > > > > > > >> If you install your Java code as JAR > > > > file in the repository [1], the > > > > > > > > > >> code will be loaded and unloaded every > > > > time when your query is > > > > > > > > > >> executed. If you get an error message? > > > > > > > > > >> > > > > > > > > > >> > > > > java.lang.reflect.InaccessibleObjectException: > > > > Unable to make field > > > > > > > > > >> private final > > > > jdk.internal.loader.URLClassPath > > > > > > > > > >> java.net.URLClassLoader.ucp > > > > accessible: module java.base does not > > > > > > > > > >> "opens java.net" to unnamed > > > > module @79e2c065 > > > > > > > > > >> > > > > > > > > > >> ?unloading fails [2], as you?re > > > > probably using a more recent version > > > > > > > > > >> of the JDK, which restricts reflective > > > > access to internal variables. > > > > > > > > > >> You can get around this by adding Java > > > > flags at startup time: > > > > > > > > > >> > > > > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > >> --add-opens > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > >> > > > > > > > > > >> Maybe there are better solutions to > > > > unload JAR files today. > > > > > > > > > >> Suggestions are welcome! > > > > > > > > > >> > > > > > > > > > >> Hope this helps, > > > > > > > > > >> Christian > > > > > > > > > >> > > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > >> [2] > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > >> > > > > > > > > > >> > > > > > > > > > >> > > > > > > > > > >> On Tue, Apr 20, 2021 at 6:44 PM Reece > > > > Dunn <msclrhd at googlemail.com> > > > > > > > > > wrote: > > > > > > > > > >> > > > > > > > > > > >> > Hi all, > > > > > > > > > >> > > > > > > > > > > >> > I'm working on a Java class that > > > > I'm importing into an XQuery, so I > > > > > > > > > can do additional processing on the data that > > > > isn't easily expressible in > > > > > > > > > XQuery (or XSLT). In order to get BaseX to pick > > > > up a modified version of > > > > > > > > > the jar file I'm building, I'm restarting the > > > > BaseX http server. > > > > > > > > > >> > > > > > > > > > > >> > This makes it slower to turn > > > > around testing the changes. Is there a > > > > > > > > > better way of doing this? > > > > > > > > > >> > > > > > > > > > > >> > Kind regards, > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > -------------- next part -------------- > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210430/1b9943e9/attachment-0001.htm> > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > Message: 8 > > > > > > > > Date: Fri, 30 Apr 2021 09:30:17 +0200 > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > Subject: Re: [basex-talk] Reloading jars on a > > > > running http server. > > > > > > > > Message-ID: > > > > > > > > <CAP94bnN5QnMVBoaNzAL8WOuUo7N8MDYbM4+z=3fTqdn_eUVyZg at mail.gmail.com> > > > > > > > > Content-Type: text/plain; charset="UTF-8" > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > You'll need to copy the > > > > kotlin-stdlib-1.4.32.jar file in addition to the > > > > test.jar file to BaseX's lib directory. > > > > > > > > > > > > > > > > Please note that JAR libraries will only be > > > > unregistered after query > > > > > > > > evalution if they are moved into the repo directory. > > > > If a library is > > > > > > > > copied into the lib directory, it will be added to > > > > the static > > > > > > > > classpath. > > > > > > > > > > > > > > > > In the given case, you could probably keep > > > > kotlin-stdlib-1.4.32.jar in > > > > > > > > the lib directory, but you?ll need to keep your > > > > development code in > > > > > > > > the repository (as described in the Wiki). It?s no > > > > problem, though, to > > > > > > > > directly modify the repo code (you don?t have to use > > > > REPO INSTALL or > > > > > > > > repo:install for that). > > > > > > > > > > > > > > > > If the problem persists, feel free to send me a > > > > little test.jar, I can > > > > > > > > then do further testing. > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Apr 30, 2021 at 9:14 AM Reece Dunn <msclrhd at googlemail.com> > > > > wrote: > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > I'm not seeing any exceptions in the console > > > > window, even when enabling the debug setting. I'm > > > > using the AdoptOpenJDK 1.8. I also have AdoptOpenJDK > > > > 11, but I assume that will have the issue you > > > > described. > > > > > > > > > > > > > > > > > > It's a custom-built jar using Kotlin, built via > > > > gradle. > > > > > > > > > > > > > > > > > > One thing that it could be is that I'm using > > > > Kotlin objects (not classes), e.g.: > > > > > > > > > > > > > > > > > > package test > > > > > > > > > object Test { fun f(): String = "test" } > > > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > > > declare namespace Test = "java:test.Test"; > > > > > > > > > > > > > > > > > > declare function test:f() as xs:string { > > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > > }; > > > > > > > > > > > > > > > > > > The build.gradle file is simple. It looks > > > > something like this (removing things like the junit > > > > configuration): > > > > > > > > > > > > > > > > > > ----- > > > > > > > > > buildscript { > > > > > > > > > ext.kotlin_version = "1.4.32" > > > > > > > > > ext.kotlin_stdlib = "kotlin-stdlib" > > > > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > > > > > > > repositories { mavenCentral() } > > > > > > > > > dependencies { classpath > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" > > > > } > > > > > > > > > } > > > > > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > > mavenCentral() > > > > > > > > > mavenLocal() > > > > > > > > > } > > > > > > > > > > > > > > > > > > compileKotlin { kotlinOptions { jvmTarget = > > > > java_version } } > > > > > > > > > compileTestKotlin { kotlinOptions { jvmTarget = > > > > java_version } } > > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > > implementation > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > > } > > > > > > > > > ----- > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > kotlin-stdlib-1.4.32.jar file in addition to the > > > > test.jar file to BaseX's lib directory. > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, Christian Gr?n > > > > <christian.gruen at gmail.com> > > > > wrote: > > > > > > > > >> > > > > > > > > >> Hi Reece, > > > > > > > > >> > > > > > > > > >> I?m sorry to hear that. Did you build a > > > > custom JAR file, or do you > > > > > > > > >> encounter problems with the JDK? > > > > > > > > >> > > > > > > > > >> Cheers, > > > > > > > > >> Christian > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> > > > > > > > > >> On Thu, Apr 29, 2021 at 9:48 PM Reece Dunn > > > > <msclrhd at googlemail.com> > > > > wrote: > > > > > > > > >> > > > > > > > > > >> > Hi Christian, > > > > > > > > >> > > > > > > > > > >> > Thanks for the response. > > > > Unfortunately, I've not been able to get the > > > > reloading working. > > > > > > > > >> > > > > > > > > > >> > Kind regards, > > > > > > > > >> > Reece > > > > > > > > >> > > > > > > > > > >> > On Wed, 21 Apr 2021 at 18:49, > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > wrote: > > > > > > > > >> >> > > > > > > > > >> >> Hi Reece, > > > > > > > > >> >> > > > > > > > > >> >> If you install your Java code as > > > > JAR file in the repository [1], the > > > > > > > > >> >> code will be loaded and unloaded > > > > every time when your query is > > > > > > > > >> >> executed. If you get an error > > > > message? > > > > > > > > >> >> > > > > > > > > >> >> > > > > java.lang.reflect.InaccessibleObjectException: > > > > Unable to make field > > > > > > > > >> >> private final > > > > jdk.internal.loader.URLClassPath > > > > > > > > >> >> java.net.URLClassLoader.ucp > > > > accessible: module java.base does not > > > > > > > > >> >> "opens java.net" to unnamed > > > > module @79e2c065 > > > > > > > > >> >> > > > > > > > > >> >> ?unloading fails [2], as you?re > > > > probably using a more recent version > > > > > > > > >> >> of the JDK, which restricts > > > > reflective access to internal variables. > > > > > > > > >> >> You can get around this by adding > > > > Java flags at startup time: > > > > > > > > >> >> > > > > > > > > >> >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > >> >> --add-opens > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > >> >> > > > > > > > > >> >> Maybe there are better solutions > > > > to unload JAR files today. > > > > > > > > >> >> Suggestions are welcome! > > > > > > > > >> >> > > > > > > > > >> >> Hope this helps, > > > > > > > > >> >> Christian > > > > > > > > >> >> > > > > > > > > >> >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > >> >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > >> >> > > > > > > > > >> >> > > > > > > > > >> >> > > > > > > > > >> >> On Tue, Apr 20, 2021 at 6:44 PM > > > > Reece Dunn <msclrhd at googlemail.com> > > > > wrote: > > > > > > > > >> >> > > > > > > > > > >> >> > Hi all, > > > > > > > > >> >> > > > > > > > > > >> >> > I'm working on a Java class > > > > that I'm importing into an XQuery, so I can do > > > > additional processing on the data that isn't easily > > > > expressible in XQuery (or XSLT). In order to get > > > > BaseX to pick up a modified version of the jar file > > > > I'm building, I'm restarting the BaseX http server. > > > > > > > > >> >> > > > > > > > > > >> >> > This makes it slower to turn > > > > around testing the changes. Is there a better way of > > > > doing this? > > > > > > > > >> >> > > > > > > > > > >> >> > Kind regards, > > > > > > > > >> >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > Message: 9 > > > > > > > > Date: Fri, 30 Apr 2021 09:37:14 +0200 > > > > > > > > From: Marco Lettere <m.lettere at gmail.com> > > > > > > > > To: basex-talk at mailman.uni-konstanz.de > > > > > > > > Subject: Re: [basex-talk] Make use of external > > > > Identity Management for > > > > > > > > BaseX > > > > > > > > Message-ID: <1a8d807b-9cb3-3cd4-f1b7-22aff5446154 at gmail.com> > > > > > > > > Content-Type: text/plain; charset=utf-8; > > > > format=flowed > > > > > > > > > > > > > > > > Hi Christian and Rob, > > > > > > > > as the authors of the code you point to we confirm > > > > that interacting with > > > > > > > > Keycloak in XQuery and in particular RestXQ is > > > > rather comfortable. > > > > > > > > That example is mostly a demonstration code for a > > > > tool that scrapes a > > > > > > > > site index and registers sites named gateways as > > > > public clients (in > > > > > > > > Oauth2 sense) into a Keycloak instance. > > > > > > > > It is a proof of concept (as you can see from the > > > > credentials? :-D) that > > > > > > > > has been used as a batch one-time migration in a > > > > particular setting. > > > > > > > > > > > > > > > > We have also a RestXQ module that in combination > > > > with basex:perm > > > > > > > > annotations protects access to a GUI implementing > > > > the Oauth2 Code-grant > > > > > > > > flow. If Rob is interested we could share. > > > > > > > > > > > > > > > > If there should be any plan of integrating > > > > Oauth2/OIDC flows more > > > > > > > > tightly into BaseX we could also be available for > > > > helping out. > > > > > > > > > > > > > > > > Regards, > > > > > > > > Marco. > > > > > > > > > > > > > > > > On 30/04/21 08:47, Christian Gr?n wrote: > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > > > There is no prepackaged module for Keycloak (at > > > > least I?m aware of > > > > > > > > > none), but you can write your own code with > > > > XQuery. See [1] for an > > > > > > > > > example how this might look like. > > > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob <private at tjalma.com> > > > > wrote: > > > > > > > > >> Hi, > > > > > > > > >> > > > > > > > > >> I have a question. > > > > > > > > >> Can BaseX make use of an Identity > > > > Management application like Keycloak for Users? > > > > > > > > >> > > > > > > > > >> I can?t find anything about it :) > > > > > > > > >> > > > > > > > > >> With kind regards, > > > > > > > > >> Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > End of BaseX-Talk Digest, Vol 136, Issue 17 > > > > > > > > ******************************************* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
ML
Marco Lettere4 May 2021 09:51 #
Hi Rob and all, I attach here an example of an OIDC code grant flow implemented with RestXQ, BaseX permission and error handler. The file includes a sort of library for performing the steps of the OIDC flow plus a minimal application that is registered as public client inside keycloak and which is what you should access from your browser by calling http://localhost:8984/authtest or http://localhost:8984/authtest/internal. I've put into it also the logout procedure for performing the back-channel logout which closes the SSO session. This is only a resume of a more generic and complex module but it should be useful as a howto and it should be as simple to install as copying the file to your BaseX' webapp folder. Use it as you like. Regards, Marco.
Quoted text · Rob · 1776 lines
On 03/05/21 12:50, Rob wrote: > > Hi Marco, > > > > > Got it! > > Looking forward to the code! :) > > > > > > With kind regards, > > Rob > > > > > > Op 3 mei 2021, om 09:23 heeft Marco Lettere > > <m.lettere at gmail.com> het > > volgende geschreven: > > > > > > > > > > > > > > Hi Rob, > > > > no the code in the > > repository the link refers to is more like > > administrative tooling for batch importing > > configuration into Keycloak for administration > > purposes. > > > > I'll work on creating an > > excerpt of the code that realizes Oauth2 code grant > > flow with RestXQ and Keycloak and I'll share by > > tonight hopefully. > > > > Regards, > > > > Marco. > > > > > > > > > > > > > > > > On 01/05/21 17:49, Rob > > wrote: > > > > > > > > > > > > > > Hi all! > > > > > > > > > > > > > > > Sorry for the late response! > > > > > > I’m reading all the emails now, haha. > > > > > > > > > > > > > > > > > > I’m very happy to hear that it’s > > > possible, I see you shared the following: > > > > > > https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > Thanks for sharing! > > > > > > > > > > > > > > > > > > Based on the following quote from > > > Marco’s mail: > > > > > > "We have also a RestXQ module that in > > > combination with basex:perm annotations protects > > > access to a GUI implementing the Oauth2 Code-grant > > > flow. If Rob is interested we could share.” > > > > > > > > > > > > > > > > > > > > > The > > > link above, is that the RESTXQ module Marco’s been > > > talking about? > > > > > > Or > > > is there another RESTXQ module? > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > Rob > > > > > > > > > > > > > > > > > > > Op 1 mei 2021, om 05:29 heeft Adam > > > > Law <adamjameslaw at gmail.com> > > > > het volgende geschreven: > > > > > > > > > > > > > > > > > > > > > > > > If Rob isn't interested, I > > > > certain am... Yes please share > > > > > > > > > > > > > > > > > > > > > > > > >>We have also a RestXQ > > > > module that in combination with basex:perm > > > > > > > > > > > > annotations protects access to a GUI > > > > implementing the Oauth2 Code-grant > > > > > > > > flow. If Rob is interested we could > > > > share. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks for sharing https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > This is a bit forward of me, > > > > but would you consider changing the > > > > license away from European Union Public > > > > Licence which appears to be 'copyleft' to > > > > say BSD 3-Clause, MIT, ... > > > > > > > > > > > > > > > > > > > > > > > > Adam > > > > > > > > > > > > > > > > > > > > On Fri, > > > > Apr 30, 2021 at 6:00 PM <basex-talk-request at mailman.uni-konstanz.de> > > > > 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. Make use of external Identity > > > > > Management for BaseX (Rob) > > > > > > > > > > 2. Re: Reloading jars on a running > > > > > http server. (Reece Dunn) > > > > > > > > > > 3. Getting profile information in > > > > > server responses. (Reece Dunn) > > > > > > > > > > 4. Re: Make use of external Identity > > > > > Management for BaseX > > > > > > > > > > (Christian Gr?n) > > > > > > > > > > 5. Re: Reloading jars on a running > > > > > http server. (Christian Gr?n) > > > > > > > > > > 6. Re: Getting profile information in > > > > > server responses. > > > > > > > > > > (Christian Gr?n) > > > > > > > > > > 7. Re: Reloading jars on a running > > > > > http server. (Reece Dunn) > > > > > > > > > > 8. Re: Reloading jars on a running > > > > > http server. (Christian Gr?n) > > > > > > > > > > 9. Re: Make use of external Identity > > > > > Management for BaseX > > > > > > > > > > (Marco Lettere) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > > > > > > > > > > > > > Message: 1 > > > > > > > > > > Date: Thu, 29 Apr 2021 15:54:08 +0200 > > > > > > > > > > From: Rob <private at tjalma.com> > > > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > Subject: [basex-talk] Make use of > > > > > external Identity Management for > > > > > > > > > > BaseX > > > > > > > > > > Message-ID: <39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com> > > > > > > > > > > Content-Type: text/plain; > > > > > charset=utf-8 > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > I have a question. > > > > > > > > > > Can BaseX make use of an Identity > > > > > Management application like Keycloak for > > > > > Users? > > > > > > > > > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > Message: 2 > > > > > > > > > > Date: Thu, 29 Apr 2021 20:48:09 +0100 > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > Subject: Re: [basex-talk] Reloading jars > > > > > on a running http server. > > > > > > > > > > Message-ID: > > > > > > > > > > <CAGdtn24Qdgbe3=nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com> > > > > > > > > > > Content-Type: text/plain; > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > Thanks for the response. Unfortunately, > > > > > I've not been able to get the > > > > > > > > > > reloading working. > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, Christian > > > > > Gr?n <christian.gruen at gmail.com> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > If you install your Java code as > > > > > JAR file in the repository [1], the > > > > > > > > > > > code will be loaded and unloaded > > > > > every time when your query is > > > > > > > > > > > executed. If you get an error > > > > > message? > > > > > > > > > > > > > > > > > > > > > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > Unable to make field > > > > > > > > > > > private final > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > java.net.URLClassLoader.ucp > > > > > accessible: module java.base does not > > > > > > > > > > > "opens java.net" > > > > > to unnamed module @79e2c065 > > > > > > > > > > > > > > > > > > > > > > ?unloading fails [2], as you?re > > > > > probably using a more recent version > > > > > > > > > > > of the JDK, which restricts > > > > > reflective access to internal variables. > > > > > > > > > > > You can get around this by adding > > > > > Java flags at startup time: > > > > > > > > > > > > > > > > > > > > > > --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > > --add-opens > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > > > > > > > > > Maybe there are better solutions to > > > > > unload JAR files today. > > > > > > > > > > > Suggestions are welcome! > > > > > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > [2] > > > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Apr 20, 2021 at 6:44 PM > > > > > Reece Dunn <msclrhd at googlemail.com> > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > I'm working on a Java class > > > > > that I'm importing into an XQuery, so I > > > > > can > > > > > > > > > > > do additional processing on the > > > > > data that isn't easily expressible in > > > > > > > > > > > XQuery (or XSLT). In order to get > > > > > BaseX to pick up a modified version of > > > > > > > > > > > the jar file I'm building, I'm > > > > > restarting the BaseX http server. > > > > > > > > > > > > > > > > > > > > > > > > This makes it slower to turn > > > > > around testing the changes. Is there a > > > > > > > > > > > better way of doing this? > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- > > > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/fba079e2/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > Message: 3 > > > > > > > > > > Date: Thu, 29 Apr 2021 20:50:40 +0100 > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > Subject: [basex-talk] Getting profile > > > > > information in server responses. > > > > > > > > > > Message-ID: > > > > > > > > > > <CAGdtn26mnN7Bu3bqUN8pkS1da4eq2tQstFOnx5nqqEvZPnHdkA at mail.gmail.com> > > > > > > > > > > Content-Type: text/plain; > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > In BaseX, is there a way to get the > > > > > profile timings (compile, run, print, > > > > > > > > > > etc.) in the response of a HTTP request > > > > > via the Server-Timing header ( > > > > > > > > > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > Reece > > > > > > > > > > -------------- next part -------------- > > > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/12a4d4fa/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > Message: 4 > > > > > > > > > > Date: Fri, 30 Apr 2021 08:47:36 +0200 > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > To: Rob <private at tjalma.com> > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > Subject: Re: [basex-talk] Make use of > > > > > external Identity Management for > > > > > > > > > > BaseX > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > <CAP94bnP_-nFY6BQv38gqQdy9aoFn_gtRzgM1rW+GB7yjr=xTrA at mail.gmail.com> > > > > > > > > > > Content-Type: text/plain; > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > > > > > There is no prepackaged module for > > > > > Keycloak (at least I?m aware of > > > > > > > > > > none), but you can write your own code > > > > > with XQuery. See [1] for an > > > > > > > > > > example how this might look like. > > > > > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob <private at tjalma.com> > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > I have a question. > > > > > > > > > > > Can BaseX make use of an Identity > > > > > Management application like Keycloak for > > > > > Users? > > > > > > > > > > > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > Message: 5 > > > > > > > > > > Date: Fri, 30 Apr 2021 08:48:36 +0200 > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > Subject: Re: [basex-talk] Reloading jars > > > > > on a running http server. > > > > > > > > > > Message-ID: > > > > > > > > > > <CAP94bnNs_gmotGxEa2Mp-fcJzQxiO3HdzLfcG0_KknotrZ6APQ at mail.gmail.com> > > > > > > > > > > Content-Type: text/plain; > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > I?m sorry to hear that. Did you build a > > > > > custom JAR file, or do you > > > > > > > > > > encounter problems with the JDK? > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM Reece > > > > > Dunn <msclrhd at googlemail.com> > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > Thanks for the response. > > > > > Unfortunately, I've not been able to get > > > > > the reloading working. > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > wrote: > > > > > > > > > > >> > > > > > > > > > > >> Hi Reece, > > > > > > > > > > >> > > > > > > > > > > >> If you install your Java code > > > > > as JAR file in the repository [1], the > > > > > > > > > > >> code will be loaded and > > > > > unloaded every time when your query is > > > > > > > > > > >> executed. If you get an error > > > > > message? > > > > > > > > > > >> > > > > > > > > > > >> > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > Unable to make field > > > > > > > > > > >> private final > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > >> java.net.URLClassLoader.ucp > > > > > accessible: module java.base does not > > > > > > > > > > >> "opens java.net" > > > > > to unnamed module @79e2c065 > > > > > > > > > > >> > > > > > > > > > > >> ?unloading fails [2], as you?re > > > > > probably using a more recent version > > > > > > > > > > >> of the JDK, which restricts > > > > > reflective access to internal variables. > > > > > > > > > > >> You can get around this by > > > > > adding Java flags at startup time: > > > > > > > > > > >> > > > > > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > >> --add-opens > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > >> > > > > > > > > > > >> Maybe there are better > > > > > solutions to unload JAR files today. > > > > > > > > > > >> Suggestions are welcome! > > > > > > > > > > >> > > > > > > > > > > >> Hope this helps, > > > > > > > > > > >> Christian > > > > > > > > > > >> > > > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> On Tue, Apr 20, 2021 at 6:44 PM > > > > > Reece Dunn <msclrhd at googlemail.com> > > > > > wrote: > > > > > > > > > > >> > > > > > > > > > > > >> > Hi all, > > > > > > > > > > >> > > > > > > > > > > > >> > I'm working on a Java > > > > > class that I'm importing into an XQuery, > > > > > so I can do additional processing on the > > > > > data that isn't easily expressible in > > > > > XQuery (or XSLT). In order to get BaseX > > > > > to pick up a modified version of the jar > > > > > file I'm building, I'm restarting the > > > > > BaseX http server. > > > > > > > > > > >> > > > > > > > > > > > >> > This makes it slower to > > > > > turn around testing the changes. Is > > > > > there a better way of doing this? > > > > > > > > > > >> > > > > > > > > > > > >> > Kind regards, > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > Message: 6 > > > > > > > > > > Date: Fri, 30 Apr 2021 08:55:49 +0200 > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > Subject: Re: [basex-talk] Getting > > > > > profile information in server > > > > > > > > > > responses. > > > > > > > > > > Message-ID: > > > > > > > > > > <CAP94bnMCyZqRYvMEJG7EkON+FjNS0fsGWwx-_2EQrzzYPV-hZQ at mail.gmail.com> > > > > > > > > > > Content-Type: text/plain; > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > A good idea; I?ll think of ways to get > > > > > this included. One challenge > > > > > > > > > > might be that the response is streamed > > > > > to the client. This means that > > > > > > > > > > when creating the HTTP request headers, > > > > > it will not be known yet how > > > > > > > > > > long the evaluation will take (and the > > > > > time for evaluation may also > > > > > > > > > > depend on the connection speed). The > > > > > time for parsing and compiling > > > > > > > > > > the query should be known at that time, > > > > > though. ? Maybe we could > > > > > > > > > > suppress result streaming when timings > > > > > are requested. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:50 PM Reece > > > > > Dunn <msclrhd at googlemail.com> > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > In BaseX, is there a way to get the > > > > > profile timings (compile, run, print, > > > > > etc.) in the response of a HTTP request > > > > > via the Server-Timing header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > Message: 7 > > > > > > > > > > Date: Fri, 30 Apr 2021 08:14:21 +0100 > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > Subject: Re: [basex-talk] Reloading jars > > > > > on a running http server. > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > <CAGdtn25JU3aGsHZepExgDigQX7asNDOF=2C6PWJcz1kgQqZEfA at mail.gmail.com> > > > > > > > > > > Content-Type: text/plain; > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > I'm not seeing any exceptions in the > > > > > console window, even when enabling the > > > > > > > > > > debug setting. I'm using the > > > > > AdoptOpenJDK 1.8. I also have > > > > > AdoptOpenJDK 11, > > > > > > > > > > but I assume that will have the issue > > > > > you described. > > > > > > > > > > > > > > > > > > > > It's a custom-built jar using Kotlin, > > > > > built via gradle. > > > > > > > > > > > > > > > > > > > > One thing that it could be is that I'm > > > > > using Kotlin objects (not classes), > > > > > > > > > > e.g.: > > > > > > > > > > > > > > > > > > > > package test > > > > > > > > > > object Test { fun f(): String = > > > > > "test" } > > > > > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > > > > > declare namespace Test = > > > > > "java:test.Test"; > > > > > > > > > > > > > > > > > > > > declare function test:f() as > > > > > xs:string { > > > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > The build.gradle file is simple. It > > > > > looks something like this (removing > > > > > > > > > > things like the junit configuration): > > > > > > > > > > > > > > > > > > > > ----- > > > > > > > > > > buildscript { > > > > > > > > > > ext.kotlin_version = "1.4.32" > > > > > > > > > > ext.kotlin_stdlib = "kotlin-stdlib" > > > > > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > > > > > > > > > repositories { mavenCentral() } > > > > > > > > > > dependencies { classpath > > > > > > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > > > mavenCentral() > > > > > > > > > > mavenLocal() > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > compileKotlin { kotlinOptions { > > > > > jvmTarget = java_version } } > > > > > > > > > > compileTestKotlin { kotlinOptions { > > > > > jvmTarget = java_version } } > > > > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > > > implementation > > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > > > } > > > > > > > > > > ----- > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > kotlin-stdlib-1.4.32.jar file in > > > > > addition to the > > > > > > > > > > test.jar file to BaseX's lib directory. > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, Christian > > > > > Gr?n <christian.gruen at gmail.com> > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > I?m sorry to hear that. Did you > > > > > build a custom JAR file, or do you > > > > > > > > > > > encounter problems with the JDK? > > > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM > > > > > Reece Dunn <msclrhd at googlemail.com> > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the response. > > > > > Unfortunately, I've not been able to get > > > > > the > > > > > > > > > > > reloading working. > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > wrote: > > > > > > > > > > > >> > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > >> > > > > > > > > > > > >> If you install your Java > > > > > code as JAR file in the repository [1], > > > > > the > > > > > > > > > > > >> code will be loaded and > > > > > unloaded every time when your query is > > > > > > > > > > > >> executed. If you get an > > > > > error message? > > > > > > > > > > > >> > > > > > > > > > > > >> > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > Unable to make field > > > > > > > > > > > >> private final > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > >> > > > > > java.net.URLClassLoader.ucp accessible: > > > > > module java.base does not > > > > > > > > > > > >> "opens java.net" > > > > > to unnamed module @79e2c065 > > > > > > > > > > > >> > > > > > > > > > > > >> ?unloading fails [2], as > > > > > you?re probably using a more recent > > > > > version > > > > > > > > > > > >> of the JDK, which > > > > > restricts reflective access to internal > > > > > variables. > > > > > > > > > > > >> You can get around this by > > > > > adding Java flags at startup time: > > > > > > > > > > > >> > > > > > > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > > >> --add-opens > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > >> > > > > > > > > > > > >> Maybe there are better > > > > > solutions to unload JAR files today. > > > > > > > > > > > >> Suggestions are welcome! > > > > > > > > > > > >> > > > > > > > > > > > >> Hope this helps, > > > > > > > > > > > >> Christian > > > > > > > > > > > >> > > > > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > >> [2] > > > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > >> > > > > > > > > > > > >> > > > > > > > > > > > >> > > > > > > > > > > > >> On Tue, Apr 20, 2021 at > > > > > 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > wrote: > > > > > > > > > > > >> > > > > > > > > > > > > >> > Hi all, > > > > > > > > > > > >> > > > > > > > > > > > > >> > I'm working on a Java > > > > > class that I'm importing into an XQuery, > > > > > so I > > > > > > > > > > > can do additional processing on the > > > > > data that isn't easily expressible in > > > > > > > > > > > XQuery (or XSLT). In order to get > > > > > BaseX to pick up a modified version of > > > > > > > > > > > the jar file I'm building, I'm > > > > > restarting the BaseX http server. > > > > > > > > > > > >> > > > > > > > > > > > > >> > This makes it slower > > > > > to turn around testing the changes. Is > > > > > there a > > > > > > > > > > > better way of doing this? > > > > > > > > > > > >> > > > > > > > > > > > > >> > Kind regards, > > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > > > > -------------- next part -------------- > > > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210430/1b9943e9/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > Message: 8 > > > > > > > > > > Date: Fri, 30 Apr 2021 09:30:17 +0200 > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > Subject: Re: [basex-talk] Reloading jars > > > > > on a running http server. > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > <CAP94bnN5QnMVBoaNzAL8WOuUo7N8MDYbM4+z=3fTqdn_eUVyZg at mail.gmail.com> > > > > > > > > > > Content-Type: text/plain; > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > kotlin-stdlib-1.4.32.jar file in > > > > > addition to the test.jar file to BaseX's > > > > > lib directory. > > > > > > > > > > > > > > > > > > > > Please note that JAR libraries will only > > > > > be unregistered after query > > > > > > > > > > evalution if they are moved into the > > > > > repo directory. If a library is > > > > > > > > > > copied into the lib directory, it will > > > > > be added to the static > > > > > > > > > > classpath. > > > > > > > > > > > > > > > > > > > > In the given case, you could probably > > > > > keep kotlin-stdlib-1.4.32.jar in > > > > > > > > > > the lib directory, but you?ll need to > > > > > keep your development code in > > > > > > > > > > the repository (as described in the > > > > > Wiki). It?s no problem, though, to > > > > > > > > > > directly modify the repo code (you don?t > > > > > have to use REPO INSTALL or > > > > > > > > > > repo:install for that). > > > > > > > > > > > > > > > > > > > > If the problem persists, feel free to > > > > > send me a little test.jar, I can > > > > > > > > > > then do further testing. > > > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Apr 30, 2021 at 9:14 AM Reece > > > > > Dunn <msclrhd at googlemail.com> > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > I'm not seeing any exceptions in > > > > > the console window, even when enabling > > > > > the debug setting. I'm using the > > > > > AdoptOpenJDK 1.8. I also have > > > > > AdoptOpenJDK 11, but I assume that will > > > > > have the issue you described. > > > > > > > > > > > > > > > > > > > > > > It's a custom-built jar using > > > > > Kotlin, built via gradle. > > > > > > > > > > > > > > > > > > > > > > One thing that it could be is that > > > > > I'm using Kotlin objects (not classes), > > > > > e.g.: > > > > > > > > > > > > > > > > > > > > > > package test > > > > > > > > > > > object Test { fun f(): String = > > > > > "test" } > > > > > > > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > > > > > > > declare namespace Test = > > > > > "java:test.Test"; > > > > > > > > > > > > > > > > > > > > > > declare function test:f() as > > > > > xs:string { > > > > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > > > The build.gradle file is simple. It > > > > > looks something like this (removing > > > > > things like the junit configuration): > > > > > > > > > > > > > > > > > > > > > > ----- > > > > > > > > > > > buildscript { > > > > > > > > > > > ext.kotlin_version = "1.4.32" > > > > > > > > > > > ext.kotlin_stdlib = > > > > > "kotlin-stdlib" > > > > > > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > > > > > > > > > > > repositories { mavenCentral() } > > > > > > > > > > > dependencies { classpath > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" > > > > > } > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > > > > mavenCentral() > > > > > > > > > > > mavenLocal() > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > compileKotlin { kotlinOptions { > > > > > jvmTarget = java_version } } > > > > > > > > > > > compileTestKotlin { kotlinOptions { > > > > > jvmTarget = java_version } } > > > > > > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > > > > implementation > > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > > > > } > > > > > > > > > > > ----- > > > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > kotlin-stdlib-1.4.32.jar file in > > > > > addition to the test.jar file to BaseX's > > > > > lib directory. > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > wrote: > > > > > > > > > > >> > > > > > > > > > > >> Hi Reece, > > > > > > > > > > >> > > > > > > > > > > >> I?m sorry to hear that. Did you > > > > > build a custom JAR file, or do you > > > > > > > > > > >> encounter problems with the > > > > > JDK? > > > > > > > > > > >> > > > > > > > > > > >> Cheers, > > > > > > > > > > >> Christian > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> > > > > > > > > > > >> On Thu, Apr 29, 2021 at 9:48 PM > > > > > Reece Dunn <msclrhd at googlemail.com> > > > > > wrote: > > > > > > > > > > >> > > > > > > > > > > > >> > Hi Christian, > > > > > > > > > > >> > > > > > > > > > > > >> > Thanks for the response. > > > > > Unfortunately, I've not been able to get > > > > > the reloading working. > > > > > > > > > > >> > > > > > > > > > > > >> > Kind regards, > > > > > > > > > > >> > Reece > > > > > > > > > > >> > > > > > > > > > > > >> > On Wed, 21 Apr 2021 at > > > > > 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > > wrote: > > > > > > > > > > >> >> > > > > > > > > > > >> >> Hi Reece, > > > > > > > > > > >> >> > > > > > > > > > > >> >> If you install your > > > > > Java code as JAR file in the repository > > > > > [1], the > > > > > > > > > > >> >> code will be loaded > > > > > and unloaded every time when your query > > > > > is > > > > > > > > > > >> >> executed. If you get > > > > > an error message? > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > Unable to make field > > > > > > > > > > >> >> private final > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > >> >> > > > > > java.net.URLClassLoader.ucp accessible: > > > > > module java.base does not > > > > > > > > > > >> >> "opens java.net" > > > > > to unnamed module @79e2c065 > > > > > > > > > > >> >> > > > > > > > > > > >> >> ?unloading fails [2], > > > > > as you?re probably using a more recent > > > > > version > > > > > > > > > > >> >> of the JDK, which > > > > > restricts reflective access to internal > > > > > variables. > > > > > > > > > > >> >> You can get around > > > > > this by adding Java flags at startup > > > > > time: > > > > > > > > > > >> >> > > > > > > > > > > >> >> --add-opens > > > > > java.base/java.net=ALL-UNNAMED > > > > > > > > > > >> >> --add-opens > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > >> >> > > > > > > > > > > >> >> Maybe there are better > > > > > solutions to unload JAR files today. > > > > > > > > > > >> >> Suggestions are > > > > > welcome! > > > > > > > > > > >> >> > > > > > > > > > > >> >> Hope this helps, > > > > > > > > > > >> >> Christian > > > > > > > > > > >> >> > > > > > > > > > > >> >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > >> >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > > > >> >> > > > > > > > > > > >> >> On Tue, Apr 20, 2021 > > > > > at 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > > > wrote: > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > Hi all, > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > I'm working on a > > > > > Java class that I'm importing into an > > > > > XQuery, so I can do additional > > > > > processing on the data that isn't easily > > > > > expressible in XQuery (or XSLT). In > > > > > order to get BaseX to pick up a modified > > > > > version of the jar file I'm building, > > > > > I'm restarting the BaseX http server. > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > This makes it > > > > > slower to turn around testing the > > > > > changes. Is there a better way of doing > > > > > this? > > > > > > > > > > >> >> > > > > > > > > > > > >> >> > Kind regards, > > > > > > > > > > >> >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > Message: 9 > > > > > > > > > > Date: Fri, 30 Apr 2021 09:37:14 +0200 > > > > > > > > > > From: Marco Lettere <m.lettere at gmail.com> > > > > > > > > > > To: basex-talk at mailman.uni-konstanz.de > > > > > > > > > > Subject: Re: [basex-talk] Make use of > > > > > external Identity Management for > > > > > > > > > > BaseX > > > > > > > > > > Message-ID: <1a8d807b-9cb3-3cd4-f1b7-22aff5446154 at gmail.com> > > > > > > > > > > Content-Type: text/plain; charset=utf-8; > > > > > format=flowed > > > > > > > > > > > > > > > > > > > > Hi Christian and Rob, > > > > > > > > > > as the authors of the code you point to > > > > > we confirm that interacting with > > > > > > > > > > Keycloak in XQuery and in particular > > > > > RestXQ is rather comfortable. > > > > > > > > > > That example is mostly a demonstration > > > > > code for a tool that scrapes a > > > > > > > > > > site index and registers sites named > > > > > gateways as public clients (in > > > > > > > > > > Oauth2 sense) into a Keycloak instance. > > > > > > > > > > It is a proof of concept (as you can see > > > > > from the credentials? :-D) that > > > > > > > > > > has been used as a batch one-time > > > > > migration in a particular setting. > > > > > > > > > > > > > > > > > > > > We have also a RestXQ module that in > > > > > combination with basex:perm > > > > > > > > > > annotations protects access to a GUI > > > > > implementing the Oauth2 Code-grant > > > > > > > > > > flow. If Rob is interested we could > > > > > share. > > > > > > > > > > > > > > > > > > > > If there should be any plan of > > > > > integrating Oauth2/OIDC flows more > > > > > > > > > > tightly into BaseX we could also be > > > > > available for helping out. > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > Marco. > > > > > > > > > > > > > > > > > > > > On 30/04/21 08:47, Christian Gr?n wrote: > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > > > > > > > There is no prepackaged module for > > > > > Keycloak (at least I?m aware of > > > > > > > > > > > none), but you can write your own > > > > > code with XQuery. See [1] for an > > > > > > > > > > > example how this might look like. > > > > > > > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob > > > > > <private at tjalma.com> > > > > > wrote: > > > > > > > > > > >> Hi, > > > > > > > > > > >> > > > > > > > > > > >> I have a question. > > > > > > > > > > >> Can BaseX make use of an > > > > > Identity Management application like > > > > > Keycloak for Users? > > > > > > > > > > >> > > > > > > > > > > >> I can?t find anything about it > > > > > :) > > > > > > > > > > >> > > > > > > > > > > >> With kind regards, > > > > > > > > > > >> Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > End of BaseX-Talk Digest, Vol 136, Issue > > > > > 17 > > > > > > > > > > ******************************************* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
ML
Marco Lettere4 May 2021 09:53 #
Forgot to mention that for decoding the JWT we needed to hook up Java's internal B64 decoder because I don't remember why the one provided with basex was not able to handle that encoding.
Quoted text · Marco Lettere · 1844 lines
On 04/05/21 09:51, Marco Lettere wrote: > > Hi Rob and all, > > I attach here an example of an OIDC > code grant flow implemented with RestXQ, BaseX permission and > error handler. > > The file includes a sort of library > for performing the steps of the OIDC flow plus a minimal > application that is registered as public client inside keycloak > and which is what you should access from your browser by calling > http://localhost:8984/authtest > or http://localhost:8984/authtest/internal. > > > > I've put into it also the logout > procedure for performing the back-channel logout which closes > the SSO session. > > > > > > This is only a resume of a more > generic and complex module but it should be useful as a howto > and it should be as simple to install as copying the file to > your BaseX' webapp folder. Use it as you like. > > Regards, > > Marco. > > > > > > > > On 03/05/21 12:50, Rob wrote: > > > > > > > > Hi Marco, > > > > > > > > > > Got it! > > > > Looking forward to the code! :) > > > > > > > > > > > > With kind regards, > > > > Rob > > > > > > > > > > > Op 3 mei 2021, om 09:23 heeft Marco Lettere > > > <m.lettere at gmail.com> het > > > volgende geschreven: > > > > > > > > > > > > > > > > > > > > > Hi Rob, > > > > > > no the code in the > > > repository the link refers to is more like > > > administrative tooling for batch importing > > > configuration into Keycloak for administration > > > purposes. > > > > > > I'll work on creating an > > > excerpt of the code that realizes Oauth2 code grant > > > flow with RestXQ and Keycloak and I'll share by > > > tonight hopefully. > > > > > > Regards, > > > > > > Marco. > > > > > > > > > > > > > > > > > > > > > > > > On 01/05/21 17:49, Rob > > > wrote: > > > > > > > > > > > > > > > > > > > > Hi all! > > > > > > > > > > > > > > > > > > > > Sorry for the late response! > > > > > > > > I’m reading all the emails now, haha. > > > > > > > > > > > > > > > > > > > > > > > > I’m very happy to hear that it’s > > > > possible, I see you shared the following: > > > > > > > > https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > Thanks for sharing! > > > > > > > > > > > > > > > > > > > > > > > > Based on the following quote from > > > > Marco’s mail: > > > > > > > > "We have also a RestXQ module that > > > > in combination with basex:perm annotations > > > > protects access to a GUI implementing the Oauth2 > > > > Code-grant flow. If Rob is interested we could > > > > share.” > > > > > > > > > > > > > > > > > > > > > > > > > > > > The > > > > link above, is that the RESTXQ module Marco’s > > > > been talking about? > > > > > > > > Or > > > > is there another RESTXQ module? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > Rob > > > > > > > > > > > > > > > > > > > > > > > > > Op 1 mei 2021, om 05:29 heeft > > > > > Adam Law <adamjameslaw at gmail.com> > > > > > het volgende geschreven: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If Rob isn't interested, I > > > > > certain am... Yes please share > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >>We have also a > > > > > RestXQ module that in combination with > > > > > basex:perm > > > > > > > > > > annotations protects access to a GUI > > > > > implementing the Oauth2 Code-grant > > > > > > > > > > flow. If Rob is interested we could > > > > > share. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks for sharing https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This is a bit forward of me, > > > > > but would you consider changing the > > > > > license away from European Union Public > > > > > Licence which appears to be 'copyleft' > > > > > to say BSD 3-Clause, MIT, ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Adam > > > > > > > > > > > > > > > > > > > > > > > > > On > > > > > Fri, Apr 30, 2021 at 6:00 PM <basex-talk-request at mailman.uni-konstanz.de> > > > > > 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. Make use of external Identity > > > > > > Management for BaseX (Rob) > > > > > > > > > > > > 2. Re: Reloading jars on a running > > > > > > http server. (Reece Dunn) > > > > > > > > > > > > 3. Getting profile information in > > > > > > server responses. (Reece Dunn) > > > > > > > > > > > > 4. Re: Make use of external > > > > > > Identity Management for BaseX > > > > > > > > > > > > (Christian Gr?n) > > > > > > > > > > > > 5. Re: Reloading jars on a running > > > > > > http server. (Christian Gr?n) > > > > > > > > > > > > 6. Re: Getting profile information > > > > > > in server responses. > > > > > > > > > > > > (Christian Gr?n) > > > > > > > > > > > > 7. Re: Reloading jars on a running > > > > > > http server. (Reece Dunn) > > > > > > > > > > > > 8. Re: Reloading jars on a running > > > > > > http server. (Christian Gr?n) > > > > > > > > > > > > 9. Re: Make use of external > > > > > > Identity Management for BaseX > > > > > > > > > > > > (Marco Lettere) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > > > > > > > > > > > > > > > > > Message: 1 > > > > > > > > > > > > Date: Thu, 29 Apr 2021 15:54:08 +0200 > > > > > > > > > > > > From: Rob <private at tjalma.com> > > > > > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > Subject: [basex-talk] Make use of > > > > > > external Identity Management for > > > > > > > > > > > > BaseX > > > > > > > > > > > > Message-ID: <39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com> > > > > > > > > > > > > Content-Type: text/plain; > > > > > > charset=utf-8 > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > I have a question. > > > > > > > > > > > > Can BaseX make use of an Identity > > > > > > Management application like Keycloak > > > > > > for Users? > > > > > > > > > > > > > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > Message: 2 > > > > > > > > > > > > Date: Thu, 29 Apr 2021 20:48:09 +0100 > > > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > Subject: Re: [basex-talk] Reloading > > > > > > jars on a running http server. > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > <CAGdtn24Qdgbe3=nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com> > > > > > > > > > > > > Content-Type: text/plain; > > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the response. > > > > > > Unfortunately, I've not been able to > > > > > > get the > > > > > > > > > > > > reloading working. > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, > > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > If you install your Java code as > > > > > > JAR file in the repository [1], the > > > > > > > > > > > > > code will be loaded and unloaded > > > > > > every time when your query is > > > > > > > > > > > > > executed. If you get an error > > > > > > message? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > Unable to make field > > > > > > > > > > > > > private final > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > java.net.URLClassLoader.ucp > > > > > > accessible: module java.base does not > > > > > > > > > > > > > "opens java.net" > > > > > > to unnamed module @79e2c065 > > > > > > > > > > > > > > > > > > > > > > > > > > ?unloading fails [2], as you?re > > > > > > probably using a more recent version > > > > > > > > > > > > > of the JDK, which restricts > > > > > > reflective access to internal > > > > > > variables. > > > > > > > > > > > > > You can get around this by adding > > > > > > Java flags at startup time: > > > > > > > > > > > > > > > > > > > > > > > > > > --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > --add-opens > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > > > > > > > > > > > > > Maybe there are better solutions > > > > > > to unload JAR files today. > > > > > > > > > > > > > Suggestions are welcome! > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > [2] > > > > > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Apr 20, 2021 at 6:44 PM > > > > > > Reece Dunn <msclrhd at googlemail.com> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm working on a Java class > > > > > > that I'm importing into an XQuery, so > > > > > > I can > > > > > > > > > > > > > do additional processing on the > > > > > > data that isn't easily expressible in > > > > > > > > > > > > > XQuery (or XSLT). In order to get > > > > > > BaseX to pick up a modified version of > > > > > > > > > > > > > the jar file I'm building, I'm > > > > > > restarting the BaseX http server. > > > > > > > > > > > > > > > > > > > > > > > > > > > > This makes it slower to turn > > > > > > around testing the changes. Is there a > > > > > > > > > > > > > better way of doing this? > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part > > > > > > -------------- > > > > > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/fba079e2/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > Message: 3 > > > > > > > > > > > > Date: Thu, 29 Apr 2021 20:50:40 +0100 > > > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > Subject: [basex-talk] Getting profile > > > > > > information in server responses. > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > <CAGdtn26mnN7Bu3bqUN8pkS1da4eq2tQstFOnx5nqqEvZPnHdkA at mail.gmail.com> > > > > > > > > > > > > Content-Type: text/plain; > > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > In BaseX, is there a way to get the > > > > > > profile timings (compile, run, print, > > > > > > > > > > > > etc.) in the response of a HTTP > > > > > > request via the Server-Timing header ( > > > > > > > > > > > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > Reece > > > > > > > > > > > > -------------- next part > > > > > > -------------- > > > > > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/12a4d4fa/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > Message: 4 > > > > > > > > > > > > Date: Fri, 30 Apr 2021 08:47:36 +0200 > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > To: Rob <private at tjalma.com> > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > Subject: Re: [basex-talk] Make use of > > > > > > external Identity Management for > > > > > > > > > > > > BaseX > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > <CAP94bnP_-nFY6BQv38gqQdy9aoFn_gtRzgM1rW+GB7yjr=xTrA at mail.gmail.com> > > > > > > > > > > > > Content-Type: text/plain; > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > > > > > > > > > There is no prepackaged module for > > > > > > Keycloak (at least I?m aware of > > > > > > > > > > > > none), but you can write your own code > > > > > > with XQuery. See [1] for an > > > > > > > > > > > > example how this might look like. > > > > > > > > > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob > > > > > > <private at tjalma.com> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > > > I have a question. > > > > > > > > > > > > > Can BaseX make use of an Identity > > > > > > Management application like Keycloak > > > > > > for Users? > > > > > > > > > > > > > > > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > Message: 5 > > > > > > > > > > > > Date: Fri, 30 Apr 2021 08:48:36 +0200 > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > Subject: Re: [basex-talk] Reloading > > > > > > jars on a running http server. > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > <CAP94bnNs_gmotGxEa2Mp-fcJzQxiO3HdzLfcG0_KknotrZ6APQ at mail.gmail.com> > > > > > > > > > > > > Content-Type: text/plain; > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > I?m sorry to hear that. Did you build > > > > > > a custom JAR file, or do you > > > > > > > > > > > > encounter problems with the JDK? > > > > > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM Reece > > > > > > Dunn <msclrhd at googlemail.com> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the response. > > > > > > Unfortunately, I've not been able to > > > > > > get the reloading working. > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, > > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > wrote: > > > > > > > > > > > > >> > > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > > >> > > > > > > > > > > > > >> If you install your Java code > > > > > > as JAR file in the repository [1], the > > > > > > > > > > > > >> code will be loaded and > > > > > > unloaded every time when your query is > > > > > > > > > > > > >> executed. If you get an error > > > > > > message? > > > > > > > > > > > > >> > > > > > > > > > > > > >> > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > Unable to make field > > > > > > > > > > > > >> private final > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > >> java.net.URLClassLoader.ucp > > > > > > accessible: module java.base does not > > > > > > > > > > > > >> "opens java.net" > > > > > > to unnamed module @79e2c065 > > > > > > > > > > > > >> > > > > > > > > > > > > >> ?unloading fails [2], as > > > > > > you?re probably using a more recent > > > > > > version > > > > > > > > > > > > >> of the JDK, which restricts > > > > > > reflective access to internal > > > > > > variables. > > > > > > > > > > > > >> You can get around this by > > > > > > adding Java flags at startup time: > > > > > > > > > > > > >> > > > > > > > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > >> --add-opens > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > >> > > > > > > > > > > > > >> Maybe there are better > > > > > > solutions to unload JAR files today. > > > > > > > > > > > > >> Suggestions are welcome! > > > > > > > > > > > > >> > > > > > > > > > > > > >> Hope this helps, > > > > > > > > > > > > >> Christian > > > > > > > > > > > > >> > > > > > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > >> > > > > > > > > > > > > >> > > > > > > > > > > > > >> > > > > > > > > > > > > >> On Tue, Apr 20, 2021 at 6:44 > > > > > > PM Reece Dunn <msclrhd at googlemail.com> > > > > > > wrote: > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > Hi all, > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > I'm working on a Java > > > > > > class that I'm importing into an > > > > > > XQuery, so I can do additional > > > > > > processing on the data that isn't > > > > > > easily expressible in XQuery (or > > > > > > XSLT). In order to get BaseX to pick > > > > > > up a modified version of the jar file > > > > > > I'm building, I'm restarting the BaseX > > > > > > http server. > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > This makes it slower to > > > > > > turn around testing the changes. Is > > > > > > there a better way of doing this? > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > Kind regards, > > > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > Message: 6 > > > > > > > > > > > > Date: Fri, 30 Apr 2021 08:55:49 +0200 > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > Subject: Re: [basex-talk] Getting > > > > > > profile information in server > > > > > > > > > > > > responses. > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > <CAP94bnMCyZqRYvMEJG7EkON+FjNS0fsGWwx-_2EQrzzYPV-hZQ at mail.gmail.com> > > > > > > > > > > > > Content-Type: text/plain; > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > A good idea; I?ll think of ways to get > > > > > > this included. One challenge > > > > > > > > > > > > might be that the response is streamed > > > > > > to the client. This means that > > > > > > > > > > > > when creating the HTTP request > > > > > > headers, it will not be known yet how > > > > > > > > > > > > long the evaluation will take (and the > > > > > > time for evaluation may also > > > > > > > > > > > > depend on the connection speed). The > > > > > > time for parsing and compiling > > > > > > > > > > > > the query should be known at that > > > > > > time, though. ? Maybe we could > > > > > > > > > > > > suppress result streaming when timings > > > > > > are requested. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:50 PM Reece > > > > > > Dunn <msclrhd at googlemail.com> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > > > In BaseX, is there a way to get > > > > > > the profile timings (compile, run, > > > > > > print, etc.) in the response of a HTTP > > > > > > request via the Server-Timing header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > Message: 7 > > > > > > > > > > > > Date: Fri, 30 Apr 2021 08:14:21 +0100 > > > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > Subject: Re: [basex-talk] Reloading > > > > > > jars on a running http server. > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > <CAGdtn25JU3aGsHZepExgDigQX7asNDOF=2C6PWJcz1kgQqZEfA at mail.gmail.com> > > > > > > > > > > > > Content-Type: text/plain; > > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > I'm not seeing any exceptions in the > > > > > > console window, even when enabling the > > > > > > > > > > > > debug setting. I'm using the > > > > > > AdoptOpenJDK 1.8. I also have > > > > > > AdoptOpenJDK 11, > > > > > > > > > > > > but I assume that will have the issue > > > > > > you described. > > > > > > > > > > > > > > > > > > > > > > > > It's a custom-built jar using Kotlin, > > > > > > built via gradle. > > > > > > > > > > > > > > > > > > > > > > > > One thing that it could be is that I'm > > > > > > using Kotlin objects (not classes), > > > > > > > > > > > > e.g.: > > > > > > > > > > > > > > > > > > > > > > > > package test > > > > > > > > > > > > object Test { fun f(): String = > > > > > > "test" } > > > > > > > > > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > > > > > > > > > declare namespace Test = > > > > > > "java:test.Test"; > > > > > > > > > > > > > > > > > > > > > > > > declare function test:f() as > > > > > > xs:string { > > > > > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > > > > > The build.gradle file is simple. It > > > > > > looks something like this (removing > > > > > > > > > > > > things like the junit configuration): > > > > > > > > > > > > > > > > > > > > > > > > ----- > > > > > > > > > > > > buildscript { > > > > > > > > > > > > ext.kotlin_version = "1.4.32" > > > > > > > > > > > > ext.kotlin_stdlib = > > > > > > "kotlin-stdlib" > > > > > > > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > > > > > > > > > > > > > repositories { mavenCentral() } > > > > > > > > > > > > dependencies { classpath > > > > > > > > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > > > > > mavenCentral() > > > > > > > > > > > > mavenLocal() > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > compileKotlin { kotlinOptions { > > > > > > jvmTarget = java_version } } > > > > > > > > > > > > compileTestKotlin { kotlinOptions { > > > > > > jvmTarget = java_version } } > > > > > > > > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > > > > > implementation > > > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > > > > > } > > > > > > > > > > > > ----- > > > > > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > > kotlin-stdlib-1.4.32.jar file in > > > > > > addition to the > > > > > > > > > > > > test.jar file to BaseX's lib > > > > > > directory. > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, > > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > I?m sorry to hear that. Did you > > > > > > build a custom JAR file, or do you > > > > > > > > > > > > > encounter problems with the JDK? > > > > > > > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM > > > > > > Reece Dunn <msclrhd at googlemail.com> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the response. > > > > > > Unfortunately, I've not been able to > > > > > > get the > > > > > > > > > > > > > reloading working. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at > > > > > > 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> If you install your Java > > > > > > code as JAR file in the repository > > > > > > [1], the > > > > > > > > > > > > > >> code will be loaded and > > > > > > unloaded every time when your query is > > > > > > > > > > > > > >> executed. If you get an > > > > > > error message? > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > Unable to make field > > > > > > > > > > > > > >> private final > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > >> > > > > > > java.net.URLClassLoader.ucp > > > > > > accessible: module java.base does not > > > > > > > > > > > > > >> "opens java.net" > > > > > > to unnamed module @79e2c065 > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> ?unloading fails [2], as > > > > > > you?re probably using a more recent > > > > > > version > > > > > > > > > > > > > >> of the JDK, which > > > > > > restricts reflective access to > > > > > > internal variables. > > > > > > > > > > > > > >> You can get around this > > > > > > by adding Java flags at startup time: > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > >> --add-opens > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> Maybe there are better > > > > > > solutions to unload JAR files today. > > > > > > > > > > > > > >> Suggestions are welcome! > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> Hope this helps, > > > > > > > > > > > > > >> Christian > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > >> [2] > > > > > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > > > > > > > > > > > > > >> On Tue, Apr 20, 2021 at > > > > > > 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> > Hi all, > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> > I'm working on a > > > > > > Java class that I'm importing into an > > > > > > XQuery, so I > > > > > > > > > > > > > can do additional processing on > > > > > > the data that isn't easily expressible > > > > > > in > > > > > > > > > > > > > XQuery (or XSLT). In order to get > > > > > > BaseX to pick up a modified version of > > > > > > > > > > > > > the jar file I'm building, I'm > > > > > > restarting the BaseX http server. > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> > This makes it > > > > > > slower to turn around testing the > > > > > > changes. Is there a > > > > > > > > > > > > > better way of doing this? > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> > Kind regards, > > > > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part > > > > > > -------------- > > > > > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210430/1b9943e9/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > Message: 8 > > > > > > > > > > > > Date: Fri, 30 Apr 2021 09:30:17 +0200 > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > Subject: Re: [basex-talk] Reloading > > > > > > jars on a running http server. > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > <CAP94bnN5QnMVBoaNzAL8WOuUo7N8MDYbM4+z=3fTqdn_eUVyZg at mail.gmail.com> > > > > > > > > > > > > Content-Type: text/plain; > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > > kotlin-stdlib-1.4.32.jar file in > > > > > > addition to the test.jar file to > > > > > > BaseX's lib directory. > > > > > > > > > > > > > > > > > > > > > > > > Please note that JAR libraries will > > > > > > only be unregistered after query > > > > > > > > > > > > evalution if they are moved into the > > > > > > repo directory. If a library is > > > > > > > > > > > > copied into the lib directory, it will > > > > > > be added to the static > > > > > > > > > > > > classpath. > > > > > > > > > > > > > > > > > > > > > > > > In the given case, you could probably > > > > > > keep kotlin-stdlib-1.4.32.jar in > > > > > > > > > > > > the lib directory, but you?ll need to > > > > > > keep your development code in > > > > > > > > > > > > the repository (as described in the > > > > > > Wiki). It?s no problem, though, to > > > > > > > > > > > > directly modify the repo code (you > > > > > > don?t have to use REPO INSTALL or > > > > > > > > > > > > repo:install for that). > > > > > > > > > > > > > > > > > > > > > > > > If the problem persists, feel free to > > > > > > send me a little test.jar, I can > > > > > > > > > > > > then do further testing. > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Apr 30, 2021 at 9:14 AM Reece > > > > > > Dunn <msclrhd at googlemail.com> > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > I'm not seeing any exceptions in > > > > > > the console window, even when enabling > > > > > > the debug setting. I'm using the > > > > > > AdoptOpenJDK 1.8. I also have > > > > > > AdoptOpenJDK 11, but I assume that > > > > > > will have the issue you described. > > > > > > > > > > > > > > > > > > > > > > > > > > It's a custom-built jar using > > > > > > Kotlin, built via gradle. > > > > > > > > > > > > > > > > > > > > > > > > > > One thing that it could be is > > > > > > that I'm using Kotlin objects (not > > > > > > classes), e.g.: > > > > > > > > > > > > > > > > > > > > > > > > > > package test > > > > > > > > > > > > > object Test { fun f(): String > > > > > > = "test" } > > > > > > > > > > > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > > > > > > > > > > > declare namespace Test = > > > > > > "java:test.Test"; > > > > > > > > > > > > > > > > > > > > > > > > > > declare function test:f() as > > > > > > xs:string { > > > > > > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > > > > > > > The build.gradle file is simple. > > > > > > It looks something like this (removing > > > > > > things like the junit configuration): > > > > > > > > > > > > > > > > > > > > > > > > > > ----- > > > > > > > > > > > > > buildscript { > > > > > > > > > > > > > ext.kotlin_version = "1.4.32" > > > > > > > > > > > > > ext.kotlin_stdlib = > > > > > > "kotlin-stdlib" > > > > > > > > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { mavenCentral() > > > > > > } > > > > > > > > > > > > > dependencies { classpath > > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" > > > > > > } > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > > > > > > mavenCentral() > > > > > > > > > > > > > mavenLocal() > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > compileKotlin { kotlinOptions { > > > > > > jvmTarget = java_version } } > > > > > > > > > > > > > compileTestKotlin { kotlinOptions > > > > > > { jvmTarget = java_version } } > > > > > > > > > > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > > > > > > implementation > > > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > > > > > > } > > > > > > > > > > > > > ----- > > > > > > > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > > kotlin-stdlib-1.4.32.jar file in > > > > > > addition to the test.jar file to > > > > > > BaseX's lib directory. > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, > > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > wrote: > > > > > > > > > > > > >> > > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > > >> > > > > > > > > > > > > >> I?m sorry to hear that. Did > > > > > > you build a custom JAR file, or do you > > > > > > > > > > > > >> encounter problems with the > > > > > > JDK? > > > > > > > > > > > > >> > > > > > > > > > > > > >> Cheers, > > > > > > > > > > > > >> Christian > > > > > > > > > > > > >> > > > > > > > > > > > > >> > > > > > > > > > > > > >> > > > > > > > > > > > > >> On Thu, Apr 29, 2021 at 9:48 > > > > > > PM Reece Dunn <msclrhd at googlemail.com> > > > > > > wrote: > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > Hi Christian, > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > Thanks for the response. > > > > > > Unfortunately, I've not been able to > > > > > > get the reloading working. > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > Kind regards, > > > > > > > > > > > > >> > Reece > > > > > > > > > > > > >> > > > > > > > > > > > > > >> > On Wed, 21 Apr 2021 at > > > > > > 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > > > wrote: > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> Hi Reece, > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> If you install your > > > > > > Java code as JAR file in the > > > > > > repository [1], the > > > > > > > > > > > > >> >> code will be loaded > > > > > > and unloaded every time when your > > > > > > query is > > > > > > > > > > > > >> >> executed. If you get > > > > > > an error message? > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > Unable to make field > > > > > > > > > > > > >> >> private final > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > >> >> > > > > > > java.net.URLClassLoader.ucp > > > > > > accessible: module java.base does not > > > > > > > > > > > > >> >> "opens java.net" > > > > > > to unnamed module @79e2c065 > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> ?unloading fails > > > > > > [2], as you?re probably using a more > > > > > > recent version > > > > > > > > > > > > >> >> of the JDK, which > > > > > > restricts reflective access to > > > > > > internal variables. > > > > > > > > > > > > >> >> You can get around > > > > > > this by adding Java flags at startup > > > > > > time: > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> --add-opens > > > > > > java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > >> >> --add-opens > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> Maybe there are > > > > > > better solutions to unload JAR files > > > > > > today. > > > > > > > > > > > > >> >> Suggestions are > > > > > > welcome! > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> Hope this helps, > > > > > > > > > > > > >> >> Christian > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > >> >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> > > > > > > > > > > > > >> >> On Tue, Apr 20, 2021 > > > > > > at 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > > > > wrote: > > > > > > > > > > > > >> >> > > > > > > > > > > > > > >> >> > Hi all, > > > > > > > > > > > > >> >> > > > > > > > > > > > > > >> >> > I'm working on > > > > > > a Java class that I'm importing into > > > > > > an XQuery, so I can do additional > > > > > > processing on the data that isn't > > > > > > easily expressible in XQuery (or > > > > > > XSLT). In order to get BaseX to pick > > > > > > up a modified version of the jar file > > > > > > I'm building, I'm restarting the BaseX > > > > > > http server. > > > > > > > > > > > > >> >> > > > > > > > > > > > > > >> >> > This makes it > > > > > > slower to turn around testing the > > > > > > changes. Is there a better way of > > > > > > doing this? > > > > > > > > > > > > >> >> > > > > > > > > > > > > > >> >> > Kind regards, > > > > > > > > > > > > >> >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > Message: 9 > > > > > > > > > > > > Date: Fri, 30 Apr 2021 09:37:14 +0200 > > > > > > > > > > > > From: Marco Lettere <m.lettere at gmail.com> > > > > > > > > > > > > To: basex-talk at mailman.uni-konstanz.de > > > > > > > > > > > > Subject: Re: [basex-talk] Make use of > > > > > > external Identity Management for > > > > > > > > > > > > BaseX > > > > > > > > > > > > Message-ID: <1a8d807b-9cb3-3cd4-f1b7-22aff5446154 at gmail.com> > > > > > > > > > > > > Content-Type: text/plain; > > > > > > charset=utf-8; format=flowed > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian and Rob, > > > > > > > > > > > > as the authors of the code you point > > > > > > to we confirm that interacting with > > > > > > > > > > > > Keycloak in XQuery and in particular > > > > > > RestXQ is rather comfortable. > > > > > > > > > > > > That example is mostly a demonstration > > > > > > code for a tool that scrapes a > > > > > > > > > > > > site index and registers sites named > > > > > > gateways as public clients (in > > > > > > > > > > > > Oauth2 sense) into a Keycloak > > > > > > instance. > > > > > > > > > > > > It is a proof of concept (as you can > > > > > > see from the credentials? :-D) that > > > > > > > > > > > > has been used as a batch one-time > > > > > > migration in a particular setting. > > > > > > > > > > > > > > > > > > > > > > > > We have also a RestXQ module that in > > > > > > combination with basex:perm > > > > > > > > > > > > annotations protects access to a GUI > > > > > > implementing the Oauth2 Code-grant > > > > > > > > > > > > flow. If Rob is interested we could > > > > > > share. > > > > > > > > > > > > > > > > > > > > > > > > If there should be any plan of > > > > > > integrating Oauth2/OIDC flows more > > > > > > > > > > > > tightly into BaseX we could also be > > > > > > available for helping out. > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > Marco. > > > > > > > > > > > > > > > > > > > > > > > > On 30/04/21 08:47, Christian Gr?n > > > > > > wrote: > > > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > > > > > > > > > > > There is no prepackaged module > > > > > > for Keycloak (at least I?m aware of > > > > > > > > > > > > > none), but you can write your own > > > > > > code with XQuery. See [1] for an > > > > > > > > > > > > > example how this might look like. > > > > > > > > > > > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM > > > > > > Rob <private at tjalma.com> > > > > > > wrote: > > > > > > > > > > > > >> Hi, > > > > > > > > > > > > >> > > > > > > > > > > > > >> I have a question. > > > > > > > > > > > > >> Can BaseX make use of an > > > > > > Identity Management application like > > > > > > Keycloak for Users? > > > > > > > > > > > > >> > > > > > > > > > > > > >> I can?t find anything about > > > > > > it :) > > > > > > > > > > > > >> > > > > > > > > > > > > >> With kind regards, > > > > > > > > > > > > >> Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > End of BaseX-Talk Digest, Vol 136, > > > > > > Issue 17 > > > > > > > > > > > > ******************************************* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
R
Rob4 May 2021 11:08 #
Thanks Marco! The example is not copyrighted? :) Kind regards, Rob
Quoted text · Marco Lettere · 1869 lines
> Op 4 mei 2021, om 09:53 heeft Marco Lettere <m.lettere at gmail.com> het volgende geschreven: > > > > > > > Forgot to mention that for decoding the > JWT we needed to hook up Java's internal B64 decoder because I > don't remember why the one provided with basex was not able to > handle that encoding. > > > > > > > > On 04/05/21 09:51, Marco Lettere wrote: > > > > > > > > Hi Rob and all, > > > > I attach here an example of an OIDC > > code grant flow implemented with RestXQ, BaseX permission and > > error handler. > > > > The file includes a sort of library > > for performing the steps of the OIDC flow plus a minimal > > application that is registered as public client inside keycloak > > and which is what you should access from your browser by calling > > http://localhost:8984/authtest > > or http://localhost:8984/authtest/internal. > > > > > > > > I've put into it also the logout > > procedure for performing the back-channel logout which closes > > the SSO session. > > > > > > > > > > > > This is only a resume of a more > > generic and complex module but it should be useful as a howto > > and it should be as simple to install as copying the file to > > your BaseX' webapp folder. Use it as you like. > > > > Regards, > > > > Marco. > > > > > > > > > > > > > > > > On 03/05/21 12:50, Rob wrote: > > > > > > > > > > > > > > Hi Marco, > > > > > > > > > > > > > > > Got it! > > > > > > Looking forward to the code! :) > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > Rob > > > > > > > > > > > > > > > > Op 3 mei 2021, om 09:23 heeft Marco Lettere > > > > <m.lettere at gmail.com> het > > > > volgende geschreven: > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Rob, > > > > > > > > no the code in the > > > > repository the link refers to is more like > > > > administrative tooling for batch importing > > > > configuration into Keycloak for administration > > > > purposes. > > > > > > > > I'll work on creating an > > > > excerpt of the code that realizes Oauth2 code grant > > > > flow with RestXQ and Keycloak and I'll share by > > > > tonight hopefully. > > > > > > > > Regards, > > > > > > > > Marco. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 01/05/21 17:49, Rob > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all! > > > > > > > > > > > > > > > > > > > > > > > > > Sorry for the late response! > > > > > > > > > > I’m reading all the emails now, haha. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I’m very happy to hear that it’s > > > > > possible, I see you shared the following: > > > > > > > > > > https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for sharing! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Based on the following quote from > > > > > Marco’s mail: > > > > > > > > > > "We have also a RestXQ module that > > > > > in combination with basex:perm annotations > > > > > protects access to a GUI implementing the Oauth2 > > > > > Code-grant flow. If Rob is interested we could > > > > > share.” > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The > > > > > link above, is that the RESTXQ module Marco’s > > > > > been talking about? > > > > > > > > > > Or > > > > > is there another RESTXQ module? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > Rob > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Op 1 mei 2021, om 05:29 heeft > > > > > > Adam Law <adamjameslaw at gmail.com> > > > > > > het volgende geschreven: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If Rob isn't interested, I > > > > > > certain am... Yes please share > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >>We have also a > > > > > > RestXQ module that in combination with > > > > > > basex:perm > > > > > > > > > > > > annotations protects access to a GUI > > > > > > implementing the Oauth2 Code-grant > > > > > > > > > > > > flow. If Rob is interested we could > > > > > > share. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks for sharing https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This is a bit forward of me, > > > > > > but would you consider changing the > > > > > > license away from European Union Public > > > > > > Licence which appears to be 'copyleft' > > > > > > to say BSD 3-Clause, MIT, ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Adam > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On > > > > > > Fri, Apr 30, 2021 at 6:00 PM <basex-talk-request at mailman.uni-konstanz.de> > > > > > > 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. Make use of external Identity > > > > > > > Management for BaseX (Rob) > > > > > > > > > > > > > > 2. Re: Reloading jars on a running > > > > > > > http server. (Reece Dunn) > > > > > > > > > > > > > > 3. Getting profile information in > > > > > > > server responses. (Reece Dunn) > > > > > > > > > > > > > > 4. Re: Make use of external > > > > > > > Identity Management for BaseX > > > > > > > > > > > > > > (Christian Gr?n) > > > > > > > > > > > > > > 5. Re: Reloading jars on a running > > > > > > > http server. (Christian Gr?n) > > > > > > > > > > > > > > 6. Re: Getting profile information > > > > > > > in server responses. > > > > > > > > > > > > > > (Christian Gr?n) > > > > > > > > > > > > > > 7. Re: Reloading jars on a running > > > > > > > http server. (Reece Dunn) > > > > > > > > > > > > > > 8. Re: Reloading jars on a running > > > > > > > http server. (Christian Gr?n) > > > > > > > > > > > > > > 9. Re: Make use of external > > > > > > > Identity Management for BaseX > > > > > > > > > > > > > > (Marco Lettere) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 1 > > > > > > > > > > > > > > Date: Thu, 29 Apr 2021 15:54:08 +0200 > > > > > > > > > > > > > > From: Rob <private at tjalma.com> > > > > > > > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > Subject: [basex-talk] Make use of > > > > > > > external Identity Management for > > > > > > > > > > > > > > BaseX > > > > > > > > > > > > > > Message-ID: <39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com> > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > charset=utf-8 > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > > > > > I have a question. > > > > > > > > > > > > > > Can BaseX make use of an Identity > > > > > > > Management application like Keycloak > > > > > > > for Users? > > > > > > > > > > > > > > > > > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 2 > > > > > > > > > > > > > > Date: Thu, 29 Apr 2021 20:48:09 +0100 > > > > > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > Subject: Re: [basex-talk] Reloading > > > > > > > jars on a running http server. > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > <CAGdtn24Qdgbe3=nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com> > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the response. > > > > > > > Unfortunately, I've not been able to > > > > > > > get the > > > > > > > > > > > > > > reloading working. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, > > > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If you install your Java code as > > > > > > > JAR file in the repository [1], the > > > > > > > > > > > > > > > code will be loaded and unloaded > > > > > > > every time when your query is > > > > > > > > > > > > > > > executed. If you get an error > > > > > > > message? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > > Unable to make field > > > > > > > > > > > > > > > private final > > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > > > java.net.URLClassLoader.ucp > > > > > > > accessible: module java.base does not > > > > > > > > > > > > > > > "opens java.net" > > > > > > > to unnamed module @79e2c065 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ?unloading fails [2], as you?re > > > > > > > probably using a more recent version > > > > > > > > > > > > > > > of the JDK, which restricts > > > > > > > reflective access to internal > > > > > > > variables. > > > > > > > > > > > > > > > You can get around this by adding > > > > > > > Java flags at startup time: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > > > --add-opens > > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Maybe there are better solutions > > > > > > > to unload JAR files today. > > > > > > > > > > > > > > > Suggestions are welcome! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > > > [2] > > > > > > > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Apr 20, 2021 at 6:44 PM > > > > > > > Reece Dunn <msclrhd at googlemail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm working on a Java class > > > > > > > that I'm importing into an XQuery, so > > > > > > > I can > > > > > > > > > > > > > > > do additional processing on the > > > > > > > data that isn't easily expressible in > > > > > > > > > > > > > > > XQuery (or XSLT). In order to get > > > > > > > BaseX to pick up a modified version of > > > > > > > > > > > > > > > the jar file I'm building, I'm > > > > > > > restarting the BaseX http server. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This makes it slower to turn > > > > > > > around testing the changes. Is there a > > > > > > > > > > > > > > > better way of doing this? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part > > > > > > > -------------- > > > > > > > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/fba079e2/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 3 > > > > > > > > > > > > > > Date: Thu, 29 Apr 2021 20:50:40 +0100 > > > > > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > Subject: [basex-talk] Getting profile > > > > > > > information in server responses. > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > <CAGdtn26mnN7Bu3bqUN8pkS1da4eq2tQstFOnx5nqqEvZPnHdkA at mail.gmail.com> > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > > > > > In BaseX, is there a way to get the > > > > > > > profile timings (compile, run, print, > > > > > > > > > > > > > > etc.) in the response of a HTTP > > > > > > > request via the Server-Timing header ( > > > > > > > > > > > > > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > -------------- next part > > > > > > > -------------- > > > > > > > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/12a4d4fa/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 4 > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 08:47:36 +0200 > > > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > To: Rob <private at tjalma.com> > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > Subject: Re: [basex-talk] Make use of > > > > > > > external Identity Management for > > > > > > > > > > > > > > BaseX > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > > > > <CAP94bnP_-nFY6BQv38gqQdy9aoFn_gtRzgM1rW+GB7yjr=xTrA at mail.gmail.com> > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > > > > > > > > > > > > > There is no prepackaged module for > > > > > > > Keycloak (at least I?m aware of > > > > > > > > > > > > > > none), but you can write your own code > > > > > > > with XQuery. See [1] for an > > > > > > > > > > > > > > example how this might look like. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM Rob > > > > > > > <private at tjalma.com> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I have a question. > > > > > > > > > > > > > > > Can BaseX make use of an Identity > > > > > > > Management application like Keycloak > > > > > > > for Users? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I can?t find anything about it :) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 5 > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 08:48:36 +0200 > > > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > Subject: Re: [basex-talk] Reloading > > > > > > > jars on a running http server. > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > <CAP94bnNs_gmotGxEa2Mp-fcJzQxiO3HdzLfcG0_KknotrZ6APQ at mail.gmail.com> > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > > > I?m sorry to hear that. Did you build > > > > > > > a custom JAR file, or do you > > > > > > > > > > > > > > encounter problems with the JDK? > > > > > > > > > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM Reece > > > > > > > Dunn <msclrhd at googlemail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the response. > > > > > > > Unfortunately, I've not been able to > > > > > > > get the reloading working. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at 18:49, > > > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> If you install your Java code > > > > > > > as JAR file in the repository [1], the > > > > > > > > > > > > > > >> code will be loaded and > > > > > > > unloaded every time when your query is > > > > > > > > > > > > > > >> executed. If you get an error > > > > > > > message? > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > > Unable to make field > > > > > > > > > > > > > > >> private final > > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > > >> java.net.URLClassLoader.ucp > > > > > > > accessible: module java.base does not > > > > > > > > > > > > > > >> "opens java.net" > > > > > > > to unnamed module @79e2c065 > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> ?unloading fails [2], as > > > > > > > you?re probably using a more recent > > > > > > > version > > > > > > > > > > > > > > >> of the JDK, which restricts > > > > > > > reflective access to internal > > > > > > > variables. > > > > > > > > > > > > > > >> You can get around this by > > > > > > > adding Java flags at startup time: > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > > >> --add-opens > > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> Maybe there are better > > > > > > > solutions to unload JAR files today. > > > > > > > > > > > > > > >> Suggestions are welcome! > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> Hope this helps, > > > > > > > > > > > > > > >> Christian > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > > >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> On Tue, Apr 20, 2021 at 6:44 > > > > > > > PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > wrote: > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > Hi all, > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > I'm working on a Java > > > > > > > class that I'm importing into an > > > > > > > XQuery, so I can do additional > > > > > > > processing on the data that isn't > > > > > > > easily expressible in XQuery (or > > > > > > > XSLT). In order to get BaseX to pick > > > > > > > up a modified version of the jar file > > > > > > > I'm building, I'm restarting the BaseX > > > > > > > http server. > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > This makes it slower to > > > > > > > turn around testing the changes. Is > > > > > > > there a better way of doing this? > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > Kind regards, > > > > > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 6 > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 08:55:49 +0200 > > > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > Subject: Re: [basex-talk] Getting > > > > > > > profile information in server > > > > > > > > > > > > > > responses. > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > <CAP94bnMCyZqRYvMEJG7EkON+FjNS0fsGWwx-_2EQrzzYPV-hZQ at mail.gmail.com> > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > A good idea; I?ll think of ways to get > > > > > > > this included. One challenge > > > > > > > > > > > > > > might be that the response is streamed > > > > > > > to the client. This means that > > > > > > > > > > > > > > when creating the HTTP request > > > > > > > headers, it will not be known yet how > > > > > > > > > > > > > > long the evaluation will take (and the > > > > > > > time for evaluation may also > > > > > > > > > > > > > > depend on the connection speed). The > > > > > > > time for parsing and compiling > > > > > > > > > > > > > > the query should be known at that > > > > > > > time, though. ? Maybe we could > > > > > > > > > > > > > > suppress result streaming when timings > > > > > > > are requested. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:50 PM Reece > > > > > > > Dunn <msclrhd at googlemail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > In BaseX, is there a way to get > > > > > > > the profile timings (compile, run, > > > > > > > print, etc.) in the response of a HTTP > > > > > > > request via the Server-Timing header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 7 > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 08:14:21 +0100 > > > > > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > Subject: Re: [basex-talk] Reloading > > > > > > > jars on a running http server. > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > > > > <CAGdtn25JU3aGsHZepExgDigQX7asNDOF=2C6PWJcz1kgQqZEfA at mail.gmail.com> > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm not seeing any exceptions in the > > > > > > > console window, even when enabling the > > > > > > > > > > > > > > debug setting. I'm using the > > > > > > > AdoptOpenJDK 1.8. I also have > > > > > > > AdoptOpenJDK 11, > > > > > > > > > > > > > > but I assume that will have the issue > > > > > > > you described. > > > > > > > > > > > > > > > > > > > > > > > > > > > > It's a custom-built jar using Kotlin, > > > > > > > built via gradle. > > > > > > > > > > > > > > > > > > > > > > > > > > > > One thing that it could be is that I'm > > > > > > > using Kotlin objects (not classes), > > > > > > > > > > > > > > e.g.: > > > > > > > > > > > > > > > > > > > > > > > > > > > > package test > > > > > > > > > > > > > > object Test { fun f(): String = > > > > > > > "test" } > > > > > > > > > > > > > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > > > > > > > > > > > > > declare namespace Test = > > > > > > > "java:test.Test"; > > > > > > > > > > > > > > > > > > > > > > > > > > > > declare function test:f() as > > > > > > > xs:string { > > > > > > > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > > > > > > > > > The build.gradle file is simple. It > > > > > > > looks something like this (removing > > > > > > > > > > > > > > things like the junit configuration): > > > > > > > > > > > > > > > > > > > > > > > > > > > > ----- > > > > > > > > > > > > > > buildscript { > > > > > > > > > > > > > > ext.kotlin_version = "1.4.32" > > > > > > > > > > > > > > ext.kotlin_stdlib = > > > > > > > "kotlin-stdlib" > > > > > > > > > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { mavenCentral() } > > > > > > > > > > > > > > dependencies { classpath > > > > > > > > > > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > > > > > > > mavenCentral() > > > > > > > > > > > > > > mavenLocal() > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > compileKotlin { kotlinOptions { > > > > > > > jvmTarget = java_version } } > > > > > > > > > > > > > > compileTestKotlin { kotlinOptions { > > > > > > > jvmTarget = java_version } } > > > > > > > > > > > > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > > > > > > > implementation > > > > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > > > > > > > } > > > > > > > > > > > > > > ----- > > > > > > > > > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > > > kotlin-stdlib-1.4.32.jar file in > > > > > > > addition to the > > > > > > > > > > > > > > test.jar file to BaseX's lib > > > > > > > directory. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, > > > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I?m sorry to hear that. Did you > > > > > > > build a custom JAR file, or do you > > > > > > > > > > > > > > > encounter problems with the JDK? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 9:48 PM > > > > > > > Reece Dunn <msclrhd at googlemail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the response. > > > > > > > Unfortunately, I've not been able to > > > > > > > get the > > > > > > > > > > > > > > > reloading working. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at > > > > > > > 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> If you install your Java > > > > > > > code as JAR file in the repository > > > > > > > [1], the > > > > > > > > > > > > > > > >> code will be loaded and > > > > > > > unloaded every time when your query is > > > > > > > > > > > > > > > >> executed. If you get an > > > > > > > error message? > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > > Unable to make field > > > > > > > > > > > > > > > >> private final > > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > > > >> > > > > > > > java.net.URLClassLoader.ucp > > > > > > > accessible: module java.base does not > > > > > > > > > > > > > > > >> "opens java.net" > > > > > > > to unnamed module @79e2c065 > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> ?unloading fails [2], as > > > > > > > you?re probably using a more recent > > > > > > > version > > > > > > > > > > > > > > > >> of the JDK, which > > > > > > > restricts reflective access to > > > > > > > internal variables. > > > > > > > > > > > > > > > >> You can get around this > > > > > > > by adding Java flags at startup time: > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > > > >> --add-opens > > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> Maybe there are better > > > > > > > solutions to unload JAR files today. > > > > > > > > > > > > > > > >> Suggestions are welcome! > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> Hope this helps, > > > > > > > > > > > > > > > >> Christian > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > > > >> [2] > > > > > > > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> On Tue, Apr 20, 2021 at > > > > > > > 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> > Hi all, > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> > I'm working on a > > > > > > > Java class that I'm importing into an > > > > > > > XQuery, so I > > > > > > > > > > > > > > > can do additional processing on > > > > > > > the data that isn't easily expressible > > > > > > > in > > > > > > > > > > > > > > > XQuery (or XSLT). In order to get > > > > > > > BaseX to pick up a modified version of > > > > > > > > > > > > > > > the jar file I'm building, I'm > > > > > > > restarting the BaseX http server. > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> > This makes it > > > > > > > slower to turn around testing the > > > > > > > changes. Is there a > > > > > > > > > > > > > > > better way of doing this? > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> > Kind regards, > > > > > > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part > > > > > > > -------------- > > > > > > > > > > > > > > An HTML attachment was scrubbed... > > > > > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210430/1b9943e9/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 8 > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 09:30:17 +0200 > > > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > Subject: Re: [basex-talk] Reloading > > > > > > > jars on a running http server. > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > > > > <CAP94bnN5QnMVBoaNzAL8WOuUo7N8MDYbM4+z=3fTqdn_eUVyZg at mail.gmail.com> > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > > > kotlin-stdlib-1.4.32.jar file in > > > > > > > addition to the test.jar file to > > > > > > > BaseX's lib directory. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Please note that JAR libraries will > > > > > > > only be unregistered after query > > > > > > > > > > > > > > evalution if they are moved into the > > > > > > > repo directory. If a library is > > > > > > > > > > > > > > copied into the lib directory, it will > > > > > > > be added to the static > > > > > > > > > > > > > > classpath. > > > > > > > > > > > > > > > > > > > > > > > > > > > > In the given case, you could probably > > > > > > > keep kotlin-stdlib-1.4.32.jar in > > > > > > > > > > > > > > the lib directory, but you?ll need to > > > > > > > keep your development code in > > > > > > > > > > > > > > the repository (as described in the > > > > > > > Wiki). It?s no problem, though, to > > > > > > > > > > > > > > directly modify the repo code (you > > > > > > > don?t have to use REPO INSTALL or > > > > > > > > > > > > > > repo:install for that). > > > > > > > > > > > > > > > > > > > > > > > > > > > > If the problem persists, feel free to > > > > > > > send me a little test.jar, I can > > > > > > > > > > > > > > then do further testing. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Apr 30, 2021 at 9:14 AM Reece > > > > > > > Dunn <msclrhd at googlemail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm not seeing any exceptions in > > > > > > > the console window, even when enabling > > > > > > > the debug setting. I'm using the > > > > > > > AdoptOpenJDK 1.8. I also have > > > > > > > AdoptOpenJDK 11, but I assume that > > > > > > > will have the issue you described. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > It's a custom-built jar using > > > > > > > Kotlin, built via gradle. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > One thing that it could be is > > > > > > > that I'm using Kotlin objects (not > > > > > > > classes), e.g.: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > package test > > > > > > > > > > > > > > > object Test { fun f(): String > > > > > > > = "test" } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > declare namespace Test = > > > > > > > "java:test.Test"; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > declare function test:f() as > > > > > > > xs:string { > > > > > > > > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The build.gradle file is simple. > > > > > > > It looks something like this (removing > > > > > > > things like the junit configuration): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ----- > > > > > > > > > > > > > > > buildscript { > > > > > > > > > > > > > > > ext.kotlin_version = "1.4.32" > > > > > > > > > > > > > > > ext.kotlin_stdlib = > > > > > > > "kotlin-stdlib" > > > > > > > > > > > > > > > ext.java_version = "1.8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { mavenCentral() > > > > > > > } > > > > > > > > > > > > > > > dependencies { classpath > > > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" > > > > > > > } > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > > > > > > > > mavenCentral() > > > > > > > > > > > > > > > mavenLocal() > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > compileKotlin { kotlinOptions { > > > > > > > jvmTarget = java_version } } > > > > > > > > > > > > > > > compileTestKotlin { kotlinOptions > > > > > > > { jvmTarget = java_version } } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > > > > > > > > implementation > > > > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > ----- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > > > kotlin-stdlib-1.4.32.jar file in > > > > > > > addition to the test.jar file to > > > > > > > BaseX's lib directory. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at 07:48, > > > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> I?m sorry to hear that. Did > > > > > > > you build a custom JAR file, or do you > > > > > > > > > > > > > > >> encounter problems with the > > > > > > > JDK? > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> Cheers, > > > > > > > > > > > > > > >> Christian > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> On Thu, Apr 29, 2021 at 9:48 > > > > > > > PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > wrote: > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > Hi Christian, > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > Thanks for the response. > > > > > > > Unfortunately, I've not been able to > > > > > > > get the reloading working. > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > Kind regards, > > > > > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > >> > On Wed, 21 Apr 2021 at > > > > > > > 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> Hi Reece, > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> If you install your > > > > > > > Java code as JAR file in the > > > > > > > repository [1], the > > > > > > > > > > > > > > >> >> code will be loaded > > > > > > > and unloaded every time when your > > > > > > > query is > > > > > > > > > > > > > > >> >> executed. If you get > > > > > > > an error message? > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > > Unable to make field > > > > > > > > > > > > > > >> >> private final > > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > > >> >> > > > > > > > java.net.URLClassLoader.ucp > > > > > > > accessible: module java.base does not > > > > > > > > > > > > > > >> >> "opens java.net" > > > > > > > to unnamed module @79e2c065 > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> ?unloading fails > > > > > > > [2], as you?re probably using a more > > > > > > > recent version > > > > > > > > > > > > > > >> >> of the JDK, which > > > > > > > restricts reflective access to > > > > > > > internal variables. > > > > > > > > > > > > > > >> >> You can get around > > > > > > > this by adding Java flags at startup > > > > > > > time: > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> --add-opens > > > > > > > java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > > >> >> --add-opens > > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> Maybe there are > > > > > > > better solutions to unload JAR files > > > > > > > today. > > > > > > > > > > > > > > >> >> Suggestions are > > > > > > > welcome! > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> Hope this helps, > > > > > > > > > > > > > > >> >> Christian > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > > >> >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > >> >> On Tue, Apr 20, 2021 > > > > > > > at 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > wrote: > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > >> >> > Hi all, > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > >> >> > I'm working on > > > > > > > a Java class that I'm importing into > > > > > > > an XQuery, so I can do additional > > > > > > > processing on the data that isn't > > > > > > > easily expressible in XQuery (or > > > > > > > XSLT). In order to get BaseX to pick > > > > > > > up a modified version of the jar file > > > > > > > I'm building, I'm restarting the BaseX > > > > > > > http server. > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > >> >> > This makes it > > > > > > > slower to turn around testing the > > > > > > > changes. Is there a better way of > > > > > > > doing this? > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > >> >> > Kind regards, > > > > > > > > > > > > > > >> >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 9 > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 09:37:14 +0200 > > > > > > > > > > > > > > From: Marco Lettere <m.lettere at gmail.com> > > > > > > > > > > > > > > To: basex-talk at mailman.uni-konstanz.de > > > > > > > > > > > > > > Subject: Re: [basex-talk] Make use of > > > > > > > external Identity Management for > > > > > > > > > > > > > > BaseX > > > > > > > > > > > > > > Message-ID: <1a8d807b-9cb3-3cd4-f1b7-22aff5446154 at gmail.com> > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > charset=utf-8; format=flowed > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian and Rob, > > > > > > > > > > > > > > as the authors of the code you point > > > > > > > to we confirm that interacting with > > > > > > > > > > > > > > Keycloak in XQuery and in particular > > > > > > > RestXQ is rather comfortable. > > > > > > > > > > > > > > That example is mostly a demonstration > > > > > > > code for a tool that scrapes a > > > > > > > > > > > > > > site index and registers sites named > > > > > > > gateways as public clients (in > > > > > > > > > > > > > > Oauth2 sense) into a Keycloak > > > > > > > instance. > > > > > > > > > > > > > > It is a proof of concept (as you can > > > > > > > see from the credentials? :-D) that > > > > > > > > > > > > > > has been used as a batch one-time > > > > > > > migration in a particular setting. > > > > > > > > > > > > > > > > > > > > > > > > > > > > We have also a RestXQ module that in > > > > > > > combination with basex:perm > > > > > > > > > > > > > > annotations protects access to a GUI > > > > > > > implementing the Oauth2 Code-grant > > > > > > > > > > > > > > flow. If Rob is interested we could > > > > > > > share. > > > > > > > > > > > > > > > > > > > > > > > > > > > > If there should be any plan of > > > > > > > integrating Oauth2/OIDC flows more > > > > > > > > > > > > > > tightly into BaseX we could also be > > > > > > > available for helping out. > > > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > > Marco. > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 30/04/21 08:47, Christian Gr?n > > > > > > > wrote: > > > > > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > There is no prepackaged module > > > > > > > for Keycloak (at least I?m aware of > > > > > > > > > > > > > > > none), but you can write your own > > > > > > > code with XQuery. See [1] for an > > > > > > > > > > > > > > > example how this might look like. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at 3:54 PM > > > > > > > Rob <private at tjalma.com> > > > > > > > wrote: > > > > > > > > > > > > > > >> Hi, > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> I have a question. > > > > > > > > > > > > > > >> Can BaseX make use of an > > > > > > > Identity Management application like > > > > > > > Keycloak for Users? > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> I can?t find anything about > > > > > > > it :) > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > >> With kind regards, > > > > > > > > > > > > > > >> Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > End of BaseX-Talk Digest, Vol 136, > > > > > > > Issue 17 > > > > > > > > > > > > > > ******************************************* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >
ML
Marco Lettere4 May 2021 11:11 #
It's in the philosophy of this mailing list. Help whenever and whoever you can. Take it as a working example and possibly let us know if it solved your use case. Ciao, M.
Quoted text · Rob · 2137 lines
On 04/05/21 11:08, Rob wrote: > > Thanks Marco! > > > > > The example is not copyrighted? :) > > > > > > Kind regards, > > Rob > > > > > > > Op 4 mei 2021, om 09:53 heeft Marco Lettere > > <m.lettere at gmail.com> het > > volgende geschreven: > > > > > > > > > > > > > > Forgot to mention that for > > decoding the JWT we needed to hook up Java's internal > > B64 decoder because I don't remember why the one > > provided with basex was not able to handle that > > encoding. > > > > > > > > > > > > > > > > On 04/05/21 09:51, Marco > > Lettere wrote: > > > > > > > > > > > > > > Hi Rob and all, > > > > > > I attach here an example > > > of an OIDC code grant flow implemented with RestXQ, > > > BaseX permission and error handler. > > > > > > The file includes a sort > > > of library for performing the steps of the OIDC flow > > > plus a minimal application that is registered as > > > public client inside keycloak and which is what you > > > should access from your browser by calling http://localhost:8984/authtest > > > or http://localhost:8984/authtest/internal. > > > > > > > > > > > > I've put into it also the > > > logout procedure for performing the back-channel > > > logout which closes the SSO session. > > > > > > > > > > > > > > > > > > This is only a resume of > > > a more generic and complex module but it should be > > > useful as a howto and it should be as simple to > > > install as copying the file to your BaseX' webapp > > > folder. Use it as you like. > > > > > > Regards, > > > > > > Marco. > > > > > > > > > > > > > > > > > > > > > > > > On 03/05/21 12:50, Rob > > > wrote: > > > > > > > > > > > > > > > > > > > > Hi Marco, > > > > > > > > > > > > > > > > > > > > Got it! > > > > > > > > Looking forward to the code! :) > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > Rob > > > > > > > > > > > > > > > > > > > > > Op 3 mei 2021, om 09:23 heeft > > > > > Marco Lettere <m.lettere at gmail.com> > > > > > het volgende geschreven: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Rob, > > > > > > > > > > no the code > > > > > in the repository the link refers to is > > > > > more like administrative tooling for > > > > > batch importing configuration into > > > > > Keycloak for administration purposes. > > > > > > > > > > I'll work on > > > > > creating an excerpt of the code that > > > > > realizes Oauth2 code grant flow with > > > > > RestXQ and Keycloak and I'll share by > > > > > tonight hopefully. > > > > > > > > > > Regards, > > > > > > > > > > Marco. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 01/05/21 > > > > > 17:49, Rob wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sorry for the late > > > > > > response! > > > > > > > > > > > > I’m reading all the emails > > > > > > now, haha. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I’m very happy to hear > > > > > > that it’s possible, I see you shared > > > > > > the following: > > > > > > > > > > > > https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for sharing! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Based on the following > > > > > > quote from Marco’s mail: > > > > > > > > > > > > "We have > > > > > > also a RestXQ module that in > > > > > > combination with basex:perm > > > > > > annotations protects access to a GUI > > > > > > implementing the Oauth2 Code-grant > > > > > > flow. If Rob is interested we could > > > > > > share.” > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The link above, is > > > > > > that the RESTXQ module Marco’s been > > > > > > talking about? > > > > > > > > > > > > Or is there another > > > > > > RESTXQ module? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > > > Rob > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Op 1 mei 2021, om > > > > > > > 05:29 heeft Adam Law <adamjameslaw at gmail.com> > > > > > > > het volgende geschreven: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If Rob isn't > > > > > > > interested, I certain am... > > > > > > > Yes please share > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >>We have > > > > > > > also a RestXQ module that in > > > > > > > combination with basex:perm > > > > > > > > > > > > > > > > > > > > > annotations protects access > > > > > > > to a GUI implementing the > > > > > > > Oauth2 Code-grant > > > > > > > > > > > > > > flow. If Rob is interested > > > > > > > we could share. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Many thanks for > > > > > > > sharing https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This is a bit > > > > > > > forward of me, but would you > > > > > > > consider changing the > > > > > > > license away from European > > > > > > > Union Public Licence which > > > > > > > appears to be 'copyleft' to > > > > > > > say BSD 3-Clause, MIT, ... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Adam > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, > > > > > > > Apr 30, 2021 at 6:00 PM > > > > > > > <basex-talk-request at mailman.uni-konstanz.de> > > > > > > > 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. Make use of external > > > > > > > > Identity Management for > > > > > > > > BaseX (Rob) > > > > > > > > > > > > > > > > 2. Re: Reloading jars > > > > > > > > on a running http server. > > > > > > > > (Reece Dunn) > > > > > > > > > > > > > > > > 3. Getting profile > > > > > > > > information in server > > > > > > > > responses. (Reece Dunn) > > > > > > > > > > > > > > > > 4. Re: Make use of > > > > > > > > external Identity > > > > > > > > Management for BaseX > > > > > > > > > > > > > > > > (Christian Gr?n) > > > > > > > > > > > > > > > > 5. Re: Reloading jars > > > > > > > > on a running http server. > > > > > > > > (Christian Gr?n) > > > > > > > > > > > > > > > > 6. Re: Getting profile > > > > > > > > information in server > > > > > > > > responses. > > > > > > > > > > > > > > > > (Christian Gr?n) > > > > > > > > > > > > > > > > 7. Re: Reloading jars > > > > > > > > on a running http server. > > > > > > > > (Reece Dunn) > > > > > > > > > > > > > > > > 8. Re: Reloading jars > > > > > > > > on a running http server. > > > > > > > > (Christian Gr?n) > > > > > > > > > > > > > > > > 9. Re: Make use of > > > > > > > > external Identity > > > > > > > > Management for BaseX > > > > > > > > > > > > > > > > (Marco Lettere) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ---------------------------------------------------------------------- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 1 > > > > > > > > > > > > > > > > Date: Thu, 29 Apr 2021 > > > > > > > > 15:54:08 +0200 > > > > > > > > > > > > > > > > From: Rob <private at tjalma.com> > > > > > > > > > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > > > Subject: [basex-talk] Make > > > > > > > > use of external Identity > > > > > > > > Management for > > > > > > > > > > > > > > > > BaseX > > > > > > > > > > > > > > > > Message-ID: <39036EF3-E67D-470D-B2F4-E6FBFFDF40E6 at tjalma.com> > > > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > > charset=utf-8 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I have a question. > > > > > > > > > > > > > > > > Can BaseX make use of an > > > > > > > > Identity Management > > > > > > > > application like Keycloak > > > > > > > > for Users? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I can?t find anything > > > > > > > > about it :) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 2 > > > > > > > > > > > > > > > > Date: Thu, 29 Apr 2021 > > > > > > > > 20:48:09 +0100 > > > > > > > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > > > Subject: Re: [basex-talk] > > > > > > > > Reloading jars on a > > > > > > > > running http server. > > > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > > > > > > > <CAGdtn24Qdgbe3=nebYA1je4hCrZVAgi_sercCRxsTxmZcWcAxQ at mail.gmail.com> > > > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the response. > > > > > > > > Unfortunately, I've not > > > > > > > > been able to get the > > > > > > > > > > > > > > > > reloading working. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 at > > > > > > > > 18:49, Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If you install your > > > > > > > > Java code as JAR file in > > > > > > > > the repository [1], the > > > > > > > > > > > > > > > > > code will be loaded > > > > > > > > and unloaded every time > > > > > > > > when your query is > > > > > > > > > > > > > > > > > executed. If you get > > > > > > > > an error message? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > > > Unable to make field > > > > > > > > > > > > > > > > > private final > > > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > > > > > > > > > > > > > java.net.URLClassLoader.ucp > > > > > > > > accessible: module > > > > > > > > java.base does not > > > > > > > > > > > > > > > > > "opens java.net" > > > > > > > > to unnamed module > > > > > > > > @79e2c065 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ?unloading fails [2], > > > > > > > > as you?re probably using a > > > > > > > > more recent version > > > > > > > > > > > > > > > > > of the JDK, which > > > > > > > > restricts reflective > > > > > > > > access to internal > > > > > > > > variables. > > > > > > > > > > > > > > > > > You can get around > > > > > > > > this by adding Java flags > > > > > > > > at startup time: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --add-opens > > > > > > > > java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > > > > > --add-opens > > > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Maybe there are > > > > > > > > better solutions to unload > > > > > > > > JAR files today. > > > > > > > > > > > > > > > > > Suggestions are > > > > > > > > welcome! > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > > > > > [2] > > > > > > > > > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Apr 20, 2021 > > > > > > > > at 6:44 PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm working on a > > > > > > > > Java class that I'm > > > > > > > > importing into an XQuery, > > > > > > > > so I can > > > > > > > > > > > > > > > > > do additional > > > > > > > > processing on the data > > > > > > > > that isn't easily > > > > > > > > expressible in > > > > > > > > > > > > > > > > > XQuery (or XSLT). In > > > > > > > > order to get BaseX to pick > > > > > > > > up a modified version of > > > > > > > > > > > > > > > > > the jar file I'm > > > > > > > > building, I'm restarting > > > > > > > > the BaseX http server. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > This makes it > > > > > > > > slower to turn around > > > > > > > > testing the changes. Is > > > > > > > > there a > > > > > > > > > > > > > > > > > better way of doing > > > > > > > > this? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part > > > > > > > > -------------- > > > > > > > > > > > > > > > > An HTML attachment was > > > > > > > > scrubbed... > > > > > > > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/fba079e2/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 3 > > > > > > > > > > > > > > > > Date: Thu, 29 Apr 2021 > > > > > > > > 20:50:40 +0100 > > > > > > > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > > > To: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > > > Subject: [basex-talk] > > > > > > > > Getting profile > > > > > > > > information in server > > > > > > > > responses. > > > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > <CAGdtn26mnN7Bu3bqUN8pkS1da4eq2tQstFOnx5nqqEvZPnHdkA at mail.gmail.com> > > > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > In BaseX, is there a way > > > > > > > > to get the profile timings > > > > > > > > (compile, run, print, > > > > > > > > > > > > > > > > etc.) in the response of a > > > > > > > > HTTP request via the > > > > > > > > Server-Timing header ( > > > > > > > > > > > > > > > > https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > -------------- next part > > > > > > > > -------------- > > > > > > > > > > > > > > > > An HTML attachment was > > > > > > > > scrubbed... > > > > > > > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210429/12a4d4fa/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 4 > > > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 > > > > > > > > 08:47:36 +0200 > > > > > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > > To: Rob <private at tjalma.com> > > > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > > > Subject: Re: [basex-talk] > > > > > > > > Make use of external > > > > > > > > Identity Management for > > > > > > > > > > > > > > > > BaseX > > > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > > > > > > > <CAP94bnP_-nFY6BQv38gqQdy9aoFn_gtRzgM1rW+GB7yjr=xTrA at mail.gmail.com> > > > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > There is no prepackaged > > > > > > > > module for Keycloak (at > > > > > > > > least I?m aware of > > > > > > > > > > > > > > > > none), but you can write > > > > > > > > your own code with XQuery. > > > > > > > > See [1] for an > > > > > > > > > > > > > > > > example how this might > > > > > > > > look like. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at > > > > > > > > 3:54 PM Rob <private at tjalma.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I have a question. > > > > > > > > > > > > > > > > > Can BaseX make use of > > > > > > > > an Identity Management > > > > > > > > application like Keycloak > > > > > > > > for Users? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I can?t find anything > > > > > > > > about it :) > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > With kind regards, > > > > > > > > > > > > > > > > > Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 5 > > > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 > > > > > > > > 08:48:36 +0200 > > > > > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > > > Subject: Re: [basex-talk] > > > > > > > > Reloading jars on a > > > > > > > > running http server. > > > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > <CAP94bnNs_gmotGxEa2Mp-fcJzQxiO3HdzLfcG0_KknotrZ6APQ at mail.gmail.com> > > > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I?m sorry to hear that. > > > > > > > > Did you build a custom JAR > > > > > > > > file, or do you > > > > > > > > > > > > > > > > encounter problems with > > > > > > > > the JDK? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at > > > > > > > > 9:48 PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the > > > > > > > > response. Unfortunately, > > > > > > > > I've not been able to get > > > > > > > > the reloading working. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr 2021 > > > > > > > > at 18:49, Christian Gr?n > > > > > > > > <christian.gruen at gmail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> If you install > > > > > > > > your Java code as JAR file > > > > > > > > in the repository [1], the > > > > > > > > > > > > > > > > >> code will be > > > > > > > > loaded and unloaded every > > > > > > > > time when your query is > > > > > > > > > > > > > > > > >> executed. If you > > > > > > > > get an error message? > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> > > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > > > Unable to make field > > > > > > > > > > > > > > > > >> private final > > > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > > > > >> > > > > > > > > java.net.URLClassLoader.ucp > > > > > > > > accessible: module > > > > > > > > java.base does not > > > > > > > > > > > > > > > > >> "opens java.net" > > > > > > > > to unnamed module > > > > > > > > @79e2c065 > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> ?unloading fails > > > > > > > > [2], as you?re probably > > > > > > > > using a more recent > > > > > > > > version > > > > > > > > > > > > > > > > >> of the JDK, which > > > > > > > > restricts reflective > > > > > > > > access to internal > > > > > > > > variables. > > > > > > > > > > > > > > > > >> You can get > > > > > > > > around this by adding Java > > > > > > > > flags at startup time: > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> --add-opens > > > > > > > > java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > > > > >> --add-opens > > > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> Maybe there are > > > > > > > > better solutions to unload > > > > > > > > JAR files today. > > > > > > > > > > > > > > > > >> Suggestions are > > > > > > > > welcome! > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> Hope this helps, > > > > > > > > > > > > > > > > >> Christian > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > > > > >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> On Tue, Apr 20, > > > > > > > > 2021 at 6:44 PM Reece Dunn > > > > > > > > <msclrhd at googlemail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > Hi all, > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > I'm working > > > > > > > > on a Java class that I'm > > > > > > > > importing into an XQuery, > > > > > > > > so I can do additional > > > > > > > > processing on the data > > > > > > > > that isn't easily > > > > > > > > expressible in XQuery (or > > > > > > > > XSLT). In order to get > > > > > > > > BaseX to pick up a > > > > > > > > modified version of the > > > > > > > > jar file I'm building, I'm > > > > > > > > restarting the BaseX http > > > > > > > > server. > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > This makes > > > > > > > > it slower to turn around > > > > > > > > testing the changes. Is > > > > > > > > there a better way of > > > > > > > > doing this? > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > Kind > > > > > > > > regards, > > > > > > > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 6 > > > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 > > > > > > > > 08:55:49 +0200 > > > > > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > > > Subject: Re: [basex-talk] > > > > > > > > Getting profile > > > > > > > > information in server > > > > > > > > > > > > > > > > responses. > > > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > <CAP94bnMCyZqRYvMEJG7EkON+FjNS0fsGWwx-_2EQrzzYPV-hZQ at mail.gmail.com> > > > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > A good idea; I?ll think of > > > > > > > > ways to get this included. > > > > > > > > One challenge > > > > > > > > > > > > > > > > might be that the response > > > > > > > > is streamed to the client. > > > > > > > > This means that > > > > > > > > > > > > > > > > when creating the HTTP > > > > > > > > request headers, it will > > > > > > > > not be known yet how > > > > > > > > > > > > > > > > long the evaluation will > > > > > > > > take (and the time for > > > > > > > > evaluation may also > > > > > > > > > > > > > > > > depend on the connection > > > > > > > > speed). The time for > > > > > > > > parsing and compiling > > > > > > > > > > > > > > > > the query should be known > > > > > > > > at that time, though. ? > > > > > > > > Maybe we could > > > > > > > > > > > > > > > > suppress result streaming > > > > > > > > when timings are > > > > > > > > requested. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 at > > > > > > > > 9:50 PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi all, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > In BaseX, is there a > > > > > > > > way to get the profile > > > > > > > > timings (compile, run, > > > > > > > > print, etc.) in the > > > > > > > > response of a HTTP request > > > > > > > > via the Server-Timing > > > > > > > > header (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Server-Timing)? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 7 > > > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 > > > > > > > > 08:14:21 +0100 > > > > > > > > > > > > > > > > From: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > > > To: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > > > Subject: Re: [basex-talk] > > > > > > > > Reloading jars on a > > > > > > > > running http server. > > > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > > > > > > > <CAGdtn25JU3aGsHZepExgDigQX7asNDOF=2C6PWJcz1kgQqZEfA at mail.gmail.com> > > > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > > charset="utf-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm not seeing any > > > > > > > > exceptions in the console > > > > > > > > window, even when enabling > > > > > > > > the > > > > > > > > > > > > > > > > debug setting. I'm using > > > > > > > > the AdoptOpenJDK 1.8. I > > > > > > > > also have AdoptOpenJDK 11, > > > > > > > > > > > > > > > > but I assume that will > > > > > > > > have the issue you > > > > > > > > described. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > It's a custom-built jar > > > > > > > > using Kotlin, built via > > > > > > > > gradle. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > One thing that it could be > > > > > > > > is that I'm using Kotlin > > > > > > > > objects (not classes), > > > > > > > > > > > > > > > > e.g.: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > package test > > > > > > > > > > > > > > > > object Test { fun f(): > > > > > > > > String = "test" } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > declare namespace Test > > > > > > > > = "java:test.Test"; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > declare function > > > > > > > > test:f() as xs:string { > > > > > > > > > > > > > > > > > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The build.gradle file is > > > > > > > > simple. It looks something > > > > > > > > like this (removing > > > > > > > > > > > > > > > > things like the junit > > > > > > > > configuration): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ----- > > > > > > > > > > > > > > > > buildscript { > > > > > > > > > > > > > > > > ext.kotlin_version = > > > > > > > > "1.4.32" > > > > > > > > > > > > > > > > ext.kotlin_stdlib = > > > > > > > > "kotlin-stdlib" > > > > > > > > > > > > > > > > ext.java_version = > > > > > > > > "1.8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > mavenCentral() } > > > > > > > > > > > > > > > > dependencies { > > > > > > > > classpath > > > > > > > > > > > > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } > > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > apply plugin: 'kotlin' > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > > > > > > > > > mavenCentral() > > > > > > > > > > > > > > > > mavenLocal() > > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > compileKotlin { > > > > > > > > kotlinOptions { jvmTarget > > > > > > > > = java_version } } > > > > > > > > > > > > > > > > compileTestKotlin { > > > > > > > > kotlinOptions { jvmTarget > > > > > > > > = java_version } } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > > > > > > > > > implementation > > > > > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > ----- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > You'll need to copy the > > > > > > > > kotlin-stdlib-1.4.32.jar > > > > > > > > file in addition to the > > > > > > > > > > > > > > > > test.jar file to BaseX's > > > > > > > > lib directory. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 at > > > > > > > > 07:48, Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I?m sorry to hear > > > > > > > > that. Did you build a > > > > > > > > custom JAR file, or do you > > > > > > > > > > > > > > > > > encounter problems > > > > > > > > with the JDK? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Cheers, > > > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 > > > > > > > > at 9:48 PM Reece Dunn <msclrhd at googlemail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks for the > > > > > > > > response. Unfortunately, > > > > > > > > I've not been able to get > > > > > > > > the > > > > > > > > > > > > > > > > > reloading working. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Wed, 21 Apr > > > > > > > > 2021 at 18:49, Christian > > > > > > > > Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> If you > > > > > > > > install your Java code as > > > > > > > > JAR file in the repository > > > > > > > > [1], the > > > > > > > > > > > > > > > > > >> code will be > > > > > > > > loaded and unloaded every > > > > > > > > time when your query is > > > > > > > > > > > > > > > > > >> executed. If > > > > > > > > you get an error message? > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > > > Unable to make field > > > > > > > > > > > > > > > > > >> private > > > > > > > > final > > > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > > > > > >> > > > > > > > > java.net.URLClassLoader.ucp > > > > > > > > accessible: module > > > > > > > > java.base does not > > > > > > > > > > > > > > > > > >> "opens java.net" > > > > > > > > to unnamed module > > > > > > > > @79e2c065 > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> ?unloading > > > > > > > > fails [2], as you?re > > > > > > > > probably using a more > > > > > > > > recent version > > > > > > > > > > > > > > > > > >> of the JDK, > > > > > > > > which restricts reflective > > > > > > > > access to internal > > > > > > > > variables. > > > > > > > > > > > > > > > > > >> You can get > > > > > > > > around this by adding Java > > > > > > > > flags at startup time: > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> --add-opens > > > > > > > > java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > > > > > >> --add-opens > > > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> Maybe there > > > > > > > > are better solutions to > > > > > > > > unload JAR files today. > > > > > > > > > > > > > > > > > >> Suggestions > > > > > > > > are welcome! > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> Hope this > > > > > > > > helps, > > > > > > > > > > > > > > > > > >> Christian > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > > > > > >> [2] > > > > > > > > > > > > > > > > > https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> On Tue, Apr > > > > > > > > 20, 2021 at 6:44 PM Reece > > > > > > > > Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >> > Hi all, > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >> > I'm > > > > > > > > working on a Java class > > > > > > > > that I'm importing into an > > > > > > > > XQuery, so I > > > > > > > > > > > > > > > > > can do additional > > > > > > > > processing on the data > > > > > > > > that isn't easily > > > > > > > > expressible in > > > > > > > > > > > > > > > > > XQuery (or XSLT). In > > > > > > > > order to get BaseX to pick > > > > > > > > up a modified version of > > > > > > > > > > > > > > > > > the jar file I'm > > > > > > > > building, I'm restarting > > > > > > > > the BaseX http server. > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >> > This > > > > > > > > makes it slower to turn > > > > > > > > around testing the > > > > > > > > changes. Is there a > > > > > > > > > > > > > > > > > better way of doing > > > > > > > > this? > > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > > >> > Kind > > > > > > > > regards, > > > > > > > > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -------------- next part > > > > > > > > -------------- > > > > > > > > > > > > > > > > An HTML attachment was > > > > > > > > scrubbed... > > > > > > > > > > > > > > > > URL: <http://mailman.uni-konstanz.de/pipermail/basex-talk/attachments/20210430/1b9943e9/attachment-0001.htm> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 8 > > > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 > > > > > > > > 09:30:17 +0200 > > > > > > > > > > > > > > > > From: Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > > > > > > > > > To: Reece Dunn <msclrhd at googlemail.com> > > > > > > > > > > > > > > > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > > > > > > > > > > > > > > > Subject: Re: [basex-talk] > > > > > > > > Reloading jars on a > > > > > > > > running http server. > > > > > > > > > > > > > > > > Message-ID: > > > > > > > > > > > > > > > > > > > > > > > > <CAP94bnN5QnMVBoaNzAL8WOuUo7N8MDYbM4+z=3fTqdn_eUVyZg at mail.gmail.com> > > > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > > charset="UTF-8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Reece, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > You'll need to copy > > > > > > > > the > > > > > > > > kotlin-stdlib-1.4.32.jar > > > > > > > > file in addition to the > > > > > > > > test.jar file to BaseX's > > > > > > > > lib directory. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Please note that JAR > > > > > > > > libraries will only be > > > > > > > > unregistered after query > > > > > > > > > > > > > > > > evalution if they are > > > > > > > > moved into the repo > > > > > > > > directory. If a library is > > > > > > > > > > > > > > > > copied into the lib > > > > > > > > directory, it will be > > > > > > > > added to the static > > > > > > > > > > > > > > > > classpath. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > In the given case, you > > > > > > > > could probably keep > > > > > > > > kotlin-stdlib-1.4.32.jar > > > > > > > > in > > > > > > > > > > > > > > > > the lib directory, but > > > > > > > > you?ll need to keep your > > > > > > > > development code in > > > > > > > > > > > > > > > > the repository (as > > > > > > > > described in the Wiki). > > > > > > > > It?s no problem, though, > > > > > > > > to > > > > > > > > > > > > > > > > directly modify the repo > > > > > > > > code (you don?t have to > > > > > > > > use REPO INSTALL or > > > > > > > > > > > > > > > > repo:install for that). > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If the problem persists, > > > > > > > > feel free to send me a > > > > > > > > little test.jar, I can > > > > > > > > > > > > > > > > then do further testing. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hope this helps, > > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Apr 30, 2021 at > > > > > > > > 9:14 AM Reece Dunn <msclrhd at googlemail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I'm not seeing any > > > > > > > > exceptions in the console > > > > > > > > window, even when enabling > > > > > > > > the debug setting. I'm > > > > > > > > using the AdoptOpenJDK > > > > > > > > 1.8. I also have > > > > > > > > AdoptOpenJDK 11, but I > > > > > > > > assume that will have the > > > > > > > > issue you described. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > It's a custom-built > > > > > > > > jar using Kotlin, built > > > > > > > > via gradle. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > One thing that it > > > > > > > > could be is that I'm using > > > > > > > > Kotlin objects (not > > > > > > > > classes), e.g.: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > package test > > > > > > > > > > > > > > > > > object Test { fun > > > > > > > > f(): String = "test" } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and using it like: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > declare namespace > > > > > > > > Test = "java:test.Test"; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > declare function > > > > > > > > test:f() as xs:string { > > > > > > > > > > > > > > > > > > > > > > > > > Test::f(Test::INSTANCE()) > > > > > > > > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The build.gradle file > > > > > > > > is simple. It looks > > > > > > > > something like this > > > > > > > > (removing things like the > > > > > > > > junit configuration): > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ----- > > > > > > > > > > > > > > > > > buildscript { > > > > > > > > > > > > > > > > > > > > > > > > > ext.kotlin_version = > > > > > > > > "1.4.32" > > > > > > > > > > > > > > > > > ext.kotlin_stdlib > > > > > > > > = "kotlin-stdlib" > > > > > > > > > > > > > > > > > ext.java_version > > > > > > > > = "1.8" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > mavenCentral() } > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > classpath > > > > > > > > "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" > > > > > > > > } > > > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > apply plugin: > > > > > > > > 'kotlin' > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > repositories { > > > > > > > > > > > > > > > > > mavenCentral() > > > > > > > > > > > > > > > > > mavenLocal() > > > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > compileKotlin { > > > > > > > > kotlinOptions { jvmTarget > > > > > > > > = java_version } } > > > > > > > > > > > > > > > > > compileTestKotlin { > > > > > > > > kotlinOptions { jvmTarget > > > > > > > > = java_version } } > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > dependencies { > > > > > > > > > > > > > > > > > implementation > > > > > > > > "org.jetbrains.kotlin:$kotlin_stdlib:$kotlin_version" > > > > > > > > > > > > > > > > > } > > > > > > > > > > > > > > > > > ----- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > You'll need to copy > > > > > > > > the > > > > > > > > kotlin-stdlib-1.4.32.jar > > > > > > > > file in addition to the > > > > > > > > test.jar file to BaseX's > > > > > > > > lib directory. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, 30 Apr 2021 > > > > > > > > at 07:48, Christian Gr?n > > > > > > > > <christian.gruen at gmail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> Hi Reece, > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> I?m sorry to hear > > > > > > > > that. Did you build a > > > > > > > > custom JAR file, or do you > > > > > > > > > > > > > > > > >> encounter > > > > > > > > problems with the JDK? > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> Cheers, > > > > > > > > > > > > > > > > >> Christian > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> On Thu, Apr 29, > > > > > > > > 2021 at 9:48 PM Reece Dunn > > > > > > > > <msclrhd at googlemail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > Hi > > > > > > > > Christian, > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > Thanks for > > > > > > > > the response. > > > > > > > > Unfortunately, I've not > > > > > > > > been able to get the > > > > > > > > reloading working. > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > Kind > > > > > > > > regards, > > > > > > > > > > > > > > > > >> > Reece > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > > >> > On Wed, 21 > > > > > > > > Apr 2021 at 18:49, > > > > > > > > Christian Gr?n <christian.gruen at gmail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> Hi > > > > > > > > Reece, > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> If you > > > > > > > > install your Java code as > > > > > > > > JAR file in the repository > > > > > > > > [1], the > > > > > > > > > > > > > > > > >> >> code > > > > > > > > will be loaded and > > > > > > > > unloaded every time when > > > > > > > > your query is > > > > > > > > > > > > > > > > >> >> > > > > > > > > executed. If you get an > > > > > > > > error message? > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> > > > > > > > > java.lang.reflect.InaccessibleObjectException: > > > > > > > > Unable to make field > > > > > > > > > > > > > > > > >> >> private > > > > > > > > final > > > > > > > > jdk.internal.loader.URLClassPath > > > > > > > > > > > > > > > > >> >> > > > > > > > > java.net.URLClassLoader.ucp > > > > > > > > accessible: module > > > > > > > > java.base does not > > > > > > > > > > > > > > > > >> >> "opens java.net" > > > > > > > > to unnamed module > > > > > > > > @79e2c065 > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> > > > > > > > > ?unloading fails [2], as > > > > > > > > you?re probably using a > > > > > > > > more recent version > > > > > > > > > > > > > > > > >> >> of the > > > > > > > > JDK, which restricts > > > > > > > > reflective access to > > > > > > > > internal variables. > > > > > > > > > > > > > > > > >> >> You can > > > > > > > > get around this by adding > > > > > > > > Java flags at startup > > > > > > > > time: > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> > > > > > > > > --add-opens java.base/java.net=ALL-UNNAMED > > > > > > > > > > > > > > > > >> >> > > > > > > > > --add-opens > > > > > > > > java.base/jdk.internal.loader=ALL-UNNAMED > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> Maybe > > > > > > > > there are better solutions > > > > > > > > to unload JAR files today. > > > > > > > > > > > > > > > > >> >> > > > > > > > > Suggestions are welcome! > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> Hope > > > > > > > > this helps, > > > > > > > > > > > > > > > > >> >> > > > > > > > > Christian > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> [1] https://docs.basex.org/wiki/Repository#Java > > > > > > > > > > > > > > > > >> >> [2] https://github.com/BaseXdb/basex/blob/master/basex-core/src/main/java/org/basex/util/JarLoader.java#L34 > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > >> >> On Tue, > > > > > > > > Apr 20, 2021 at 6:44 PM > > > > > > > > Reece Dunn <msclrhd at googlemail.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > > >> >> > Hi > > > > > > > > all, > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > > >> >> > I'm > > > > > > > > working on a Java class > > > > > > > > that I'm importing into an > > > > > > > > XQuery, so I can do > > > > > > > > additional processing on > > > > > > > > the data that isn't easily > > > > > > > > expressible in XQuery (or > > > > > > > > XSLT). In order to get > > > > > > > > BaseX to pick up a > > > > > > > > modified version of the > > > > > > > > jar file I'm building, I'm > > > > > > > > restarting the BaseX http > > > > > > > > server. > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > > >> >> > > > > > > > > > This makes it slower to > > > > > > > > turn around testing the > > > > > > > > changes. Is there a better > > > > > > > > way of doing this? > > > > > > > > > > > > > > > > >> >> > > > > > > > > > > > > > > > > > >> >> > > > > > > > > > Kind regards, > > > > > > > > > > > > > > > > >> >> > > > > > > > > > Reece > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------------------------------ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Message: 9 > > > > > > > > > > > > > > > > Date: Fri, 30 Apr 2021 > > > > > > > > 09:37:14 +0200 > > > > > > > > > > > > > > > > From: Marco Lettere <m.lettere at gmail.com> > > > > > > > > > > > > > > > > To: basex-talk at mailman.uni-konstanz.de > > > > > > > > > > > > > > > > Subject: Re: [basex-talk] > > > > > > > > Make use of external > > > > > > > > Identity Management for > > > > > > > > > > > > > > > > BaseX > > > > > > > > > > > > > > > > Message-ID: <1a8d807b-9cb3-3cd4-f1b7-22aff5446154 at gmail.com> > > > > > > > > > > > > > > > > Content-Type: text/plain; > > > > > > > > charset=utf-8; > > > > > > > > format=flowed > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hi Christian and Rob, > > > > > > > > > > > > > > > > as the authors of the code > > > > > > > > you point to we confirm > > > > > > > > that interacting with > > > > > > > > > > > > > > > > Keycloak in XQuery and in > > > > > > > > particular RestXQ is > > > > > > > > rather comfortable. > > > > > > > > > > > > > > > > That example is mostly a > > > > > > > > demonstration code for a > > > > > > > > tool that scrapes a > > > > > > > > > > > > > > > > site index and registers > > > > > > > > sites named gateways as > > > > > > > > public clients (in > > > > > > > > > > > > > > > > Oauth2 sense) into a > > > > > > > > Keycloak instance. > > > > > > > > > > > > > > > > It is a proof of concept > > > > > > > > (as you can see from the > > > > > > > > credentials? :-D) that > > > > > > > > > > > > > > > > has been used as a batch > > > > > > > > one-time migration in a > > > > > > > > particular setting. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > We have also a RestXQ > > > > > > > > module that in combination > > > > > > > > with basex:perm > > > > > > > > > > > > > > > > annotations protects > > > > > > > > access to a GUI > > > > > > > > implementing the Oauth2 > > > > > > > > Code-grant > > > > > > > > > > > > > > > > flow. If Rob is interested > > > > > > > > we could share. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > If there should be any > > > > > > > > plan of integrating > > > > > > > > Oauth2/OIDC flows more > > > > > > > > > > > > > > > > tightly into BaseX we > > > > > > > > could also be available > > > > > > > > for helping out. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Regards, > > > > > > > > > > > > > > > > Marco. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On 30/04/21 08:47, > > > > > > > > Christian Gr?n wrote: > > > > > > > > > > > > > > > > > Hi Rob, > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > There is no > > > > > > > > prepackaged module for > > > > > > > > Keycloak (at least I?m > > > > > > > > aware of > > > > > > > > > > > > > > > > > none), but you can > > > > > > > > write your own code with > > > > > > > > XQuery. See [1] for an > > > > > > > > > > > > > > > > > example how this > > > > > > > > might look like. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Are you using RESTXQ? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Best, > > > > > > > > > > > > > > > > > Christian > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [1] https://code-repo.d4science.org/gCubeSystem/d4science-keycloak-themes/src/branch/master/src/utils/xquery > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Thu, Apr 29, 2021 > > > > > > > > at 3:54 PM Rob <private at tjalma.com> > > > > > > > > wrote: > > > > > > > > > > > > > > > > >> Hi, > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> I have a > > > > > > > > question. > > > > > > > > > > > > > > > > >> Can BaseX make > > > > > > > > use of an Identity > > > > > > > > Management application > > > > > > > > like Keycloak for Users? > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> I can?t find > > > > > > > > anything about it :) > > > > > > > > > > > > > > > > >> > > > > > > > > > > > > > > > > >> With kind > > > > > > > > regards, > > > > > > > > > > > > > > > > >> Rob Tjalma > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > End of BaseX-Talk Digest, > > > > > > > > Vol 136, Issue 17 > > > > > > > > > > > > > > > > ******************************************* > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >

⚡Generated with XQuery