Re: [basex-talk] error Access Denied

2024-03-28 Thread Synnott, Stephane
Thanks Eliot that worked.

Stephane

From: Eliot Kimber 
Sent: Thursday, March 28, 2024 8:42 AM
To: Synnott, Stephane ; 
basex-talk@mailman.uni-konstanz.de
Subject: Re: error Access Denied

[***EXTERNE/EXTERNAL***]
If you’re using version 10 or newer there is no default admin password—you have 
to set it as a one-time task after you start the server for the first time.

See https://docs.basex.org/wiki/Database_Server

Cheers,

Eliot

_
Eliot Kimber
Sr Staff Content Engineer
Digital Content & Design
O: 512 554 9368
M: 512 554 9368
servicenow.com<https://www.servicenow.com>
LinkedIn<https://www.linkedin.com/company/servicenow> | 
Twitter<https://twitter.com/servicenow> | 
YouTube<https://www.youtube.com/user/servicenowinc> | 
Facebook<https://www.facebook.com/servicenow>

From: BaseX-Talk 
mailto:basex-talk-boun...@mailman.uni-konstanz.de>>
 on behalf of Synnott, Stephane 
mailto:stephane.synn...@sen.parl.gc.ca>>
Date: Wednesday, March 27, 2024 at 5:20 PM
To: 
basex-talk@mailman.uni-konstanz.de<mailto:basex-talk@mailman.uni-konstanz.de> 
mailto:basex-talk@mailman.uni-konstanz.de>>
Subject: [basex-talk] error Access Denied
[External Email]


Hi,

I have a C# .net application on my local machine, I have started the BaseX 
server and I want to use BaseX in my .Net application but as soon as I want to 
create a Session:
Session session = new Session("localhost", 1984, "admin", "admin");

I also tried with no username and password but it is the same result.  I get an 
“Access Denied”.

What am I missing?

Thanks in advance,
Stephane


IMPORTANT NOTICE: This message may contain confidential or privileged 
information and is intended only for the individual named. If you are not the 
intended recipient you should not disseminate, distribute or copy this email. 
Please notify the sender immediately if you have received this email by mistake 
and delete it from your system.

AVIS IMPORTANT: Le présent courriel peut contenir des renseignements 
confidentiels ou privilégiés et est strictement réservé à l’usage du 
destinataire prévu. Si vous n’êtes pas le destinataire prévu, vous ne devez pas 
diffuser, distribuer ou copier ce courriel. Veuillez aviser immédiatement 
l’expéditeur si vous avez reçu ce courriel par erreur et supprimez-le de votre 
système.


***EXTERNE: Ce message provient de l’extérieur de la Cité parlementaire. Évitez 
de cliquer sur un lien hypertexte, une pièce jointe ou de partager des 
informations si vous ne connaissez pas l’expéditeur. N’hésitez pas à 
communiquer avec le Centre de service des TI si vous avez des questions.

***EXTERNAL: This email originates from outside the parliamentary precinct. 
Avoid clicking on a hyperlink, an attachment or sharing information if you 
don't know the sender. Do not hesitate to contact the IT Service Desk if you 
have any questions.




Re: [basex-talk] error Access Denied

2024-03-28 Thread Eliot Kimber
If you’re using version 10 or newer there is no default admin password—you have 
to set it as a one-time task after you start the server for the first time.

See https://docs.basex.org/wiki/Database_Server

Cheers,

Eliot

_
Eliot Kimber
Sr Staff Content Engineer
Digital Content & Design
O: 512 554 9368
M: 512 554 9368
servicenow.com<https://www.servicenow.com>
LinkedIn<https://www.linkedin.com/company/servicenow> | 
Twitter<https://twitter.com/servicenow> | 
YouTube<https://www.youtube.com/user/servicenowinc> | 
Facebook<https://www.facebook.com/servicenow>

From: BaseX-Talk  on behalf of 
Synnott, Stephane 
Date: Wednesday, March 27, 2024 at 5:20 PM
To: basex-talk@mailman.uni-konstanz.de 
Subject: [basex-talk] error Access Denied
[External Email]


Hi,

I have a C# .net application on my local machine, I have started the BaseX 
server and I want to use BaseX in my .Net application but as soon as I want to 
create a Session:
Session session = new Session("localhost", 1984, "admin", "admin");

I also tried with no username and password but it is the same result.  I get an 
“Access Denied”.

What am I missing?

Thanks in advance,
Stephane


IMPORTANT NOTICE: This message may contain confidential or privileged 
information and is intended only for the individual named. If you are not the 
intended recipient you should not disseminate, distribute or copy this email. 
Please notify the sender immediately if you have received this email by mistake 
and delete it from your system.

AVIS IMPORTANT: Le présent courriel peut contenir des renseignements 
confidentiels ou privilégiés et est strictement réservé à l’usage du 
destinataire prévu. Si vous n’êtes pas le destinataire prévu, vous ne devez pas 
diffuser, distribuer ou copier ce courriel. Veuillez aviser immédiatement 
l’expéditeur si vous avez reçu ce courriel par erreur et supprimez-le de votre 
système.



[basex-talk] error Access Denied

2024-03-27 Thread Synnott, Stephane
Hi,

I have a C# .net application on my local machine, I have started the BaseX 
server and I want to use BaseX in my .Net application but as soon as I want to 
create a Session:
Session session = new Session("localhost", 1984, "admin", "admin");

I also tried with no username and password but it is the same result.  I get an 
"Access Denied".

What am I missing?

Thanks in advance,
Stephane


IMPORTANT NOTICE: This message may contain confidential or privileged 
information and is intended only for the individual named. If you are not the 
intended recipient you should not disseminate, distribute or copy this email. 
Please notify the sender immediately if you have received this email by mistake 
and delete it from your system.

AVIS IMPORTANT: Le pr?sent courriel peut contenir des renseignements 
confidentiels ou privil?gi?s et est strictement r?serv? ? l'usage du 
destinataire pr?vu. Si vous n'?tes pas le destinataire pr?vu, vous ne devez pas 
diffuser, distribuer ou copier ce courriel. Veuillez aviser imm?diatement 
l'exp?diteur si vous avez re?u ce courriel par erreur et supprimez-le de votre 
syst?me.



[basex-talk] Error: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.

2022-09-30 Thread ykhabins
Hello,

I am using BaseX v.10.2
More specifically launching basexserver.bat and using c# samples from the
following link:
https://github.com/BaseXdb/basex/tree/9/basex-api/src/main/c%23

Everything is work fine when a computer with the Windows 10 OS has the
following security policy disabled:
System cryptography: Use FIPS compliant algorithms for encryption, hashing,
and signing
https://docs.trendmicro.com/all/ent/sc/v3.0/en-US/cmcolh/t_fips.html

Alas, I am working for the company where that security policy is enabled.
And I am getting the following error:
"This implementation is not part of the Windows Platform FIPS validated
cryptographic algorithms."

This particular function is erroring out.
private string MD5(string input)
{
MD5CryptoServiceProvider MD5 = new MD5CryptoServiceProvider();
...
}

I did some research and collected the following useful links:
https://stackoverflow.com/questions/14509354/this-implementation-is-not-part
-of-the-windows-platform-fips-validated-cryptogra
https://docs.trendmicro.com/all/ent/sc/v3.0/en-US/cmcolh/t_fips.html
https://stackoverflow.com/questions/6652850/enforcefipspolicy-flag-in-web-co
nfig-doesnt-seem-to-working-for-web-application
https://techcommunity.microsoft.com/t5/microsoft-security-baselines/why-we-a
mp-8217-re-not-recommending-amp-8220-fips-mode-amp-8221/ba-p/701037

I also tried to add the following to the .config file to no avail:

   
  
   


Is it possible to modify c# samples to work on the computers where mentioned
above security poilsy is enabled?

Regards,
Yitzhak Khabinsky




Re: [basex-talk] Error messages in Basex 9.7.x

2022-08-14 Thread Marc Coenegracht
Thanks for the quick response Christian. I'll switch off
debugging then, excellent solution.

best,
Marc


On Sun, 14 Aug 2022, Christian Grün wrote:

> Hi Marc,
>
> Thanks for your feedback. If debugging is enabled, the returned error
> output can safely be ignored. The debugging mode is mostly helpful if
> errors occur repeatedly that need to be analyzed more closely.
>
> Cheers,
> Christian
>
>
>
> Marc Coenegracht  schrieb am So., 14. Aug. 2022, 20:41:
>
> > Hello Christian,
> >
> > In a clean install of Debian 11, openjdk version "11.0.16" 2022-07-19, I
> > unzipped BaseX973.zip and started the the HTTP server with: basexhttp -S
> > (with debugging set to true).
> >
> > The following error-message appeared:
> > java.lang.IllegalThreadStateException: process hasn't exited
> > at java.base/java.lang.ProcessImpl.exitValue(ProcessImpl.java:521)
> > at org.basex.util.Util.error(Util.java:311)
> > at org.basex.BaseXHTTP.start(BaseXHTTP.java:301)
> > at org.basex.BaseXHTTP.(BaseXHTTP.java:125)
> > at org.basex.BaseXHTTP.main(BaseXHTTP.java:54)
> >
> > which is repeated 10 times (all messages are exactly identical)
> >
> > If the server gets started with: 'basexhttp &' all is fine, no errors.
> > The server starts up normally after these errors and it can be shut down
> > cleanly again.
> >
> >
> > In a few of my scripts the following errors pops up:
> >
> > Creating Database...
> > java.lang.ClassNotFoundException:
> > com.sun.org.apache.xerces.internal.util.XMLCatalogResolver
> > at
> > java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> > at ... etc (multiple classes, long list)
> >
> > Creating Database...
> > .java.lang.NumberFormatException: For input string: "E"
> > at
> > java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
> > at ... etc
> >
> > repeated twice.
> >
> > The errors are seemingly without consequence, all is functioning fine and
> > the created databases seem OK. Actually the only reason I noticed the
> > errors is because I made the foolish decision to set debugging to true ...
> > :)
> >
> > I tested versions 9.7 and 9.7.3 on multiple Debian 11 boxes with
> > openjdk 11.0.16, and version 9.7 in an older Debian 9 box with openjdk
> > 11.0.6, results are identical.
> >
> >
> > Best,
> > Marc
> >
>

Re: [basex-talk] Error messages in Basex 9.7.x

2022-08-14 Thread Christian Grün
Hi Marc,

Thanks for your feedback. If debugging is enabled, the returned error
output can safely be ignored. The debugging mode is mostly helpful if
errors occur repeatedly that need to be analyzed more closely.

Cheers,
Christian



Marc Coenegracht  schrieb am So., 14. Aug. 2022, 20:41:

> Hello Christian,
>
> In a clean install of Debian 11, openjdk version "11.0.16" 2022-07-19, I
> unzipped BaseX973.zip and started the the HTTP server with: basexhttp -S
> (with debugging set to true).
>
> The following error-message appeared:
> java.lang.IllegalThreadStateException: process hasn't exited
> at java.base/java.lang.ProcessImpl.exitValue(ProcessImpl.java:521)
> at org.basex.util.Util.error(Util.java:311)
> at org.basex.BaseXHTTP.start(BaseXHTTP.java:301)
> at org.basex.BaseXHTTP.(BaseXHTTP.java:125)
> at org.basex.BaseXHTTP.main(BaseXHTTP.java:54)
>
> which is repeated 10 times (all messages are exactly identical)
>
> If the server gets started with: 'basexhttp &' all is fine, no errors.
> The server starts up normally after these errors and it can be shut down
> cleanly again.
>
>
> In a few of my scripts the following errors pops up:
>
> Creating Database...
> java.lang.ClassNotFoundException:
> com.sun.org.apache.xerces.internal.util.XMLCatalogResolver
> at
> java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
> at ... etc (multiple classes, long list)
>
> Creating Database...
> .java.lang.NumberFormatException: For input string: "E"
> at
> java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
> at ... etc
>
> repeated twice.
>
> The errors are seemingly without consequence, all is functioning fine and
> the created databases seem OK. Actually the only reason I noticed the
> errors is because I made the foolish decision to set debugging to true ...
> :)
>
> I tested versions 9.7 and 9.7.3 on multiple Debian 11 boxes with
> openjdk 11.0.16, and version 9.7 in an older Debian 9 box with openjdk
> 11.0.6, results are identical.
>
>
> Best,
> Marc
>


[basex-talk] Error messages in Basex 9.7.x

2022-08-14 Thread Marc Coenegracht
Hello Christian,

In a clean install of Debian 11, openjdk version "11.0.16" 2022-07-19, I
unzipped BaseX973.zip and started the the HTTP server with: basexhttp -S
(with debugging set to true).

The following error-message appeared:
java.lang.IllegalThreadStateException: process hasn't exited
at java.base/java.lang.ProcessImpl.exitValue(ProcessImpl.java:521)
at org.basex.util.Util.error(Util.java:311)
at org.basex.BaseXHTTP.start(BaseXHTTP.java:301)
at org.basex.BaseXHTTP.(BaseXHTTP.java:125)
at org.basex.BaseXHTTP.main(BaseXHTTP.java:54)

which is repeated 10 times (all messages are exactly identical)

If the server gets started with: 'basexhttp &' all is fine, no errors.
The server starts up normally after these errors and it can be shut down 
cleanly again.


In a few of my scripts the following errors pops up:

Creating Database...
java.lang.ClassNotFoundException:
com.sun.org.apache.xerces.internal.util.XMLCatalogResolver
at 
java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at ... etc (multiple classes, long list)

Creating Database...
.java.lang.NumberFormatException: For input string: "E"
at 
java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2054)
at ... etc

repeated twice.

The errors are seemingly without consequence, all is functioning fine and
the created databases seem OK. Actually the only reason I noticed the
errors is because I made the foolish decision to set debugging to true ... :)

I tested versions 9.7 and 9.7.3 on multiple Debian 11 boxes with
openjdk 11.0.16, and version 9.7 in an older Debian 9 box with openjdk
11.0.6, results are identical.


Best,
Marc


Re: [basex-talk] Error running dba in Tomcat 9.0 with BaseX v. 9.5 and above

2021-10-04 Thread Kim Galeazzi
Hi Christian,
This 9.6.3 beta release deployed successfully in Tomcat.
Thank you for the quick turnaround.
Kim

From: Christian Grün 
Sent: Tuesday, September 28, 2021 4:41 AM
To: Kim Galeazzi 
Cc: basex-talk@mailman.uni-konstanz.de
Subject: Re: [basex-talk] Error running dba in Tomcat 9.0 with BaseX v. 9.5 and 
above

Hi Kim,

The latest snapshot of BaseX should be deployable on Tomcat again [1]; could 
you give it a shot?

Best,
Christian

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


On Wed, Aug 25, 2021 at 10:25 PM Kim Galeazzi 
mailto:kim.galea...@inspirage.com>> wrote:
Launching the dba application in BaseX 9.5 and above deployed on Tomcat 9.0 
throws an error:

Exception
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause
java.lang.NoClassDefFoundError: org/eclipse/jetty/websocket/api/WebSocketAdapter
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:760)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
org.basex.query.func.session.SessionFn.session(SessionFn.java:31)
org.basex.query.func.session.SessionGet.value(SessionGet.java:17)
org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71)
org.basex.query.expr.If.expr(If.java:181)
org.basex.query.expr.If.iter(If.java:161)
org.basex.query.scope.MainModule.iter(MainModule.java:97)
org.basex.query.QueryContext.iter(QueryContext.java:326)
org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84)
org.basex.http.web.WebResponse.create(WebResponse.java:66)
org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69)
org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause
java.lang.ClassNotFoundException: 
org.eclipse.jetty.websocket.api.WebSocketAdapter
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1407)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:760)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
org.basex.query.func.session.SessionFn.session(SessionFn.java:31)
org.basex.query.func.session.SessionGet.value(SessionGet.java:17)
org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71)
org.basex.query.expr.If.expr(If.java:181)
org.basex.query.expr.If.iter(If.java:161)
org.basex.query.scope.MainModule.iter(MainModule.java:97)
org.basex.query.QueryContext.iter(QueryContext.java:326)
org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84)
org.basex.http.web.WebResponse.create(WebResponse.java:66)
org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69)
org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

I tried adding the Ecplise websocket API jar to the lib folder without success. 
Any ideas?

We rely on the RESTXQ for our implementations and find the dba web application 
very convenient for accessing the logs and managing the database.

Thank you.
[cid:image001.jpg@01D7B8F2.9C319310]<http://www.inspirage.com/>
Kim Galeazzi | Manager, Solution Architecture, Oracle/Agile PLM Consulting
Office: 408-680-8837 | Mobile: 
408-466-2121 | Campbell, CA
This email communication is considered business confidential and intended for 
the original recipient of this email only.



Re: [basex-talk] Error running dba in Tomcat 9.0 with BaseX v. 9.5 and above

2021-09-28 Thread Christian Grün
Hi Kim,

The latest snapshot of BaseX should be deployable on Tomcat again [1];
could you give it a shot?

Best,
Christian

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


On Wed, Aug 25, 2021 at 10:25 PM Kim Galeazzi 
wrote:

> Launching the dba application in BaseX 9.5 and above deployed on Tomcat
> 9.0 throws an error:
>
>
>
> *Exception*
>
> javax.servlet.ServletException: Servlet execution threw an exception
>
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>
> *Root Cause*
>
> java.lang.NoClassDefFoundError:
> org/eclipse/jetty/websocket/api/WebSocketAdapter
>
> java.lang.ClassLoader.defineClass1(Native Method)
>
> java.lang.ClassLoader.defineClass(ClassLoader.java:760)
>
>
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
>
> org.basex.query.func.session.SessionFn.session(SessionFn.java:31)
>
> org.basex.query.func.session.SessionGet.value(SessionGet.java:17)
>
> org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
>
> org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71)
>
> org.basex.query.expr.If.expr(If.java:181)
>
> org.basex.query.expr.If.iter(If.java:161)
>
> org.basex.query.scope.MainModule.iter(MainModule.java:97)
>
> org.basex.query.QueryContext.iter(QueryContext.java:326)
>
>
> org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84)
>
> org.basex.http.web.WebResponse.create(WebResponse.java:66)
>
> org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69)
>
> org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
>
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>
> *Root Cause*
>
> java.lang.ClassNotFoundException:
> org.eclipse.jetty.websocket.api.WebSocketAdapter
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1407)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
>
> java.lang.ClassLoader.defineClass1(Native Method)
>
> java.lang.ClassLoader.defineClass(ClassLoader.java:760)
>
>
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
>
> org.basex.query.func.session.SessionFn.session(SessionFn.java:31)
>
> org.basex.query.func.session.SessionGet.value(SessionGet.java:17)
>
> org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
>
> org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71)
>
> org.basex.query.expr.If.expr(If.java:181)
>
> org.basex.query.expr.If.iter(If.java:161)
>
> org.basex.query.scope.MainModule.iter(MainModule.java:97)
>
> org.basex.query.QueryContext.iter(QueryContext.java:326)
>
>
> org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84)
>
> org.basex.http.web.WebResponse.create(WebResponse.java:66)
>
> org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69)
>
> org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
>
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>
>
>
> I tried adding the Ecplise websocket API jar to the lib folder without
> success. Any ideas?
>
>
>
> We rely on the RESTXQ for our implementations and find the dba web
> application very convenient for accessing the logs and managing the
> database.
>
>
>
> Thank you.
>
> 
>
> *Kim Galeazzi |* Manager, Solution Architecture, Oracle/Agile PLM
> Consulting
>
> Office: 408-680-8837 <%28408%29%20680-8837> | Mobile: 408-466-2121
> <%28408%29%20466-2121> | Campbell, CA
>
> *This email communication is considered business confidential and intended
> for the original recipient of this email only.*
>
>
>


Re: [basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Christian Grün
Awesome.

On Fri, Aug 27, 2021 at 1:33 PM Artur Moor  wrote:
>
> The build https://files.basex.org/releases/latest/BaseX962-20210827.132409.zip
> runs without errors!


Re: [basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Artur Moor
The build https://files.basex.org/releases/latest/BaseX962-20210827.132409.zip
runs without errors!

Am Fr., 27. Aug. 2021 um 13:26 Uhr schrieb Christian Grün
:
>
> …and I should have slowed down: I found a FindBug “bug fix” that, I
> believe, has caused the issue [1]. Could you give the latest snapshot
> a try[2]?
>
> [1] 
> https://github.com/BaseXdb/basex/commit/993d137f108461e4eec862640d23eb4ba98b59b5
> [2] https://files.basex.org/releases/latest/
>
>
>
> On Fri, Aug 27, 2021 at 1:22 PM Artur Moor  wrote:
> >
> > Christian, thank you very much for your support!
> >
> > Probably there is somebody who has a MS SQL database and can check the
> > sql module in Basex 9.6.1.
> >
> > Am Fr., 27. Aug. 2021 um 13:18 Uhr schrieb Christian Grün
> > :
> > >
> > > > I think this is not the right direction because the error occurs only
> > > > on the version 9.6 and 9.6.1 all previous versions work fine.
> > >
> > > Thanks, that’s an important hint. I’ll try to reproduce this in a
> > > while (but it may take some time; I’ll be offline for a couple of days
> > > in September).
> > >
> > >
> > > > Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Grün
> > > > :
> > > > >
> > > > > > return sql:execute($c, "SELECT * FROM TABL")
> > > > >
> > > > > Some wild guesses:
> > > > >
> > > > > • I assume that "TABL" is correct?
> > > > > • If your database contains a lot of entries: What happens if you
> > > > > request small results?
> > > > > • What happens if you execute "SELECT 1 + 1"?
> > > > > • Do you get the same error with sql:prepare and sql:execute-prepared?
> > > > > • You could check the web for "makeFromDriverError SQLServerException:
> > > > > The connection is closed"
> > > > >
> > > > > I have currently no MS SQL instance running; maybe someone else has?
> > > > >
> > > > > Cheers,
> > > > > Christian
> > > > >
> > > > >
> > > > > > # basex -d ~/staging/mssql-min.xq
> > > > > > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel 
> > > > > > enableSSL
> > > > > > WARNUNG: TLSv1 was negotiated. Please update server and client to 
> > > > > > use
> > > > > > TLSv1.2 at minimum.
> > > > > > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde
> > > > > > geschlossen.
> > > > > > at 
> > > > > > com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> > > > > > at 
> > > > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> > > > > > at 
> > > > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> > > > > > at 
> > > > > > org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > > > at org.basex.query.expr.List$1.next(List.java:164)
> > > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > > > > > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > > > > > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > > > > > at org.basex.core.Command.run(Command.java:257)
> > > > > > at org.basex.core.Command.execute(Command.java:93)
> > > > > > at 
> > > > > > org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > > > > at org.basex.api.client.Session.execute(Session.java:36)
> > > > > > at org.basex.core.CLI.execute(CLI.java:92)
> > > > > > at org.basex.BaseX.(BaseX.java:107)
> > > > > > at org.basex.BaseX.main(BaseX.java:43)
> > > > > > org.basex.query.QueryException: An SQL exception occurred: Das
> > > > > > Resultset wurde geschlossen.
> > > > > > at org.basex.query.QueryError.get(QueryError.java:1429)
> > > > > > at 
> > > > > > org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
> > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > > > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > > > at org.basex.query.expr.List$1.next(List.java:164)
> > > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > > > > > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > > > > > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > > > > > at org.basex.core.Command.run(Command.java:257)
> > > > > > at org.basex.core.Command.execute(Command.java:93)
> > > > > > at 
> > > > > > org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > > > > at org.basex.api.client.Session.execute(Session.java:36)
> > > > > > at org.basex.core.CLI.execute(CLI.java:92)
> > > > > > at org.basex.BaseX.(BaseX.java:107)
> > > > > > at org.basex.BaseX.main(BaseX.java:43)
> > > > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das
> > 

Re: [basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Christian Grün
…and I should have slowed down: I found a FindBug “bug fix” that, I
believe, has caused the issue [1]. Could you give the latest snapshot
a try[2]?

[1] 
https://github.com/BaseXdb/basex/commit/993d137f108461e4eec862640d23eb4ba98b59b5
[2] https://files.basex.org/releases/latest/



On Fri, Aug 27, 2021 at 1:22 PM Artur Moor  wrote:
>
> Christian, thank you very much for your support!
>
> Probably there is somebody who has a MS SQL database and can check the
> sql module in Basex 9.6.1.
>
> Am Fr., 27. Aug. 2021 um 13:18 Uhr schrieb Christian Grün
> :
> >
> > > I think this is not the right direction because the error occurs only
> > > on the version 9.6 and 9.6.1 all previous versions work fine.
> >
> > Thanks, that’s an important hint. I’ll try to reproduce this in a
> > while (but it may take some time; I’ll be offline for a couple of days
> > in September).
> >
> >
> > > Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Grün
> > > :
> > > >
> > > > > return sql:execute($c, "SELECT * FROM TABL")
> > > >
> > > > Some wild guesses:
> > > >
> > > > • I assume that "TABL" is correct?
> > > > • If your database contains a lot of entries: What happens if you
> > > > request small results?
> > > > • What happens if you execute "SELECT 1 + 1"?
> > > > • Do you get the same error with sql:prepare and sql:execute-prepared?
> > > > • You could check the web for "makeFromDriverError SQLServerException:
> > > > The connection is closed"
> > > >
> > > > I have currently no MS SQL instance running; maybe someone else has?
> > > >
> > > > Cheers,
> > > > Christian
> > > >
> > > >
> > > > > # basex -d ~/staging/mssql-min.xq
> > > > > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel 
> > > > > enableSSL
> > > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use
> > > > > TLSv1.2 at minimum.
> > > > > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde
> > > > > geschlossen.
> > > > > at 
> > > > > com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> > > > > at 
> > > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> > > > > at 
> > > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> > > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > > at org.basex.query.expr.List$1.next(List.java:164)
> > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > > > > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > > > > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > > > > at org.basex.core.Command.run(Command.java:257)
> > > > > at org.basex.core.Command.execute(Command.java:93)
> > > > > at 
> > > > > org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > > > at org.basex.api.client.Session.execute(Session.java:36)
> > > > > at org.basex.core.CLI.execute(CLI.java:92)
> > > > > at org.basex.BaseX.(BaseX.java:107)
> > > > > at org.basex.BaseX.main(BaseX.java:43)
> > > > > org.basex.query.QueryException: An SQL exception occurred: Das
> > > > > Resultset wurde geschlossen.
> > > > > at org.basex.query.QueryError.get(QueryError.java:1429)
> > > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
> > > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > > at org.basex.query.expr.List$1.next(List.java:164)
> > > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > > > > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > > > > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > > > > at org.basex.core.Command.run(Command.java:257)
> > > > > at org.basex.core.Command.execute(Command.java:93)
> > > > > at 
> > > > > org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > > > at org.basex.api.client.Session.execute(Session.java:36)
> > > > > at org.basex.core.CLI.execute(CLI.java:92)
> > > > > at org.basex.BaseX.(BaseX.java:107)
> > > > > at org.basex.BaseX.main(BaseX.java:43)
> > > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das
> > > > > Resultset wurde geschlossen.
> > > > > at 
> > > > > com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> > > > > at 
> > > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> > > > > at 
> > > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> > > > 

Re: [basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Artur Moor
Christian, thank you very much for your support!

Probably there is somebody who has a MS SQL database and can check the
sql module in Basex 9.6.1.

Am Fr., 27. Aug. 2021 um 13:18 Uhr schrieb Christian Grün
:
>
> > I think this is not the right direction because the error occurs only
> > on the version 9.6 and 9.6.1 all previous versions work fine.
>
> Thanks, that’s an important hint. I’ll try to reproduce this in a
> while (but it may take some time; I’ll be offline for a couple of days
> in September).
>
>
> > Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Grün
> > :
> > >
> > > > return sql:execute($c, "SELECT * FROM TABL")
> > >
> > > Some wild guesses:
> > >
> > > • I assume that "TABL" is correct?
> > > • If your database contains a lot of entries: What happens if you
> > > request small results?
> > > • What happens if you execute "SELECT 1 + 1"?
> > > • Do you get the same error with sql:prepare and sql:execute-prepared?
> > > • You could check the web for "makeFromDriverError SQLServerException:
> > > The connection is closed"
> > >
> > > I have currently no MS SQL instance running; maybe someone else has?
> > >
> > > Cheers,
> > > Christian
> > >
> > >
> > > > # basex -d ~/staging/mssql-min.xq
> > > > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel 
> > > > enableSSL
> > > > WARNUNG: TLSv1 was negotiated. Please update server and client to use
> > > > TLSv1.2 at minimum.
> > > > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde
> > > > geschlossen.
> > > > at 
> > > > com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> > > > at 
> > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> > > > at 
> > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > at org.basex.query.expr.List$1.next(List.java:164)
> > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > > > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > > > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > > > at org.basex.core.Command.run(Command.java:257)
> > > > at org.basex.core.Command.execute(Command.java:93)
> > > > at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > > at org.basex.api.client.Session.execute(Session.java:36)
> > > > at org.basex.core.CLI.execute(CLI.java:92)
> > > > at org.basex.BaseX.(BaseX.java:107)
> > > > at org.basex.BaseX.main(BaseX.java:43)
> > > > org.basex.query.QueryException: An SQL exception occurred: Das
> > > > Resultset wurde geschlossen.
> > > > at org.basex.query.QueryError.get(QueryError.java:1429)
> > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
> > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > > at org.basex.query.expr.List$1.next(List.java:164)
> > > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > > > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > > > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > > > at org.basex.core.Command.run(Command.java:257)
> > > > at org.basex.core.Command.execute(Command.java:93)
> > > > at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > > at org.basex.api.client.Session.execute(Session.java:36)
> > > > at org.basex.core.CLI.execute(CLI.java:92)
> > > > at org.basex.BaseX.(BaseX.java:107)
> > > > at org.basex.BaseX.main(BaseX.java:43)
> > > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das
> > > > Resultset wurde geschlossen.
> > > > at 
> > > > com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> > > > at 
> > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> > > > at 
> > > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> > > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> > > > ... 14 more
> > > > org.basex.core.BaseXException: Stopped at 
> > > > /Users/sa/staging/mssql-min.xq, 3/19:
> > > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen.
> > > > at org.basex.core.Command.execute(Command.java:94)
> > > > at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > > at org.basex.api.client.Session.execute(Session.java:36)
> > > > at org.basex.core.CLI.execute(CLI.java:92)

Re: [basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Christian Grün
> I think this is not the right direction because the error occurs only
> on the version 9.6 and 9.6.1 all previous versions work fine.

Thanks, that’s an important hint. I’ll try to reproduce this in a
while (but it may take some time; I’ll be offline for a couple of days
in September).


> Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Grün
> :
> >
> > > return sql:execute($c, "SELECT * FROM TABL")
> >
> > Some wild guesses:
> >
> > • I assume that "TABL" is correct?
> > • If your database contains a lot of entries: What happens if you
> > request small results?
> > • What happens if you execute "SELECT 1 + 1"?
> > • Do you get the same error with sql:prepare and sql:execute-prepared?
> > • You could check the web for "makeFromDriverError SQLServerException:
> > The connection is closed"
> >
> > I have currently no MS SQL instance running; maybe someone else has?
> >
> > Cheers,
> > Christian
> >
> >
> > > # basex -d ~/staging/mssql-min.xq
> > > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel 
> > > enableSSL
> > > WARNUNG: TLSv1 was negotiated. Please update server and client to use
> > > TLSv1.2 at minimum.
> > > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde
> > > geschlossen.
> > > at 
> > > com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> > > at 
> > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> > > at 
> > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > at org.basex.query.expr.List$1.next(List.java:164)
> > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > > at org.basex.core.Command.run(Command.java:257)
> > > at org.basex.core.Command.execute(Command.java:93)
> > > at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > at org.basex.api.client.Session.execute(Session.java:36)
> > > at org.basex.core.CLI.execute(CLI.java:92)
> > > at org.basex.BaseX.(BaseX.java:107)
> > > at org.basex.BaseX.main(BaseX.java:43)
> > > org.basex.query.QueryException: An SQL exception occurred: Das
> > > Resultset wurde geschlossen.
> > > at org.basex.query.QueryError.get(QueryError.java:1429)
> > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
> > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > > at org.basex.query.expr.List$1.next(List.java:164)
> > > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > > at org.basex.core.Command.run(Command.java:257)
> > > at org.basex.core.Command.execute(Command.java:93)
> > > at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > at org.basex.api.client.Session.execute(Session.java:36)
> > > at org.basex.core.CLI.execute(CLI.java:92)
> > > at org.basex.BaseX.(BaseX.java:107)
> > > at org.basex.BaseX.main(BaseX.java:43)
> > > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das
> > > Resultset wurde geschlossen.
> > > at 
> > > com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> > > at 
> > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> > > at 
> > > com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> > > ... 14 more
> > > org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 
> > > 3/19:
> > > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen.
> > > at org.basex.core.Command.execute(Command.java:94)
> > > at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > > at org.basex.api.client.Session.execute(Session.java:36)
> > > at org.basex.core.CLI.execute(CLI.java:92)
> > > at org.basex.BaseX.(BaseX.java:107)
> > > at org.basex.BaseX.main(BaseX.java:43)
> > > Caused by: org.basex.query.QueryException: An SQL exception occurred:
> > > Das Resultset wurde geschlossen.
> > > at org.basex.query.QueryError.get(QueryError.java:1429)
> > > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
> > > at 

Re: [basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Artur Moor
Hi, Christian,

> I assume that "TABL" is correct?
YES

> If your database contains a lot of entries: What happens if you request small 
> results?
Same error

> What happens if you execute "SELECT 1 + 1"?
Same error

> Do you get the same error with sql:prepare and sql:execute-prepared?
Yes

> You could check the web for "makeFromDriverError SQLServerException: The 
> connection is closed".
I think this is not the right direction because the error occurs only
on the version 9.6 and 9.6.1 all previous versions work fine.

Am Fr., 27. Aug. 2021 um 12:57 Uhr schrieb Christian Grün
:
>
> > return sql:execute($c, "SELECT * FROM TABL")
>
> Some wild guesses:
>
> • I assume that "TABL" is correct?
> • If your database contains a lot of entries: What happens if you
> request small results?
> • What happens if you execute "SELECT 1 + 1"?
> • Do you get the same error with sql:prepare and sql:execute-prepared?
> • You could check the web for "makeFromDriverError SQLServerException:
> The connection is closed"
>
> I have currently no MS SQL instance running; maybe someone else has?
>
> Cheers,
> Christian
>
>
> > # basex -d ~/staging/mssql-min.xq
> > Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
> > WARNUNG: TLSv1 was negotiated. Please update server and client to use
> > TLSv1.2 at minimum.
> > com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde
> > geschlossen.
> > at 
> > com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> > at 
> > com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> > at 
> > com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > at org.basex.query.expr.List$1.next(List.java:164)
> > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > at org.basex.core.Command.run(Command.java:257)
> > at org.basex.core.Command.execute(Command.java:93)
> > at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > at org.basex.api.client.Session.execute(Session.java:36)
> > at org.basex.core.CLI.execute(CLI.java:92)
> > at org.basex.BaseX.(BaseX.java:107)
> > at org.basex.BaseX.main(BaseX.java:43)
> > org.basex.query.QueryException: An SQL exception occurred: Das
> > Resultset wurde geschlossen.
> > at org.basex.query.QueryError.get(QueryError.java:1429)
> > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
> > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> > at org.basex.query.QueryContext.next(QueryContext.java:347)
> > at org.basex.query.expr.List$1.next(List.java:164)
> > at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> > at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> > at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> > at org.basex.core.Command.run(Command.java:257)
> > at org.basex.core.Command.execute(Command.java:93)
> > at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > at org.basex.api.client.Session.execute(Session.java:36)
> > at org.basex.core.CLI.execute(CLI.java:92)
> > at org.basex.BaseX.(BaseX.java:107)
> > at org.basex.BaseX.main(BaseX.java:43)
> > Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das
> > Resultset wurde geschlossen.
> > at 
> > com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> > at 
> > com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> > at 
> > com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> > at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> > ... 14 more
> > org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 
> > 3/19:
> > [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen.
> > at org.basex.core.Command.execute(Command.java:94)
> > at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> > at org.basex.api.client.Session.execute(Session.java:36)
> > at org.basex.core.CLI.execute(CLI.java:92)
> > at org.basex.BaseX.(BaseX.java:107)
> > at org.basex.BaseX.main(BaseX.java:43)
> > Caused by: org.basex.query.QueryException: An SQL exception occurred:
> > Das Resultset wurde geschlossen.
> > at org.basex.query.QueryError.get(QueryError.java:1429)
> > at 

Re: [basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Christian Grün
> return sql:execute($c, "SELECT * FROM TABL")

Some wild guesses:

• I assume that "TABL" is correct?
• If your database contains a lot of entries: What happens if you
request small results?
• What happens if you execute "SELECT 1 + 1"?
• Do you get the same error with sql:prepare and sql:execute-prepared?
• You could check the web for "makeFromDriverError SQLServerException:
The connection is closed"

I have currently no MS SQL instance running; maybe someone else has?

Cheers,
Christian


> # basex -d ~/staging/mssql-min.xq
> Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
> WARNUNG: TLSv1 was negotiated. Please update server and client to use
> TLSv1.2 at minimum.
> com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde
> geschlossen.
> at 
> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> at 
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> at 
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> at org.basex.query.QueryContext.next(QueryContext.java:347)
> at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> at org.basex.query.QueryContext.next(QueryContext.java:347)
> at org.basex.query.expr.List$1.next(List.java:164)
> at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> at org.basex.core.Command.run(Command.java:257)
> at org.basex.core.Command.execute(Command.java:93)
> at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> at org.basex.api.client.Session.execute(Session.java:36)
> at org.basex.core.CLI.execute(CLI.java:92)
> at org.basex.BaseX.(BaseX.java:107)
> at org.basex.BaseX.main(BaseX.java:43)
> org.basex.query.QueryException: An SQL exception occurred: Das
> Resultset wurde geschlossen.
> at org.basex.query.QueryError.get(QueryError.java:1429)
> at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
> at org.basex.query.QueryContext.next(QueryContext.java:347)
> at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> at org.basex.query.QueryContext.next(QueryContext.java:347)
> at org.basex.query.expr.List$1.next(List.java:164)
> at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> at org.basex.core.Command.run(Command.java:257)
> at org.basex.core.Command.execute(Command.java:93)
> at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> at org.basex.api.client.Session.execute(Session.java:36)
> at org.basex.core.CLI.execute(CLI.java:92)
> at org.basex.BaseX.(BaseX.java:107)
> at org.basex.BaseX.main(BaseX.java:43)
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das
> Resultset wurde geschlossen.
> at 
> com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
> at 
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
> at 
> com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
> at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
> ... 14 more
> org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 
> 3/19:
> [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen.
> at org.basex.core.Command.execute(Command.java:94)
> at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
> at org.basex.api.client.Session.execute(Session.java:36)
> at org.basex.core.CLI.execute(CLI.java:92)
> at org.basex.BaseX.(BaseX.java:107)
> at org.basex.BaseX.main(BaseX.java:43)
> Caused by: org.basex.query.QueryException: An SQL exception occurred:
> Das Resultset wurde geschlossen.
> at org.basex.query.QueryError.get(QueryError.java:1429)
> at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
> at org.basex.query.QueryContext.next(QueryContext.java:347)
> at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
> at org.basex.query.QueryContext.next(QueryContext.java:347)
> at org.basex.query.expr.List$1.next(List.java:164)
> at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
> at org.basex.core.cmd.AQuery.query(AQuery.java:107)
> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> at org.basex.core.Command.run(Command.java:257)
> at org.basex.core.Command.execute(Command.java:93)
> ... 5 more
> Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das
> Resultset wurde geschlossen.
> at 
> 

Re: [basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Artur Moor
Hi Christian,

# cat mssql-min.xq
sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"),
let $c := sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME",
"username", "pa$$w0rd")
return sql:execute($c, "SELECT * FROM TABL")

# basex -d ~/staging/mssql-min.xq
Aug. 27, 2021 12:16:21 PM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
WARNUNG: TLSv1 was negotiated. Please update server and client to use
TLSv1.2 at minimum.
com.microsoft.sqlserver.jdbc.SQLServerException: Das Resultset wurde
geschlossen.
at 
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
at org.basex.query.QueryContext.next(QueryContext.java:347)
at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
at org.basex.query.QueryContext.next(QueryContext.java:347)
at org.basex.query.expr.List$1.next(List.java:164)
at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
at org.basex.core.cmd.AQuery.query(AQuery.java:107)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:257)
at org.basex.core.Command.execute(Command.java:93)
at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:92)
at org.basex.BaseX.(BaseX.java:107)
at org.basex.BaseX.main(BaseX.java:43)
org.basex.query.QueryException: An SQL exception occurred: Das
Resultset wurde geschlossen.
at org.basex.query.QueryError.get(QueryError.java:1429)
at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
at org.basex.query.QueryContext.next(QueryContext.java:347)
at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
at org.basex.query.QueryContext.next(QueryContext.java:347)
at org.basex.query.expr.List$1.next(List.java:164)
at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
at org.basex.core.cmd.AQuery.query(AQuery.java:107)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:257)
at org.basex.core.Command.execute(Command.java:93)
at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:92)
at org.basex.BaseX.(BaseX.java:107)
at org.basex.BaseX.main(BaseX.java:43)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das
Resultset wurde geschlossen.
at 
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
... 14 more
org.basex.core.BaseXException: Stopped at /Users/sa/staging/mssql-min.xq, 3/19:
[sql:error] An SQL exception occurred: Das Resultset wurde geschlossen.
at org.basex.core.Command.execute(Command.java:94)
at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:92)
at org.basex.BaseX.(BaseX.java:107)
at org.basex.BaseX.main(BaseX.java:43)
Caused by: org.basex.query.QueryException: An SQL exception occurred:
Das Resultset wurde geschlossen.
at org.basex.query.QueryError.get(QueryError.java:1429)
at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:123)
at org.basex.query.QueryContext.next(QueryContext.java:347)
at org.basex.query.expr.IterMap$1.next(IterMap.java:75)
at org.basex.query.QueryContext.next(QueryContext.java:347)
at org.basex.query.expr.List$1.next(List.java:164)
at org.basex.query.scope.MainModule$1.next(MainModule.java:104)
at org.basex.core.cmd.AQuery.query(AQuery.java:107)
at org.basex.core.cmd.XQuery.run(XQuery.java:22)
at org.basex.core.Command.run(Command.java:257)
at org.basex.core.Command.execute(Command.java:93)
... 5 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Das
Resultset wurde geschlossen.
at 
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:234)
at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.checkClosed(SQLServerResultSet.java:450)
at 
com.microsoft.sqlserver.jdbc.SQLServerResultSet.next(SQLServerResultSet.java:992)
at org.basex.query.func.sql.SqlExecute$1.next(SqlExecute.java:84)
... 14 more
Stopped at /Users/sa/staging/mssql-min.xq, 3/19:
[sql:error] An SQL exception occurred: Das Resultset wurde geschlossen.

Same 

Re: [basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Christian Grün
Hi Artur,

Thanks for the full info view output.

The issue seems to be specific to MS SQL. Could you run basex on
command line with the -d flag and share the output with us?

Thanks in advance
Christian


On Fri, Aug 27, 2021 at 11:17 AM Artur Moor  wrote:
>
> Dear all,
>
> When executing an SQL query with the SQL module:
> sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"),
> let $connection := 
> sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", 
> "pa$$w0rd")
> return sql:execute($connection, "SELECT * FROM TABLE")
>
> I get the following error message:
> Error:
> Stopped at /Users/sa/staging/file, 3/19:
> [sql:error] An SQL exception occurred: Das Resultset wurde geschlossen.
> Compiling:
> - inline let $connection_0 := 
> sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", 
> "pa$$w0rd")
> - simplify FLWOR expression: 
> sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", 
> "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")
> Optimized Query:
> (sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), 
> sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", 
> "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE"))
> Query:
> sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection := 
> sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME", "username", 
> "pa$$w0rd") return sql:execute($connection, "SELECT * FROM TABLE")
> Query Plan:
> 
>   
> 
>size="1">com.microsoft.sqlserver.jdbc.SQLServerDriver
> 
> 
>   
>  size="1">jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME
> username
> pa$$w0rd
>   
>   
> 
> SELECT * FROM TABLE
>   
> 
>   
> 
>
> Does anyone have an idea what the problem is?
>
> Any hints are welcome!


[basex-talk] Error executing an SQL query using «SQL Module»

2021-08-27 Thread Artur Moor
*Dear all,*

*When executing an SQL query with the SQL module:*
sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"),
let $connection :=
sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME",
"username", "pa$$w0rd")
return sql:execute($connection, "SELECT * FROM TABLE")

*I get the following error message:*
Error:
Stopped at /Users/sa/staging/file, 3/19:
[sql:error] An SQL exception occurred: Das Resultset wurde geschlossen.
Compiling:
- inline let $connection_0 :=
sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME",
"username", "pa$$w0rd")
- simplify FLWOR expression:
sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME",
"username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE")
Optimized Query:
(sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"),
sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME",
"username", "pa$$w0rd") ! sql:execute(., "SELECT * FROM TABLE"))
Query:
sql:init("com.microsoft.sqlserver.jdbc.SQLServerDriver"), let $connection
:= sql:connect("jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME",
"username", "pa$$w0rd") return sql:execute($connection, "SELECT * FROM
TABLE")
Query Plan:

  

  com.microsoft.sqlserver.jdbc.SQLServerDriver


  
jdbc:sqlserver://SQLHOST:1433;databaseName=DBNAME
username
pa$$w0rd
  
  

SELECT * FROM TABLE
  

  


*Does anyone have an idea what the problem is?*

*Any hints are welcome!*


Re: [basex-talk] Error running dba in Tomcat 9.0 with BaseX v. 9.5 and above

2021-08-26 Thread Christian Grün
Hi Kim,

Thanks for the observation.

As BaseX WebSocket support is tightly coupled with Jetty, newer WAR files
cannot be deployed with other web servers anymore (namely, Tomcat, Jboss,
possibly others). I’ve opened an issue to get this fixed in a future
release [1].

Best,
Christian

[1] https://github.com/BaseXdb/basex/issues/2037



On Wed, Aug 25, 2021 at 10:25 PM Kim Galeazzi 
wrote:

> Launching the dba application in BaseX 9.5 and above deployed on Tomcat
> 9.0 throws an error:
>
>
>
> *Exception*
>
> javax.servlet.ServletException: Servlet execution threw an exception
>
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>
> *Root Cause*
>
> java.lang.NoClassDefFoundError:
> org/eclipse/jetty/websocket/api/WebSocketAdapter
>
> java.lang.ClassLoader.defineClass1(Native Method)
>
> java.lang.ClassLoader.defineClass(ClassLoader.java:760)
>
>
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
>
> org.basex.query.func.session.SessionFn.session(SessionFn.java:31)
>
> org.basex.query.func.session.SessionGet.value(SessionGet.java:17)
>
> org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
>
> org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71)
>
> org.basex.query.expr.If.expr(If.java:181)
>
> org.basex.query.expr.If.iter(If.java:161)
>
> org.basex.query.scope.MainModule.iter(MainModule.java:97)
>
> org.basex.query.QueryContext.iter(QueryContext.java:326)
>
>
> org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84)
>
> org.basex.http.web.WebResponse.create(WebResponse.java:66)
>
> org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69)
>
> org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
>
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>
> *Root Cause*
>
> java.lang.ClassNotFoundException:
> org.eclipse.jetty.websocket.api.WebSocketAdapter
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1407)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
>
> java.lang.ClassLoader.defineClass1(Native Method)
>
> java.lang.ClassLoader.defineClass(ClassLoader.java:760)
>
>
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
>
>
> org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
>
> org.basex.query.func.session.SessionFn.session(SessionFn.java:31)
>
> org.basex.query.func.session.SessionGet.value(SessionGet.java:17)
>
> org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
>
> org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71)
>
> org.basex.query.expr.If.expr(If.java:181)
>
> org.basex.query.expr.If.iter(If.java:161)
>
> org.basex.query.scope.MainModule.iter(MainModule.java:97)
>
> org.basex.query.QueryContext.iter(QueryContext.java:326)
>
>
> org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84)
>
> org.basex.http.web.WebResponse.create(WebResponse.java:66)
>
> org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69)
>
> org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
>
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
>
>
>
> I tried adding the Ecplise websocket API jar to the lib folder without
> success. Any ideas?
>
>
>
> We rely on the RESTXQ for our implementations and find the dba web
> application very convenient for accessing the logs and managing the
> database.
>
>
>
> Thank you.
>
> 
>
> *Kim Galeazzi |* Manager, Solution Architecture, Oracle/Agile PLM
> Consulting
>
> Office: 408-680-8837 <%28408%29%20680-8837> | Mobile: 408-466-2121
> <%28408%29%20466-2121> | Campbell, CA
>
> *This email communication is considered business confidential and intended
> for the original recipient of this email only.*
>
>
>


[basex-talk] Error running dba in Tomcat 9.0 with BaseX v. 9.5 and above

2021-08-25 Thread Kim Galeazzi
Launching the dba application in BaseX 9.5 and above deployed on Tomcat 9.0 
throws an error:

Exception
javax.servlet.ServletException: Servlet execution threw an exception
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause
java.lang.NoClassDefFoundError: org/eclipse/jetty/websocket/api/WebSocketAdapter
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:760)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
org.basex.query.func.session.SessionFn.session(SessionFn.java:31)
org.basex.query.func.session.SessionGet.value(SessionGet.java:17)
org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71)
org.basex.query.expr.If.expr(If.java:181)
org.basex.query.expr.If.iter(If.java:161)
org.basex.query.scope.MainModule.iter(MainModule.java:97)
org.basex.query.QueryContext.iter(QueryContext.java:326)
org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84)
org.basex.http.web.WebResponse.create(WebResponse.java:66)
org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69)
org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
Root Cause
java.lang.ClassNotFoundException: 
org.eclipse.jetty.websocket.api.WebSocketAdapter
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1407)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:760)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2478)
org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:870)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1371)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1215)
org.basex.query.func.session.SessionFn.session(SessionFn.java:31)
org.basex.query.func.session.SessionGet.value(SessionGet.java:17)
org.basex.query.expr.ParseExpr.iter(ParseExpr.java:46)
org.basex.query.expr.ParseExpr.ebv(ParseExpr.java:71)
org.basex.query.expr.If.expr(If.java:181)
org.basex.query.expr.If.iter(If.java:161)
org.basex.query.scope.MainModule.iter(MainModule.java:97)
org.basex.query.QueryContext.iter(QueryContext.java:326)
org.basex.http.restxq.RestXqResponse.serialize(RestXqResponse.java:84)
org.basex.http.web.WebResponse.create(WebResponse.java:66)
org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:69)
org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
javax.servlet.http.HttpServlet.service(HttpServlet.java:764)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)

I tried adding the Ecplise websocket API jar to the lib folder without success. 
Any ideas?

We rely on the RESTXQ for our implementations and find the dba web application 
very convenient for accessing the logs and managing the database.

Thank you.
[cid:image001.jpg@01D799B4.AF02AC70]
Kim Galeazzi | Manager, Solution Architecture, Oracle/Agile PLM Consulting
Office: 408-680-8837 | Mobile: 
408-466-2121 | Campbell, CA
This email communication is considered business confidential and intended for 
the original recipient of this email only.



Re: [basex-talk] Error message, can this be fixed?

2021-06-21 Thread Christian Grün
Hi Roland,

It’s difficult to tell what the validator does. But I noticed that
BaseX 7.9 is used, which is more than 6 years old… Maybe you could
talk to the web seite owners and ask them to update BaseX?

Best,
Christian


On Mon, Jun 21, 2021 at 9:28 AM Roland Haarbrink  wrote:
>
> Hi,
>
>
>
> Getting this message:
>
> org.basex.core.BaseXException: Improper use? Potential bug? Your feedback is 
> welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.9 Java: 
> Oracle Corporation, 1.8.0_161 OS: Linux, amd64 Stack Trace: 
> java.lang.ArrayIndexOutOfBoundsException
>
>
>
> When using this validator:
>
> https://validatie.geostandaarden.nl/etf-webapp/testruns/start-direct
>
>
>
> Can this be fixed?
>
>
>
> Thanks
>
>
>
>
>
>
>
> URL: http://localhost:8080/etf-webapp/testruns/start-direct
>
> Exception id: EXID-06e97066-fe8f-43cd-adc5-df641b843f75
>
> de.interactive_instruments.etf.dal.basex.dao.BasexDataSource.create(BasexDataSource.java:397)
>
> de.interactive_instruments.etf.dal.basex.dao.BasexDataSource.create(BasexDataSource.java:381)
>
> de.interactive_instruments.etf.dal.basex.dao.BasexTestObjectDao.doCreate(BasexTestObjectDao.java:134)
>
> de.interactive_instruments.etf.dal.dao.AbstractTestObjectDao.create(AbstractTestObjectDao.java:89)
>
> de.interactive_instruments.etf.webapp.controller.TestObjectController.addFileTestData(TestObjectController.java:366)
>
> de.interactive_instruments.etf.webapp.controller.TestRunController.startDirect(TestRunController.java:238)
>
> sun.reflect.GeneratedMethodAccessor245.invoke(Unknown Source)
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>
> java.lang.reflect.Method.invoke(Method.java:498)
>
> org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
>
> org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
>
> org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
>
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817)
>
> org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:731)
>
> org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
>
> org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
>
> org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
>
> org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:968)
>
> org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:870)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
>
> org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:844)
>
> javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
>
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
>
> org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
>
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
>
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
>
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
>
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
>
> org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
>
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>
> java.lang.Thread.run(Thread.java:748)
>
>


[basex-talk] Error message, can this be fixed?

2021-06-21 Thread Roland Haarbrink
Hi,

 

Getting this message:

org.basex.core.BaseXException: Improper use? Potential bug? Your feedback is
welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.9
Java: Oracle Corporation, 1.8.0_161 OS: Linux, amd64 Stack Trace:
java.lang.ArrayIndexOutOfBoundsException

 

When using this validator:

https://validatie.geostandaarden.nl/etf-webapp/testruns/start-direct

 

Can this be fixed?

 

Thanks

 

 

 

URL: http://localhost:8080/etf-webapp/testruns/start-direct

Exception id: EXID-06e97066-fe8f-43cd-adc5-df641b843f75

de.interactive_instruments.etf.dal.basex.dao.BasexDataSource.create(BasexDat
aSource.java:397)

de.interactive_instruments.etf.dal.basex.dao.BasexDataSource.create(BasexDat
aSource.java:381)

de.interactive_instruments.etf.dal.basex.dao.BasexTestObjectDao.doCreate(Bas
exTestObjectDao.java:134)

de.interactive_instruments.etf.dal.dao.AbstractTestObjectDao.create(Abstract
TestObjectDao.java:89)

de.interactive_instruments.etf.webapp.controller.TestObjectController.addFil
eTestData(TestObjectController.java:366)

de.interactive_instruments.etf.webapp.controller.TestRunController.startDire
ct(TestRunController.java:238)

sun.reflect.GeneratedMethodAccessor245.invoke(Unknown Source)

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:43)

java.lang.reflect.Method.invoke(Method.java:498)

org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(Invoc
ableHandlerMethod.java:221)

org.springframework.web.method.support.InvocableHandlerMethod.invokeForReque
st(InvocableHandlerMethod.java:136)

org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandle
rMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)

org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerA
dapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:817)

org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerA
dapter.handleInternal(RequestMappingHandlerAdapter.java:731)

org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.hand
le(AbstractHandlerMethodAdapter.java:85)

org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServl
et.java:959)

org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServle
t.java:893)

org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkSer
vlet.java:968)

org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.jav
a:870)

javax.servlet.http.HttpServlet.service(HttpServlet.java:648)

org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.ja
va:844)

javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:292)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:207)

org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:240)

org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:207)

org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:212)

org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:106)

org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:502)

org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141
)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)

org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogVa
lve.java:616)

org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:88)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)

org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Proce
ssor.java:1095)

org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(Abstrac
tProtocol.java:672)

org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.jav
a:1500)

org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:
1456)

java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:11
49)

java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:6
24)

org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.ja
va:61)

java.lang.Thread.run(Thread.java:748)

 



Re: [basex-talk] Error with full-text and fuzzy query

2021-06-07 Thread Christian Grün
cc to the list…

Christian Grün  schrieb am Mo., 7. Juni 2021,
13:50:

> Thanks, Tim, that was helpful. It turned out that the index contains
> an unusually high number of similar tokens for one search terms in
> your query:
>
> faraʼid : 13709 similar terms
> muhammad : 131 similar terms
> siraj : 50 similar terms
> ...
>
> A new snapshot with a bug fix is available, in which similar terms are
> collected non-recursively [1]. I’d have wished that your search was
> evaluated faster (it takes around 6 seconds on machine) but at least
> it succeeds. I’ll have some more thoughts.
>
> Cheers,
> Christian
>
> [1] https://files.basex.org/releases/latest/
>
>
>
> On Mon, Jun 7, 2021 at 1:17 PM Tim Thompson  wrote:
> >
> > Thank you, Christian. If it's still helpful, here is a link to download
> the document I am using as my full-text index.
> >
> > All best,
> > Tim
> >
> >
> > --
> > Tim A. Thompson
> > Metadata Librarian
> > Yale University Library
> >
> > On Mon, Jun 7, 2021 at 6:19 AM Christian Grün 
> wrote:
> >>
> >> I think I managed to build up a bug scenario that should resemble
> >> yours [1]: If thousands of similar terms are found, the results cannot
> >> be recursively joined anymore.
> >>
> >> [1] https://github.com/BaseXdb/basex/issues/2014
> >>
> >>
> >>
> >> On Mon, Jun 7, 2021 at 10:28 AM Christian Grün
> >>  wrote:
> >> >
> >> > Hi Tim,
> >> >
> >> > I’m still trying to get this reproduced.
> >> >
> >> > The error is caused by excessive recursive functions call. Out of
> >> > interest, could you try to increase the size of the Java Stack Trace
> >> > and see if the error persists? This can be achieved by assigning a
> >> > large value to the JVM via the Xss flag [1]. You could e.g. add
> >> > -Xss64m to the BASEX_JVM variable in the BaseX start scripts [2].
> >> >
> >> > Internal notes… If yes, we might be confronted with an infinite loop.
> >> > If no, we should try to rewrite a recursive index lookup to an
> >> > iterative one.
> >> >
> >> > If your data is not confidential, feel free to provide me with a
> download link.
> >> >
> >> > Cheers,
> >> > Christian
> >> >
> >> > [1]
> https://stackoverflow.com/questions/3700459/how-to-increase-the-java-stack-size
> >> > [2] https://docs.basex.org/wiki/Start_Scripts
> >> >
> >> >
> >> >
> >> > On Fri, Jun 4, 2021 at 11:03 PM Tim Thompson 
> wrote:
> >> > >
> >> > > Thanks, Christian. The rest of the stack trace was just many lines
> of "at
> org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)" until
> the end:
> >> > >
> >> > > [qtp1546693040-47] WARN
> org.eclipse.jetty.server.handler.ErrorHandler - Error page too large: 500
> java.lang.StackOverflowError Request(POST //
> 10.5.157.229:10214/dba/query-eval)@7dcadc62
> >> > > [qtp1546693040-47] INFO
> org.eclipse.jetty.server.handler.ErrorHandler - Disabling showsStacks for
> ErrorPageErrorHandler@53032c30{STARTED}
> >> > >
> >> > > Best regards,
> >> > > Tim
> >> > >
> >> > >
> >> > > --
> >> > > Tim A. Thompson
> >> > > Metadata Librarian
> >> > > Yale University Library
> >> > >
> >> > > On Fri, Jun 4, 2021 at 1:30 PM Christian Grün <
> christian.gr...@gmail.com> wrote:
> >> > >>
> >> > >> Hi Tim,
> >> > >>
> >> > >> > [qtp1546693040-47] WARN org.eclipse.jetty.server.HttpChannel -
> /dba/query-eval
> >> > >> > java.lang.StackOverflowError
> >> > >> > at
> org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:73)
> >> > >> > at
> org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)
> >> > >>
> >> > >> Could you share some more lines of the stack trace with us?
> >> > >>
> >> > >> Thanks in advance
> >> > >> Christian
>


Re: [basex-talk] Error with full-text and fuzzy query

2021-06-07 Thread Christian Grün
cc to the list (2)…

Christian Grün  schrieb am Mo., 7. Juni 2021,
15:47:

> …and another snapshot for you: modifier letters [1] will now be
> regarded as diacritical characters, and queries such as…
>
> tokenize('faraʼid faraid Birkan')[. contains text 'faraʼid' using fuzzy]
>
> …will only regard the first two terms as similar. As a consequence,
> fuzzy queries for terms with modifiers should get a lot faster.
>
> You’ll need to recreate your full-text index to take full advantage of the
> fix.
>
> [1] https://de.wikipedia.org/wiki/Unicodeblock_Spacing_Modifier_Letters
>
>
>
> On Mon, Jun 7, 2021 at 2:00 PM Christian Grün 
> wrote:
> >
> > > Out of curiosity, is there a way to access those individual term
> similarity statistics via XQuery?
> >
> > I assume there is no straightforward way, but you can check the first
> > results of a full-text query:
> >
> >   ft:search('your-db', 'faraʼid', map { "fuzzy": true() })[position() <
> 10]
> >
> > And I noticed that due to the modifier letter (ʼ), many non-similar
> > results are returned as well. I’ve raised another issue to track this
> > down [1].
> >
> > [1] https://github.com/BaseXdb/basex/issues/2015
>


Re: [basex-talk] Error with full-text and fuzzy query

2021-06-07 Thread Christian Grün
I think I managed to build up a bug scenario that should resemble
yours [1]: If thousands of similar terms are found, the results cannot
be recursively joined anymore.

[1] https://github.com/BaseXdb/basex/issues/2014



On Mon, Jun 7, 2021 at 10:28 AM Christian Grün
 wrote:
>
> Hi Tim,
>
> I’m still trying to get this reproduced.
>
> The error is caused by excessive recursive functions call. Out of
> interest, could you try to increase the size of the Java Stack Trace
> and see if the error persists? This can be achieved by assigning a
> large value to the JVM via the Xss flag [1]. You could e.g. add
> -Xss64m to the BASEX_JVM variable in the BaseX start scripts [2].
>
> Internal notes… If yes, we might be confronted with an infinite loop.
> If no, we should try to rewrite a recursive index lookup to an
> iterative one.
>
> If your data is not confidential, feel free to provide me with a download 
> link.
>
> Cheers,
> Christian
>
> [1] 
> https://stackoverflow.com/questions/3700459/how-to-increase-the-java-stack-size
> [2] https://docs.basex.org/wiki/Start_Scripts
>
>
>
> On Fri, Jun 4, 2021 at 11:03 PM Tim Thompson  wrote:
> >
> > Thanks, Christian. The rest of the stack trace was just many lines of "at 
> > org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)" until 
> > the end:
> >
> > [qtp1546693040-47] WARN org.eclipse.jetty.server.handler.ErrorHandler - 
> > Error page too large: 500 java.lang.StackOverflowError Request(POST 
> > //10.5.157.229:10214/dba/query-eval)@7dcadc62
> > [qtp1546693040-47] INFO org.eclipse.jetty.server.handler.ErrorHandler - 
> > Disabling showsStacks for ErrorPageErrorHandler@53032c30{STARTED}
> >
> > Best regards,
> > Tim
> >
> >
> > --
> > Tim A. Thompson
> > Metadata Librarian
> > Yale University Library
> >
> > On Fri, Jun 4, 2021 at 1:30 PM Christian Grün  
> > wrote:
> >>
> >> Hi Tim,
> >>
> >> > [qtp1546693040-47] WARN org.eclipse.jetty.server.HttpChannel - 
> >> > /dba/query-eval
> >> > java.lang.StackOverflowError
> >> > at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:73)
> >> > at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)
> >>
> >> Could you share some more lines of the stack trace with us?
> >>
> >> Thanks in advance
> >> Christian


Re: [basex-talk] Error with full-text and fuzzy query

2021-06-07 Thread Christian Grün
Hi Tim,

I’m still trying to get this reproduced.

The error is caused by excessive recursive functions call. Out of
interest, could you try to increase the size of the Java Stack Trace
and see if the error persists? This can be achieved by assigning a
large value to the JVM via the Xss flag [1]. You could e.g. add
-Xss64m to the BASEX_JVM variable in the BaseX start scripts [2].

Internal notes… If yes, we might be confronted with an infinite loop.
If no, we should try to rewrite a recursive index lookup to an
iterative one.

If your data is not confidential, feel free to provide me with a download link.

Cheers,
Christian

[1] 
https://stackoverflow.com/questions/3700459/how-to-increase-the-java-stack-size
[2] https://docs.basex.org/wiki/Start_Scripts



On Fri, Jun 4, 2021 at 11:03 PM Tim Thompson  wrote:
>
> Thanks, Christian. The rest of the stack trace was just many lines of "at 
> org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)" until 
> the end:
>
> [qtp1546693040-47] WARN org.eclipse.jetty.server.handler.ErrorHandler - Error 
> page too large: 500 java.lang.StackOverflowError Request(POST 
> //10.5.157.229:10214/dba/query-eval)@7dcadc62
> [qtp1546693040-47] INFO org.eclipse.jetty.server.handler.ErrorHandler - 
> Disabling showsStacks for ErrorPageErrorHandler@53032c30{STARTED}
>
> Best regards,
> Tim
>
>
> --
> Tim A. Thompson
> Metadata Librarian
> Yale University Library
>
> On Fri, Jun 4, 2021 at 1:30 PM Christian Grün  
> wrote:
>>
>> Hi Tim,
>>
>> > [qtp1546693040-47] WARN org.eclipse.jetty.server.HttpChannel - 
>> > /dba/query-eval
>> > java.lang.StackOverflowError
>> > at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:73)
>> > at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)
>>
>> Could you share some more lines of the stack trace with us?
>>
>> Thanks in advance
>> Christian


Re: [basex-talk] Error with full-text and fuzzy query

2021-06-04 Thread Tim Thompson
Thanks, Christian. The rest of the stack trace was just many lines of "at
org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)" until
the end:

[qtp1546693040-47] WARN org.eclipse.jetty.server.handler.ErrorHandler -
Error page too large: 500 java.lang.StackOverflowError Request(POST //
10.5.157.229:10214/dba/query-eval)@7dcadc62
[qtp1546693040-47] INFO org.eclipse.jetty.server.handler.ErrorHandler -
Disabling showsStacks for ErrorPageErrorHandler@53032c30{STARTED}

Best regards,
Tim


--
Tim A. Thompson
Metadata Librarian
Yale University Library

On Fri, Jun 4, 2021 at 1:30 PM Christian Grün 
wrote:

> Hi Tim,
>
> > [qtp1546693040-47] WARN org.eclipse.jetty.server.HttpChannel -
> /dba/query-eval
> > java.lang.StackOverflowError
> > at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:73)
> > at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)
>
> Could you share some more lines of the stack trace with us?
>
> Thanks in advance
> Christian
>


Re: [basex-talk] Error with full-text and fuzzy query

2021-06-04 Thread Christian Grün
Hi Tim,

> [qtp1546693040-47] WARN org.eclipse.jetty.server.HttpChannel - /dba/query-eval
> java.lang.StackOverflowError
> at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:73)
> at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)

Could you share some more lines of the stack trace with us?

Thanks in advance
Christian


[basex-talk] Error with full-text and fuzzy query

2021-06-04 Thread Tim Thompson
Hello,

I have a full-text index defined on a database with 21,936,670 entries. I'm
hitting a stack overflow error when I try to query the following
(normalized) string with a fuzzy query:

"sajawandi, siraj al-din muhammad ibn muhammad, active 12th century.
faraʼid al-sirajiyah"

The index entries look like this:

http://id.loc.gov/authorities/names/n2008037847;>
  Sajāwandī, Sirāj al-Dīn Muḥammad ibn Muḥammad, active 12th century.
Farāʼiḍ al-Sirājīyah
  12th cent.


If I create a new DB ("ftindex-test") with only that one entry and try the
following lookup, it works:

ft:search(
  "ftindex-test",
  "sajawandi, siraj al-din muhammad ibn muhammad, active 12th century.
faraʼid al-sirajiyah"
  , map {"mode": "phrase", "content": "entire", "fuzzy": true()}
)/..

However, if I try the same query against the full index (with ~22 million
entries), it fails with a stack overflow error:

[qtp1546693040-47] WARN org.eclipse.jetty.server.HttpChannel -
/dba/query-eval
java.lang.StackOverflowError
at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:73)
at org.basex.index.query.FTIndexIterator$2.pos(FTIndexIterator.java:74)
...

If I remove the "fuzzy" parameter, the query does work against the full
index. Is this a bug, a known limitation here, or something that I'm
missing?

Thanks in advance,
Tim


--
Tim A. Thompson
Metadata Librarian
Yale University Library


Re: [basex-talk] error "lock file does not exist" after "add" command

2021-01-13 Thread Thomas Spitaler

Hi Christian,

we could solve the issue: a machine was cloned for test purposes without 
me knowing about it. We’re using NFS to mount the storage that hosts 
the BaseX data directly, so there were two BaseX server processes 
accessing the same files.


Thanks for your help!

Kind regards,
Thomas

On 8 Jan 2021, at 9:24, Christian Grün wrote:


Hi Thomas,


$ xquery db:optimize("cap10_cap_store_prod")
[db:lock] Database 'cap10_cap_store_prod' is currently opened by 
another process.


I did not found any upd.basex file in the data directory, so I assume 
it is a database lock.


Exactly. Usually, this error occurs only if you have multiple
independent BaseX instances accessing the data at the same time
(independent means that the instances are no clients who communicate
with a single database server). If the error does not disappear after
a restart of your system, and if you have ensured that no other
BaseX/Java process is running simultaneously, you could…

1. download a fresh and most recent version of BaseX,
2. copy the challenging database into that instance,
3. start BaseX in debugging mode in the console (basex -d),
4. call OPTIMIZE and, if it fails,
5. share the command-line output with us.

We have to assume that this could possibly happen again and need a 
strategy to deal with it.


I hope it doesn’t (I didn’t encounter similar problems in our
productive environments so far). If a server is shut down
ungracefully, we cannot promise that your data will remain to be
intact, though. Do you have some more information on what happened
that particular day?

It’s generally advisable to back up your data in regular intervals.
You can e.g. register Job Services for that [1].

Hope this helps
Christian

[1] https://docs.basex.org/wiki/Jobs_Module#Services


Re: [basex-talk] error "lock file does not exist" after "add" command

2021-01-08 Thread Christian Grün
Hi Thomas,

> $ xquery db:optimize("cap10_cap_store_prod")
> [db:lock] Database 'cap10_cap_store_prod' is currently opened by another 
> process.
>
> I did not found any upd.basex file in the data directory, so I assume it is a 
> database lock.

Exactly. Usually, this error occurs only if you have multiple
independent BaseX instances accessing the data at the same time
(independent means that the instances are no clients who communicate
with a single database server). If the error does not disappear after
a restart of your system, and if you have ensured that no other
BaseX/Java process is running simultaneously, you could…

1. download a fresh and most recent version of BaseX,
2. copy the challenging database into that instance,
3. start BaseX in debugging mode in the console (basex -d),
4. call OPTIMIZE and, if it fails,
5. share the command-line output with us.

> We have to assume that this could possibly happen again and need a strategy 
> to deal with it.

I hope it doesn’t (I didn’t encounter similar problems in our
productive environments so far). If a server is shut down
ungracefully, we cannot promise that your data will remain to be
intact, though. Do you have some more information on what happened
that particular day?

It’s generally advisable to back up your data in regular intervals.
You can e.g. register Job Services for that [1].

Hope this helps
Christian

[1] https://docs.basex.org/wiki/Jobs_Module#Services


Re: [basex-talk] error "lock file does not exist" after "add" command

2021-01-07 Thread Thomas Spitaler

Hi Christian,

thanks a lot for your advice.

Following brought some further insights.

I backed up the database and then tried to optimize it, without and with 
the all option.


However, this led to the following error message (prompt shown as $):

```
$ xquery db:optimize("cap10_cap_store_prod")
[db:lock] Database 'cap10_cap_store_prod' is currently opened by another 
process.

```

However, this database shouldn’t be used by any process any longer. We 
created a new one with a different name.


`SHOW SESSIONS` did not reveal any sessions.

Reading the BaseX 
(https://docs.basex.org/wiki/Transaction_Management#File-System_Locks) 
we found out that there are two kinds of file-system locks:


1. Update Operations
2. Database Locks

I did not found any upd.basex file in the data directory, so I assume it 
is a database lock.


Is there any way to remove this lock, like a force option of the 
optimize command or a dedicated command?


Is it possible to force close/kill the dangling session/process? As I 
said I’m pretty sure there isn’t any process accessing this 
database, but still the database is in the locked state. Probably the 
process and/or db was shut down in an ungraceful way. How can such a 
situation be handled? We have to assume that this could possibly happen 
again and need a strategy to deal with it.


I could also pin down the moment when it happened in the log file. There 
is a strange character sequence in the log file, and after that all the 
attempted operations fail:


```
103537 15:46:02.721127.0.0.1:33919 admin   OK  Query executed in 
3.36 ms.  3.42 ms
 103538 15:46:02.724127.0.0.1:40847 admin   OK  Query executed 
in 9.32 ms.  9.4 ms
 103539 15:46:02.956127.0.0.1:40847 admin   REQUEST XQUERY 
db:open('cap10_cap_store_prod', 
'dfade903-4365-44ce-a0dc-abbe474a7daa.cap')  0.08 ms
 103540 15:46:02.962127.0.0.1:40847 admin   OK  Query executed 
in 6.07 ms.  6.15 ms
 103541 
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@16:13:26.567 
   127.0.0.1:40847 admin   REQUEST ADD TO 
003843e7-47ef-4a58-be8b-b7d6e665bbb1.cap [...]   0.11 ms
 103542 16:13:26.583127.0.0.1:40847 admin   ERROR   Improper use? 
Potential bug? Your feedback is welcome: Contact: 
basex-talk@mailman.uni-konstanz.de Version: BaseX 9.0.1 Java: Debian, 
11.0.9 OS: Linux, amd64 Stack Trace: java.lang.RuntimeException: 
cap10_cap_store_prod: lock file does not exist. at 
org.basex.util.Util.notExpected(Util.java:61) at 
org.basex.data.DiskData.finishUpdate(DiskData.java:246) at 
org.basex.core.cmd.ACreate.update(ACreate.java:97) at 
org.basex.core.cmd.Add.run(Add.java:56) at 
org.basex.core.Command.run(Command.java:257) at 
org.basex.core.Command.execute(Command.java:93) at 
org.basex.core.Command.execute(Command.java:116) at 
org.basex.server.ClientListener.execute(ClientListener.java:343) at 
org.basex.server.ClientListener.add(ClientListener.java:314) at 
org.basex.server.ClientListener.run(ClientListener.java:96)   15.75 ms


```

The error `admin ERROR Improper use? Potential bug?`keeps repeating from 
then on. Do you see anything unusual, or can any insights be gained from 
these logs?


Any help in solving this issue is greatly appreciated.

Kind regards,
Thomas

On 

Re: [basex-talk] error "lock file does not exist" after "add" command

2021-01-04 Thread Christian Grün
Hi Thomas,

Thanks for your mail.

As you have already reported back to us, it seems to be an
inconsistency in your database that seems to trigger the exception.
It’s true that the INSPECT cannot catch all possible inconsistencies
in a database. You can try to…

1. export all files from your database and import them in the new instance,
2. optimize your database
3. fully optimize your database (with the ALL option). Just to be
sure, it may be wise to create a backup before the optimization.

If you have some vague idea of when the bug happened first, you could
scan the database logs from that period of time and the days before.

I didn’t encounter a similar error in the recent past, so maybe it was
caused by a previous version of BaseX. It’s always a good idea to
switch to the latest version. Do you remember which version you
started with?

Best,
Christian


On Wed, Dec 30, 2020 at 2:26 PM Thomas Spitaler
 wrote:
>
> Hi,
>
> in one of our projects we are using BaseX. So far we are very happy with
> our choice, but recently we got an error that we could not fix. The only
> solution that worked was to create a new, empty database.
>
> When trying to add a document to the database, we get an exception and a
> message „lock file does not exist“:
>
> $ open cap10_cap_store_prod
> Database 'cap10_cap_store_prod' was opened in 219.99 ms.
>
> $ add /home/thomas/tmp/test.xml
> Improper use? Potential bug? Your feedback is welcome:
> Contact: basex-talk@mailman.uni-konstanz.de
> Version: BaseX 9.0.1
> Java: Debian, 11.0.9
> OS: Linux, amd64
> Stack Trace:
> java.lang.RuntimeException: cap10_cap_store_prod: lock file does not
> exist.
>  at org.basex.util.Util.notExpected(Util.java:61)
>  at org.basex.data.DiskData.finishUpdate(DiskData.java:246)
>  at org.basex.core.cmd.ACreate.update(ACreate.java:97)
>  at org.basex.core.cmd.Add.run(Add.java:56)
>  at org.basex.core.Command.run(Command.java:257)
>  at org.basex.core.Command.execute(Command.java:93)
>  at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
>  at org.basex.api.client.Session.execute(Session.java:36)
>  at org.basex.core.CLI.execute(CLI.java:92)
>  at org.basex.core.CLI.execute(CLI.java:76)
>  at org.basex.BaseX.console(BaseX.java:196)
>  at org.basex.BaseX.(BaseX.java:171)
>  at org.basex.BaseX.main(BaseX.java:42)
>
>
> Which lock file is the error referring to? Can we create it manually to
> make it work again?
>
> The error only happens in the database that we have been using so far
> (cap10_cap_store_prod). After creating and using a new one
> (cap10_cap_store_prod2) the problem does not occur. Here is the output
> of running list on the database:
>
> $ list
>
> Name   Resources  SizeInput Path
>
> cap10_cap_store_prod   233387 1583797639
> cap10_cap_store_prod2  2411912414
> testdb 1  4611
>
> 3 database(s).
>
> Did we hit a size limit of BaseX? I checked the server and it has enough
> free disk space and free inodes available.
>
> Some more background info:
>
> The system runs on a cluster of servers. BaseX runs on one of them,
> bound to port 1984. The other nodes in the cluster connect to the
> BaseX-Server via the network. In my understanding, this type of
> concurrency is supported by BaseX.
>
> The software on the nodes is implemented in Elixir. We wrote our own
> Elixir client library that is a thin wrapper around
> https://github.com/zadean/basexerl, an existing open source Erlang
> client library for BaseX.
>
> Our Elixir client library keeps open a pool of connections to the BaseX
> server. So far and until we encountered the above error everything
> worked perfectly. Also, after creating a new database everything works
> fine again.
>
> This error also occurs after shutting down all the nodes that connect to
> our BaseX instance. We checked using the lsof command and there are no
> connections open to the database other then the client we use to
> reproduce the error.
>
> Any help would be greatly appreciated!
>
> Kind regards,
> Thomas
>
> Kind regards,
> Thomas
>


Re: [basex-talk] error "lock file does not exist" after "add" command

2021-01-03 Thread Thomas Spitaler

Hi Zack,

thanks for your message - and the awesome basexerl lib :)

The error seems to occur regardless of the client that is used to 
connect, whenever an attempt is made to add a document to the database. 
It happens even in the basex CLI client.


The database seems to be in a corrupted state, even though running 
checks (`INSPECT`) doesn’t report any inconsistencies.


Since the database is mainly used as an archive for XML docs and as a 
query processor that is only invoked shortly after XML docs have been 
added I could „solve“ the problem by creating a new, empty database. 
Of course this will also reset the archive and is not a satisfactory 
solution since we didn’t change anything in the code and setup, and 
the problem could happen again anytime.


There are no clients connected to the old database (checked using `SHOW 
SESSIONS`), and the problem still occurs.


The issue does not occur in the new database. Before the error happened, 
the production system was stable for about half a year. It didn’t 
happen during development either.


This means that I cannot easily provide instructions to reproduce the 
problem. We’ll see if the problem happens again when we hit the same 
number of XML documents. I’ll also try to reproduce the problem by 
implementing some tests that simulate high load and create a large 
number of XML documents.


Maybe it is a problem related to the server environment (permissions, 
max. file size etc.), although I couldn’t see any exceedingly large 
file in the `data` directory, and a system like BaseX should easily cope 
with ~500.000 XML documents.


There was a GitHub issue regarding a "lock file does not exist" 
(https://github.com/BaseXdb/basex/issues/702), but it happened on 
`db:optimize` - so under different circumstances - and has already been 
closed.


Anyway, I contacted this mailing list since the error message hinted at 
„Improper use? Potential bug? Your feedback is welcome“.


Thanks for your efforts, Zack!

I will report back if I discover anything new regarding this problem.

Any hints or suggestions on what I could do to solve the problem would 
be very welcome.


Thanks,
Thomas

On 2 Jan 2021, at 19:07, Zachary N. Dean wrote:


Hi Thomas,



Author of the Erlang client here. :-)



I haven't seen this before, but I haven't used pooled connections 
either.




Is there a minimal example for the commands that you run that I could 
use to

reproduce this and ensure it's not a problem in the client?



Thanks,



Zack





[basex-talk] error "lock file does not exist" after "add" command

2021-01-02 Thread Zachary N. Dean
Hi Thomas,

 

Author of the Erlang client here. :-)

 

I haven't seen this before, but I haven't used pooled connections either.

 

Is there a minimal example for the commands that you run that I could use to
reproduce this and ensure it's not a problem in the client?

 

Thanks,

 

Zack



[basex-talk] error "lock file does not exist" after "add" command

2020-12-30 Thread Thomas Spitaler

Hi,

in one of our projects we are using BaseX. So far we are very happy with 
our choice, but recently we got an error that we could not fix. The only 
solution that worked was to create a new, empty database.


When trying to add a document to the database, we get an exception and a 
message „lock file does not exist“:


$ open cap10_cap_store_prod
Database 'cap10_cap_store_prod' was opened in 219.99 ms.

$ add /home/thomas/tmp/test.xml
Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 9.0.1
Java: Debian, 11.0.9
OS: Linux, amd64
Stack Trace:
java.lang.RuntimeException: cap10_cap_store_prod: lock file does not 
exist.

at org.basex.util.Util.notExpected(Util.java:61)
at org.basex.data.DiskData.finishUpdate(DiskData.java:246)
at org.basex.core.cmd.ACreate.update(ACreate.java:97)
at org.basex.core.cmd.Add.run(Add.java:56)
at org.basex.core.Command.run(Command.java:257)
at org.basex.core.Command.execute(Command.java:93)
at org.basex.api.client.LocalSession.execute(LocalSession.java:132)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:92)
at org.basex.core.CLI.execute(CLI.java:76)
at org.basex.BaseX.console(BaseX.java:196)
at org.basex.BaseX.(BaseX.java:171)
at org.basex.BaseX.main(BaseX.java:42)


Which lock file is the error referring to? Can we create it manually to 
make it work again?


The error only happens in the database that we have been using so far 
(cap10_cap_store_prod). After creating and using a new one 
(cap10_cap_store_prod2) the problem does not occur. Here is the output 
of running list on the database:


$ list

Name   Resources  SizeInput Path

cap10_cap_store_prod   233387 1583797639
cap10_cap_store_prod2  2411912414
testdb 1  4611

3 database(s).

Did we hit a size limit of BaseX? I checked the server and it has enough 
free disk space and free inodes available.


Some more background info:

The system runs on a cluster of servers. BaseX runs on one of them, 
bound to port 1984. The other nodes in the cluster connect to the 
BaseX-Server via the network. In my understanding, this type of 
concurrency is supported by BaseX.


The software on the nodes is implemented in Elixir. We wrote our own 
Elixir client library that is a thin wrapper around 
https://github.com/zadean/basexerl, an existing open source Erlang 
client library for BaseX.


Our Elixir client library keeps open a pool of connections to the BaseX 
server. So far and until we encountered the above error everything 
worked perfectly. Also, after creating a new database everything works 
fine again.


This error also occurs after shutting down all the nodes that connect to 
our BaseX instance. We checked using the lsof command and there are no 
connections open to the database other then the client we use to 
reproduce the error.


Any help would be greatly appreciated!

Kind regards,
Thomas

Kind regards,
Thomas



[basex-talk] Error: Stopped at ., 1/20: [FODC0002] Resource 'C:/Srikumar/Software/BaseX/BaseX941/basex/bin/6301904f80000114/0601904f80007547.xml' does not exist.

2020-08-18 Thread Srikumar Choudhury
Hi Christian,
Why I am getting  below error message, even though 
0601904f80007547.xml file exist in database. if we will open the corresponding 
database using basexgui.bat(i.e., open "JunitDocbaseDB" database in GUI), then 
xqPreparedExpr.executeQuery() java api is returning proper 0601904f80007547.xml 
data(see below log), otherwise throwing same below error message.

How I can resolve this issue or it is bug?

  BXCE001 - Stopped at ., 1/20:
[FODC0002] Resource 
'C:/Srikumar/Software/BaseX/BaseX941/basex/bin/6301904f8114/0601904f80007547.xml'
 does not exist.


Open basex.bat:
=
> XQUERY db:open('JunitDocbaseDB', '6301904f8114/0601904f80007547.xml')


  

  

  
  

  

Query executed in 12.59 ms.

> XQUERY for $article in doc('6301904f8114/0601904f80007547.xml') return 
> $article
Stopped at ., 1/20:
[FODC0002] Resource 
'C:/Srikumar/Software/BaseX/BaseX941/basex/bin/6301904f8114/0601904f80007547.xml'
 does not exist.

Run same xquery from java program:
==
XQPreparedExpression xqPreparedExpr = null;
XQResultSequence resultSeq = null;
String xQuery = "for $article in doc('6301904f8114/0601904f80007547.xml') 
return $article";
xqPreparedExpr = m_conn.prepareExpression(xQuery);
resultSeq = xqPreparedExpr.executeQuery();

Log:

[13:17:10.034] TRACE: XQConnection-1.prepareExpression(String) invoked, with 
the raw XQuery of: for $article in doc('6301904f8114/0601904f80007547.xml') 
return $article
[13:17:10.034] TRACE: XQConnection-1.prepareExpression(String, XQStaticContext) 
invoked, with the raw XQuery of: for $article in 
doc('6301904f8114/0601904f80007547.xml') return $article
[13:17:10.035] TRACE: XQPreparedExpression-1.executeQuery() invoked, with the 
raw XQuery of: for $article in doc('6301904f8114/0601904f80007547.xml') 
return $article
[13:17:10.036] TRACE: XQPreparedExpression-1.executeQuery(), raw XQuery 
resolved to: for $article in doc('6301904f8114/0601904f80007547.xml') 
return $article
javax.xml.xquery.XQException:
  BXCE001 - Stopped at ., 1/20:
[FODC0002] Resource 
'C:/Srikumar/Software/BaseX/BaseX941/basex/bin/6301904f8114/0601904f80007547.xml'
 does not exist.

Run same xquery using above same java program:(after opening basexgui.bat and 
open "JunitDocbaseDB" database in GUI)
==

log:

[13:22:49.313] TRACE: XQConnection-2.prepareExpression(String) invoked, with 
the raw XQuery of: for $article in doc('6301904f8114/0601904f80007547.xml') 
return $article
[13:22:49.313] TRACE: XQConnection-2.prepareExpression(String, XQStaticContext) 
invoked, with the raw XQuery of: for $article in 
doc('6301904f8114/0601904f80007547.xml') return $article
[13:22:49.315] TRACE: XQPreparedExpression-1.executeQuery() invoked, with the 
raw XQuery of: for $article in doc('6301904f8114/0601904f80007547.xml') 
return $article
[13:22:49.315] TRACE: XQPreparedExpression-1.executeQuery(), raw XQuery 
resolved to: for $article in doc('6301904f8114/0601904f80007547.xml') 
return $article
[13:22:49.318] DEBUG: XQPreparedExpression-1.close() invoked.
Finished executing xquery with query
Start iterating through the xquery results for query
0 Result : 

  

  

  
  

  


Thanks,
Srikumar


Re: [basex-talk] Error: Stopped at ., 1/20: [FODC0002] Resource 'C:/Srikumar/Software/BaseX/BaseX941/basex/bin/6301904f80000114/0601904f80007547.xml' does not exist.

2020-08-18 Thread Christian Grün
> > XQUERY for $article in doc('6301904f8114/0601904f80007547.xml') return 
> > $article

Did you try db:open ?


[basex-talk] Error in the text for the server protocol?

2020-04-16 Thread Ben Engbers
Hi Michael,

I only noticed today that in the server procol
(https://docs.basex.org/wiki/Server_Protocol) there are 2 different
instructions for adding a new resource.

On page 3:
ADD \09 {name} {path} {input}

On page 6:
void add(String path, InputStream input)

I has been pure luck that I mixed both instructions. I have implemented
ADD as \09 {path} {input} and that works perfectly.
Session$Add("Test.xml", "Content 1") adds
resource Test.xml with the xml as content.

Meanwhile it is very easy for me to change the instructions that are
send to the server so I tried to add {name} to the ADD command. That
results in errors.

My guess is that you should use either {name} or {path} and that ADD
only works on the database  in use. Is that correct?

Cheers,
Ben


Re: [basex-talk] Error from function-name(request:query#0): only from RESTXQ, not REST context.

2019-08-08 Thread Christian Grün
Hi Steven,

> { request:query( ), function-name(request:query#0)}
>
> And I see that what happens is that it’s  the latter 
> function-name(request:query#0) that is generating an error, but only when 
> there is no query string in my request.

Thanks for the observation. This was due to a little bug in our
function signatures (request:query was defined to always return a
string). I have fixed this in the new snapshot [1].

It’s definitely a good idea to switch to RESTXQ. The usual way to
access query parameters is to use the %rest:query-param annotation
(see [2] for an example). If you don’t know the names of the
parameters in advance, you’ll indeed need to access the query
parameter string and process it manually.

Best,
Christian

[1] http://files.basex.org/releases/latest/
[2] http://docs.basex.org/wiki/RESTXQ#Query_Parameters


[basex-talk] Error from function-name(request:query#0): only from RESTXQ, not REST context.

2019-08-06 Thread Majewski, Steven Dennis (sdm7g)

I’ve been learning how to use the BaseX webapp, and below is one of the first 
test scripts for the REST interface I wrote.
No problems with this script. 


import module namespace request = "http://exquery.org/ns/request;;

declare namespace output = "http://www.w3.org/2010/xslt-xquery-serialization;;
declare option output:omit-xml-declaration "no";
declare option output:method "xhtml";
(: http://docs.basex.org/wiki/XQuery_3.0#Serialization  :)

(: 
declare variable $contains := 
try { request:parameter( 'contains' ) }
catch basex:http { '' }; 

 Simpler to use implicit assignment: 
http://docs.basex.org/wiki/REST#Assigning_Variables
"All query parameters that have not been processed before will be treated as 
variable assignments" 
:)

declare variable $contains as xs:string external := "";
declare function local:f0line( $f ) as node() {
  (: build a list item with function name and function values :)I
  {fn:function-name($f)}:{$f()}
};

declare variable $CTX := try { . }  catch err:XPDY0002 { () }; 
declare variable $DB := try { db:name( $CTX[1] ) } catch err:XPTY0004 { "" };
(: Could be, if ():  [XPTY0004] node() expected, empty sequence found. 
   but not sure if that's the only possible case.  :)

test

Database: { $DB }
Context documents (.)

{ for $doc in $CTX return {base-uri($doc)} }





HTTP Request

  { for $f in ( request:method#0, request:scheme#0, request:hostname#0, 
request:port#0,
   request:path#0, request:query#0, request:uri#0, 
request:context-path#0, request:address#0, 
   request:remote-hostname#0, request:remote-address#0, 
request:remote-port#0 ) 
  return local:f0line($f) } 



Request Parameters:

{ for $param in request:parameter-names() return 
{$param}:{request:parameter($param)} }



Headers

{ for $header in request:header-names() return 
  {$header}:{request:header($header)} }



Cookies

 { for $cookie in request:cookie-names() return 
  {$cookie}:{request:cookie($cookie)} }



XSLT

xslt:processor:  { xslt:processor()},  xslt:version: { 
xslt:version()}





I’m now trying to learn  RESTXQ programming, so I was trying to do the same 
sort of thing from a RESTXQ module. 

I was getting an error from the line where  (: request:query#0, :)   is now 
commented out, and added the line:

{ request:query( ), function-name(request:query#0)}

And I see that what happens is that it’s  the latter 
function-name(request:query#0) that is generating an error, but only when there 
is no query string in my request.  An empty query string, i.e. 
“http://localhost/basex/test? ”  , for example, 
works. But “http://localhost/basex/test   returns:

Stopped at /usr/local/tomcat/webapps/basex/test.xqm, 33/66:
[XPTY0004] Cannot convert empty-sequence() to xs:string: ().

I assume this has something to do with how RESTXQ processes form and request 
parameters, and I probably don’t actually need to do it this way, but I was 
wondering what exactly is the source of the problem with doing something like 
this or if there is an obvious work around. Maybe writing another local 
function to wrap around request:query and to use in that loop. 

( One reason I chose that test to convert to RESTXQ was that it wasn’t obvious 
to be from the docs if I could mix those different access methods, and so what 
was surprising was that it mostly worked — only that one function failed (so 
far)). 


module namespace test = 'http://localhost/test';

import module namespace request = "http://exquery.org/ns/request;;


declare function test:f0line( $f ) as node() {
  (: build a list item with function name and function values :)
  {fn:function-name($f)}:{$f()}
};

(:~
 : Generates a welcome page.
 : @return HTML page
 :)
declare
  %rest:path("test")
  %output:method("xhtml")
  %output:omit-xml-declaration("no")
  %output:doctype-public("-//W3C//DTD XHTML 1.0 Transitional//EN")
  
%output:doctype-system("http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;)
function test:test(
) as element(Q{http://www.w3.org/1999/xhtml}html) {
  http://www.w3.org/1999/xhtml;>

  BaseX HTTP Services
  


  
  TEST

  
{ request:query( ), function-name(request:query#0)}
  


HTTP Request

  { for $f in ( request:method#0, request:scheme#0, 
request:hostname#0, request:port#0,
   request:path#0, (: request:query#0, :) request:uri#0, 
request:context-path#0, request:address#0,
   request:remote-hostname#0, request:remote-address#0, 
request:remote-port#0 )
  return test:f0line($f) }



  
};






smime.p7s
Description: S/MIME cryptographic signature


Re: [basex-talk] Error-code when reading from a socket (RbaseClient)

2018-04-11 Thread Christian Grün
Hi Ben,

Thanks for your update on the R client implementation. Finally some
feedback (but maybe you’ve already solved your problem?):

> My question for this moment is, if the response '0a' in testSock is
> truly the response from the basexserver or is this an error that is
> returned by the socket?
>
> Is the a list that explains the errorcodes returnde by the basex-server?

As I didn’t have a chance to run your code, I can only guess what
might have gone wrong. In every case, 0A is no error code, so I would
I assume it’s part of a result that hasn’t been retrieved in its full
length. It could be the last newline character of your first result.

Errors will always be indicated by a trailing 01 byte [1]. In the
following example, the server returns "1" as result, the info string
"OK" and the success code "0":

  31 00  // UTF8 result string '1', followed by 00 suffix
  4F 4B 00  // UTF8 info string 'OK', followed by 00 suffix
  00 // success code

If an error occurs, 01 instead of 00 will be sent as last byte, and
the info string that you have received in the previous bytes contains
the error message.

Hope this helps,
Christian

[1] http://docs.basex.org/wiki/Server_Protocol#Command_Protocol




On Wed, Apr 4, 2018 at 4:57 PM, Ben Engbers  wrote:
> Hi,
>
> Since a few weeks I am working on a client for the R language. I use
> BaseXClient.java as example. And in R I use the R6 package for object
> orientation.
>
> And at this moment I can login and issue COMMANDs.
>
> I guess that at this moment and for this question, these parts of the
> code are the most essential:
>
> - socket-definition:
> private$sock <- socketConnection(host = "localhost", port = 1984L,
> open = "w+b", server = FALSE, blocking = TRUE, encoding = "utf-8")
>
> - execute a command:
> execute = function(command) {
>   flush(private$sock)
>   private$send(command)
>   private$info <- private$receive()
>   private$testSock()
>   result <- private$show_receive()
>   return(result)
> }
>
> - get the server-response:
> receive = function(input, output) {
>   private$info <- NULL
>   if (missing(input) || missing(output)) {
> output <- raw(0)
> output <- private$receive(private$sock, output)
> return(rawToChar(output))
>   } else {
> while((rd <- readBin(input, what = "raw", n =1)) >0) {
>   if (rd == 0xff) next
>   output <- append(output, rd)
> }
> return(output)
>   }
>
> - test the result (Exceptionhandling):
> testSock = function() {
>   tryCatch({
> test <- readBin(private$sock, what = "raw", n =1)
>   }, error = function(e) {
> print("ERROR")
> print(e)
> return(FALSE)
>   })
>   return(test == 0x00)
> }
>
>
> I create a session and issue some commands from in a script:
> Session <- BasexClient$new("localhost", 1984, "admin", "admin")
> print(Session$execute("xquery 1 to 5"))
> print(Session$execute("xquery 6 to 10"))
> print(Session$execute("list"))
>
> When testsock is used in the first call, the readBin in the third line
> returns 00! Perfect! Result is
> [[1]]
> [1] "1" "2" "3" "4" "5"
> When testsock is used for the second call returns 0a ;-( and output is [[1]]
> character(0)
>
> When I comment out the first two calls, result is:
> [[1]]
> [1] "Name   Resources  Size  Input Path
>  "
> [2]
> "---"
>
> [3] "EUR16412288704  /home/bengbers/Programs/basex/
>  "
> [4] "EUR_Debat  1492   44857696
> /home/bengbers/DataScience/TextMining-Web-Analytics/Text-mining
> case/xml_files/  "
> [5] "test1  0  4568
>  "
> [6] ""
>
> [7] "3 database(s)."
>
>
> My question for this moment is, if the response '0a' in testSock is
> truly the response from the basexserver or is this an error that is
> returned by the socket?
>
> Is the a list that explains the errorcodes returnde by the basex-server?
>
> Ben


[basex-talk] Error-code when reading from a socket (RbaseClient)

2018-04-04 Thread Ben Engbers
Hi,

Since a few weeks I am working on a client for the R language. I use
BaseXClient.java as example. And in R I use the R6 package for object
orientation.

And at this moment I can login and issue COMMANDs.

I guess that at this moment and for this question, these parts of the
code are the most essential:

- socket-definition:
private$sock <- socketConnection(host = "localhost", port = 1984L,
open = "w+b", server = FALSE, blocking = TRUE, encoding = "utf-8")

- execute a command:
execute = function(command) {
  flush(private$sock)
  private$send(command)
  private$info <- private$receive()
  private$testSock()
  result <- private$show_receive()
  return(result)
}

- get the server-response:
receive = function(input, output) {
  private$info <- NULL
  if (missing(input) || missing(output)) {
output <- raw(0)
output <- private$receive(private$sock, output)
return(rawToChar(output))
  } else {
while((rd <- readBin(input, what = "raw", n =1)) >0) {
  if (rd == 0xff) next
  output <- append(output, rd)
}
return(output)
  }

- test the result (Exceptionhandling):
testSock = function() {
  tryCatch({
test <- readBin(private$sock, what = "raw", n =1)
  }, error = function(e) {
print("ERROR")
print(e)
return(FALSE)
  })
  return(test == 0x00)
}


I create a session and issue some commands from in a script:
Session <- BasexClient$new("localhost", 1984, "admin", "admin")
print(Session$execute("xquery 1 to 5"))
print(Session$execute("xquery 6 to 10"))
print(Session$execute("list"))

When testsock is used in the first call, the readBin in the third line
returns 00! Perfect! Result is
[[1]]
[1] "1" "2" "3" "4" "5"
When testsock is used for the second call returns 0a ;-( and output is [[1]]
character(0)

When I comment out the first two calls, result is:
[[1]]
[1] "Name   Resources  Size  Input Path
 "
[2]
"---"

[3] "EUR16412288704  /home/bengbers/Programs/basex/
 "
[4] "EUR_Debat  1492   44857696
/home/bengbers/DataScience/TextMining-Web-Analytics/Text-mining
case/xml_files/  "
[5] "test1  0  4568
 "
[6] ""

[7] "3 database(s)."


My question for this moment is, if the response '0a' in testSock is
truly the response from the basexserver or is this an error that is
returned by the socket?

Is the a list that explains the errorcodes returnde by the basex-server?

Ben


Re: [basex-talk] Error: Processing instruction has illegal name: xml

2018-01-16 Thread Christian Grün
Hi Thomas,

If you edit a file with an .xml suffix, it will be parsed as XML. This
error message should only appear if​ you run your editor file as query (via
the PLAY button or Ctrl+Enter). If your experience differs, feel free to
give me more information on how you proceed. Maybe it would be less
confusing if we disallowed query execution for all named files that have no
XQuery suffix?

Best,
Christian



On Tue, Jan 16, 2018 at 6:12 AM, Thomas Zehrer 
wrote:

>
>
> Hi there,
>
> if i want start a new xml document or open a exist one (factbook.xml
> e.g.), every time i get this error:
>
> Error: Processing instruction has illegal name: 'xml'
>
> i have already searched your website first steps and crawled the internet.
> there was just one entry on stackoverflow, the solution there wont work.
>
> how can i go on with it?
>
> thanks a lot.
>
> Thomas
>


[basex-talk] Error: Processing instruction has illegal name: xml

2018-01-15 Thread Thomas Zehrer












Hi there,

if i want start a new xml document or open a exist one (factbook.xml
e.g.), every time i get this error:

Error: Processing instruction has illegal name: 'xml'

i have already searched your website first steps and crawled the
internet. there was just one entry on stackoverflow, the solution there
wont work.

how can i go on with it?

thanks a lot.

Thomas



Re: [basex-talk] error when caling http service with latest Basex version ( Basex 8.6 beta baadd29)

2016-11-12 Thread Christian Grün
Java errors (in contrast to exceptions) indicate that something is
going in your configuration. I think the problems should be solved
after you have set up a clean environment and try it again…


On Sat, Nov 12, 2016 at 9:49 AM, Rob Stapper  wrote:
> When calling the http-srvice through my browser with:
> http://robstapper.ddns.net:8984, I get an error-message from the service,
> see below, with the latest Basex version: Basex 8.6 beta baadd29.
>
>
>
> HTTP ERROR 500
>
> Problem accessing /. Reason:
>
> Server Error
>
> Caused by:
>
> java.lang.NoSuchMethodError:
> org.basex.query.QueryContext.parse(Ljava/lang/String;Ljava/lang/String;Lorg/basex/query/StaticContext;)Lorg/basex/query/Module;
>
> at org.basex.http.restxq.RestXqModule.qc(RestXqModule.java:120)
>
> at org.basex.http.restxq.RestXqModule.parse(RestXqModule.java:49)
>
> at org.basex.http.restxq.RestXqModules.cache(RestXqModules.java:189)
>
> at org.basex.http.restxq.RestXqModules.cache(RestXqModules.java:175)
>
> at org.basex.http.restxq.RestXqModules.cache(RestXqModules.java:175)
>
> at org.basex.http.restxq.RestXqModules.cache(RestXqModules.java:151)
>
> at org.basex.http.restxq.RestXqModules.find(RestXqModules.java:65)
>
> at org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:39)
>
> at org.basex.http.BaseXServlet.service(BaseXServlet.java:65)
>
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
>
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
>
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
>
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>
> at org.eclipse.jetty.server.Server.handle(Server.java:370)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
>
> at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
>
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:231)
>
> at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
>
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
>
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>
> at java.lang.Thread.run(Unknown Source)
>
> 
>
> Powered by Jetty://
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>


Re: [basex-talk] Error report in baseX-dev

2016-08-03 Thread Christian Grün
Hi Jack,

Does the problem persist if you restart the BaseX server instance? If
yes, could you check if there’s n upd.basex file in the corresponding
database directory (dboe-xml) [1]?

> The uploading process originally stopped and gave an error message and
> listed about 4 files that would not be included in upload but the rest
> appeared but now nothing else can be added or deleted.

Do you know why the process stopped? Was the problem caused by oXygen,
your network, of BaseX (did you get an error message)?

Sorry for all the questions ;)
Christian

[1] http://docs.basex.org/wiki/Transaction_Management#File-System_Locks


On Wed, Aug 3, 2016 at 12:36 PM, Bowers, Jack  wrote:
> Hi,
>
> I’m trying to delete some files that I just added to my db
>
> To give context, I originally added them via Oxygen data source explorer
> baseXdev, but I am trying to delete them in the dba
> https://basex-dev.eos.arz.oeaw.ac.at/dba/database?name=dboe-xml and the
> error 500 message below is what occurs.
>
>
> Best
>
> Jack Bowers
>
>
>
> Austrian Centre for Digital Humanities (ACDH)
>
> Österreichische Akademie der Wissenschaften (ÖAW)  -  Austrian Academy of
> Sciences
>
> http://www.oeaw.ac.at/acdh/ -  http://wboe.oeaw.ac.at/
>
>
>
> -(SEE ERROR MSG BELOW)---
>
>
>
> HTTP ERROR 500
>
>
>
> Problem accessing /dba/delete. Reason:
>
>
>
> Unexpected error: Improper use? Potential bug? Your feedback is welcome:
>
> Contact: basex-talk@mailman.uni-konstanz.de
>
> Version: BaseX 8.3.1
>
> Java: Oracle Corporation, 1.8.0_91
>
> OS: Linux, amd64
>
> Stack Trace:
>
> java.lang.RuntimeException: dboe-xml: could not create lock file.
>
> at org.basex.util.Util.notExpected(Util.java:60)
>
> at org.basex.data.DiskData.startUpdate(DiskData.java:218)
>
> at
> org.basex.query.up.ContextModifier.apply(ContextModifier.java:120)
>
> at org.basex.query.up.Updates.apply(Updates.java:134)
>
> at org.basex.query.QueryContext.iter(QueryContext.java:369)
>
> at
> org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:55)
>
> at
> org.basex.http.restxq.RestXqModule.process(RestXqModule.java:101)
>
> at
> org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:109)
>
> at
> org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:44)
>
> at org.basex.http.BaseXServlet.service(BaseXServlet.java:64)
>
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
>
> at
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
>
> at
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
>
> at
> org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
>
> at
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
>
> at
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
>
> at
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
>
> at
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
>
> at
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
>
> at
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
>
> at org.eclipse.jetty.server.Server.handle(Server.java:370)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
>
> at
> org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
>
> at
> org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
>
> at
> org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:231)
>
> at
> org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
>
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
>
> at
> org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
>
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
>
> at
> org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
>
> at java.lang.Thread.run(Thread.java:745)

[basex-talk] Error report in baseX-dev

2016-08-03 Thread Bowers, Jack
Hi,

I'm trying to delete some files that I just added to my db

To give context, I originally added them via Oxygen data source explorer 
baseXdev, but I am trying to delete them in the dba 
https://basex-dev.eos.arz.oeaw.ac.at/dba/database?name=dboe-xml and the error 
500 message below is what occurs.

The uploading process originally stopped and gave an error message and listed 
about 4 files that would not be included in upload but the rest appeared but 
now nothing else can be added or deleted.

Best
Jack Bowers

Austrian Centre for Digital Humanities (ACDH)
Österreichische Akademie der Wissenschaften (ÖAW)  -  Austrian Academy of 
Sciences
http://www.oeaw.ac.at/acdh/ -  http://wboe.oeaw.ac.at/

-(SEE ERROR MSG BELOW)---

HTTP ERROR 500

Problem accessing /dba/delete. Reason:

Unexpected error: Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 8.3.1
Java: Oracle Corporation, 1.8.0_91
OS: Linux, amd64
Stack Trace:
java.lang.RuntimeException: dboe-xml: could not create lock file.
at org.basex.util.Util.notExpected(Util.java:60)
at org.basex.data.DiskData.startUpdate(DiskData.java:218)
at 
org.basex.query.up.ContextModifier.apply(ContextModifier.java:120)
at org.basex.query.up.Updates.apply(Updates.java:134)
at org.basex.query.QueryContext.iter(QueryContext.java:369)
at 
org.basex.http.restxq.RestXqResponse.create(RestXqResponse.java:55)
at 
org.basex.http.restxq.RestXqModule.process(RestXqModule.java:101)
at 
org.basex.http.restxq.RestXqFunction.process(RestXqFunction.java:109)
at 
org.basex.http.restxq.RestXqServlet.run(RestXqServlet.java:44)
at org.basex.http.BaseXServlet.service(BaseXServlet.java:64)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at 
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at 
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at 
org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at 
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
at 
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at 
org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
at 
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at 
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
at 
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at 
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at 
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at 
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:971)
at 
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033)
at 
org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
at 
org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:231)
at 
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
at 
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
at 
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at 
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:745)




Re: [basex-talk] Error Java ArrayIndexOutOfBoundsException

2016-01-06 Thread Christian Grün
> Improper use? Potential bug? Your feedback is welcome:
> Contact: basex-talk@mailman.uni-konstanz.de
> Version: BaseX 8.3.1
> Java: Oracle Corporation, 1.8.0_45
> OS: Mac OS X, x86_64
> Stack Trace:
> java.lang.ArrayIndexOutOfBoundsException

Hm… Could you provide us with the full stack trace?



>
> after running:
>
> xquery version "3.0";
> declare namespace tei = "http://www.tei-c.org/ns/1.0;;
> db:create('kleist_index', for $item in db:open('kleist-data') return $item 
> update delete node .//(tei:note|tei:rdg|tei:lb|tei:del|tei:reg|tei:sic), 
> db:open('kleist-data')/db:path(.))
>
> This error only appears on my second computer (both MacBooks). The one, which 
> works, runs
> java version "1.8.0_31"
> Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
>
> the other, where my xq is not working java version "1.8.0_45" (Java 8-Update 
> 66).
>
> Any ideas, what's the problem?
>
> Best, Günter


[basex-talk] Error Java ArrayIndexOutOfBoundsException

2016-01-06 Thread kleist
Hello again,

I got the following error:

Error:
Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 8.3.1
Java: Oracle Corporation, 1.8.0_45
OS: Mac OS X, x86_64
Stack Trace: 
java.lang.ArrayIndexOutOfBoundsException

after running:

xquery version "3.0";
declare namespace tei = "http://www.tei-c.org/ns/1.0;;
db:create('kleist_index', for $item in db:open('kleist-data') return $item 
update delete node .//(tei:note|tei:rdg|tei:lb|tei:del|tei:reg|tei:sic), 
db:open('kleist-data')/db:path(.))

This error only appears on my second computer (both MacBooks). The one, which 
works, runs 
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

the other, where my xq is not working java version "1.8.0_45" (Java 8-Update 
66).

Any ideas, what's the problem?

Best, Günter


Re: [basex-talk] error bxsq0003 in xquery

2015-09-09 Thread Maximilian Gärber
Hi Michele,

could you provide some more information, please?

E.g. the complete error message (with line number), the OS and BaseX
version etc.

Regards,

Max

2015-09-07 11:41 GMT+02:00  :
> Hi, i have tihsi error :[bxerr:BXSQ0003] Number of parameters differs from
> number of placeholders in this xquery:
> declare namespace
> w="http://schemas.openxmlformats.org/wordprocessingml/2006/main;;
>
> declare function local:nome() as xs:string* {
> for $document in collection("curriculum")
> let $c:= document-uri($document)
> order by $c
> return
> for $e in doc($c)//w:tc[.//text()="Nome"]
> return $e/./following::text() except (
> for $x in doc($c)//w:tc[.//text()="Indirizzo"]
> return $x//following::text())
> };
>
> let $init := sql:init("com.mysql.jdbc.Driver"),
> $conn :=
> sql:connect("jdbc:mysql://localhost:3306/DbName","user","password"),
> $stmt := sql:prepare($conn, "INSERT INTO person
> VALUES('',?,'','','','','')")
> for $nome in local:nome()
> return sql:ute-prepared($stmt,
> 
> {$nome}
> )
>
> Why?
>
> 
> ZE-Light e ZE-Pro: servizi zimbra per caselle con dominio email.it, per
> tutti i dettagli clicca qui
>
> Sponsor:
> Registra i domini che desideri ed inizia a creare il tuo sito web
> Clicca qui


[basex-talk] error bxsq0003 in xquery

2015-09-07 Thread michele . greco2
Hi, i have tihsi error :[bxerr:BXSQ0003] Number of parameters differs from
number of placeholders in this xquery:
declare namespace
w="http://schemas.openxmlformats.org/wordprocessingml/2006/main;;

declare function local:nome() as xs:string* {
for $document in collection("curriculum")
let $c:= document-uri($document)
order by $c
return
for $e in doc($c)//w:tc[.//text()="Nome"]
return $e/./following::text() except (
for $x in doc($c)//w:tc[.//text()="Indirizzo"]
return $x//following::text())
};

let $init := sql:init("com.mysql.jdbc.Driver"),
$conn :=
sql:connect("jdbc:mysql://localhost:3306/DbName","user","password"),
$stmt := sql:prepare($conn, "INSERT INTO person
VALUES('',?,'','','','','')")
for $nome in local:nome()
return sql:ute-prepared($stmt,
sql:parameters
sql:parameter type="string"{$nome}/sql:parameter
/sql:parameters)

Why?


 
 
 --
 ZE-Light e ZE-Pro: servizi zimbra per caselle con dominio email.it, per tutti 
i dettagli 
Clicca qui 
http://posta.email.it/caselle-di-posta-z-email-it/?utm_campaign=email_Zimbra_102014=main_footer/f
 
 Sponsor:
 Soluzioni di email hosting per tutte le esigenze: dalle caselle gratuite a 
quelle professionali su piattaforma Zimbra, da quelle su proprio dominio a 
quelle certificate PEC. Confronta le soluzioni
 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=13326=7-9

Re: [basex-talk] Error [FODC0002] when XSL returns sequence

2015-07-28 Thread Christian Grün
Hi Max,

Right, the xslt:transform expects the result to be a single,
well-formed XML document. However, you can retrieve the transformation
result as text and then apply fn:parse-xml-fragment on it:

  fn:parse-xml-fragment(
xslt:transform-text($DATA, $XSL)
  )

Hope this helps,
Christian


On Mon, Jul 27, 2015 at 12:07 PM, Maximilian Gärber mgaer...@arcor.de wrote:
 Hi,

 calling the test-xsl function does not work (might be a bug). I think
 returning a document fragment from xsl is not forbidden (at least
 exist-db permits it).

 The transform itself uses Saxon HE but this seems not related.

 -- start xqm --

 xquery version 3.0;

 module namespace _= http://foo.org/test;;
 import module namespace xslt = http://basex.org/modules/xslt;;

 declare variable $_:DATA := foo
 bar1/bar1
 bar2/bar2
   /foo;

 declare variable $_:XSL := xsl:stylesheet version=2.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xsl:output method=xhtml/
xsl:template match=/*/*
  divsome div/div
/xsl:template
   /xsl:stylesheet;

 declare
   %rest:GET
   %rest:path(test-xsl)
 function _:test-xsl(){

let $out := xslt:transform($_:DATA, $_:XSL)
return $out

 };

 --- end xqm --


 Message:

 Stopped at test-xsl.xqm, 26/31:
 [FODC0002]  (Line 2): Markup im Dokument nach dem Root-Element muss
 ordnungsgemäß formatiert sein.


 Regards, Max


[basex-talk] Error [FODC0002] when XSL returns sequence

2015-07-27 Thread Maximilian Gärber
Hi,

calling the test-xsl function does not work (might be a bug). I think
returning a document fragment from xsl is not forbidden (at least
exist-db permits it).

The transform itself uses Saxon HE but this seems not related.

-- start xqm --

xquery version 3.0;

module namespace _= http://foo.org/test;;
import module namespace xslt = http://basex.org/modules/xslt;;

declare variable $_:DATA := foo
bar1/bar1
bar2/bar2
  /foo;

declare variable $_:XSL := xsl:stylesheet version=2.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xsl:output method=xhtml/
   xsl:template match=/*/*
 divsome div/div
   /xsl:template
  /xsl:stylesheet;

declare
  %rest:GET
  %rest:path(test-xsl)
function _:test-xsl(){

   let $out := xslt:transform($_:DATA, $_:XSL)
   return $out

};

--- end xqm --


Message:

Stopped at test-xsl.xqm, 26/31:
[FODC0002]  (Line 2): Markup im Dokument nach dem Root-Element muss
ordnungsgemäß formatiert sein.


Regards, Max


Re: [basex-talk] Error?

2015-03-12 Thread Christian Grün
 Thanks, new snapshot downloaded,  but the errors persist in some way or
 another (not exactly the same).

Does it stil have to with colons? If you find out more about it, feel
free to tell me.

Takk,
Christian


Re: [basex-talk] Error?

2015-03-12 Thread Lars Johnsen
An attempt with a brand new family of colon-infected folders (not
databases), works nicely now withthe new snapshot. While the same commands
in the old version still generated the FODC0002 error:

So both of these worked nicely in the new snapshot (strings refers to files
and folders -  not database paths):


collection(/home/larsj/terra/Synsegn/URN:NBN:no-nb_digitidsskrift_2014092382210_001)

as well as


doc(/home/larsj/terra/Synsegn/URN:NBN:no-nb_digitidsskrift_2014092382210_001/Alto_13.xml)


Cheers
Lars



2015-03-12 11:05 GMT+01:00 Christian Grün christian.gr...@gmail.com:

  Thanks, new snapshot downloaded,  but the errors persist in some way or
  another (not exactly the same).

 Does it stil have to with colons? If you find out more about it, feel
 free to tell me.

 Takk,
 Christian



Re: [basex-talk] Error?

2015-03-12 Thread Lars Johnsen
Thanks, new snapshot downloaded,  but the errors persist in some way or
another (not exactly the same).

However, since you mentioned that the problems were caused by colons in
filenames, removing those colons did the trick. Now it all works as
expected. The colon-free-folders can be referenced with collection(), as
well as being ingested. All is well.

Alles klar!
Lars

2015-03-11 18:57 GMT+01:00 Christian Grün christian.gr...@gmail.com:

 Hi Lars,

 The issue should be fixed with the latest snapshot [1].

 फिर मिलेंगे,
 Christian

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



 On Tue, Mar 10, 2015 at 6:23 PM, Lars Johnsen yoon...@gmail.com wrote:
  Hi all
 
  I have a database collection which gives a strange error message
 
  '[FODC0002]  (Line 1): Content is not allowed in prolog.'
 
  on this query:
 
  for $x in collection('samtiden')
   return doc(document-uri($x))
 
  The results from document-uri($x) are as expected, but
 doc(document-uri($x))
  should return $x - so what can be the cause of the error?
 
  The collection was entered in the gui using skip corrupt files since
 some
  of the files had errors (ended prematurely). But the database and
  document-uri() works fine for all elements in the database.
 
  I need to process the paths for grouping the documents in the
 collection, so
  the practical value is a bit more than just trying to compute a unity
  function!
 
  Best,
  Lars G Johnsen
  National Library of Norway
 
 
 
 
 



Re: [basex-talk] Error?

2015-03-11 Thread Christian Grün
Hi Lars,

The issue should be fixed with the latest snapshot [1].

फिर मिलेंगे,
Christian

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



On Tue, Mar 10, 2015 at 6:23 PM, Lars Johnsen yoon...@gmail.com wrote:
 Hi all

 I have a database collection which gives a strange error message

 '[FODC0002]  (Line 1): Content is not allowed in prolog.'

 on this query:

 for $x in collection('samtiden')
  return doc(document-uri($x))

 The results from document-uri($x) are as expected, but doc(document-uri($x))
 should return $x - so what can be the cause of the error?

 The collection was entered in the gui using skip corrupt files since some
 of the files had errors (ended prematurely). But the database and
 document-uri() works fine for all elements in the database.

 I need to process the paths for grouping the documents in the collection, so
 the practical value is a bit more than just trying to compute a unity
 function!

 Best,
 Lars G Johnsen
 National Library of Norway







Re: [basex-talk] Error?

2015-03-11 Thread Christian Grün
Hi Lars,

 The results from document-uri($x) are as expected, but doc(document-uri($x))
 should return $x - so what can be the cause of the error?

Could you possibly give me some examples what is returned by
document-uri($x)? Could you additionally me what is returned by the
following query?

  for $x in db:open('samtiden')
  return db:path($x))

Best,
Christian


 The collection was entered in the gui using skip corrupt files since some
 of the files had errors (ended prematurely). But the database and
 document-uri() works fine for all elements in the database.

 I need to process the paths for grouping the documents in the collection, so
 the practical value is a bit more than just trying to compute a unity
 function!

 Best,
 Lars G Johnsen
 National Library of Norway







[basex-talk] Error?

2015-03-10 Thread Lars Johnsen
Hi all

I have a database collection which gives a strange error message

'[FODC0002]  (Line 1): Content is not allowed in prolog.'

on this query:

for $x in collection('samtiden')
 return doc(document-uri($x))

The results from document-uri($x) are as expected, but
doc(document-uri($x)) should return $x - so what can be the cause of the
error?

The collection was entered in the gui using skip corrupt files since some
of the files had errors (ended prematurely). But the database and
document-uri() works fine for all elements in the database.

I need to process the paths for grouping the documents in the collection,
so the practical value is a bit more than just trying to compute a unity
function!

Best,
Lars G Johnsen
National Library of Norway


[basex-talk] Error

2014-12-03 Thread Rob Stapper
Hi Christian,

 

I'm getting the error-message[ 1] shown below.

I'm using the GUI of the  latest BaseX-snapshot: basex 8.0 beta aaca13a .

 

I'm not able (yet) to provide you with a small running snippet where this
error occurs

but I can provide the piece of code where it starts going wrong:

 

This piece of code triggers the error:

===

declare function local:sequenceElement.processor

  ( $sequenceElement as element( )

  , $initialMap  as map(*)

  )

  { 

fold-left( $sequenceElement/child::*

 , $initialMap

 , local:element.processor#2

 )

  } ;

===

 

If I change it into this piece of code all works fine:

===

declare function local:sequenceElement.processor

  ( $sequenceElement as element( )

  , $initialMap  as map(*)

  )

  { 

fold-left( $sequenceElement/child::*

 , $initialMap

 , function( $currentMap

   , $element

   )

   {

 local:element.processor( $currentMap, $element)

   }

 )

  } ;

===

 

I have a feeling that this is a re-introduced bug, solved a while ago by Leo
Woerteler.

I hope this is enough information to solve the issue.

Please let me know if you need more information.

 

TIA,

Rob Stapper

 

 

[ 1]

Error:

Improper use? Potential bug? Your feedback is welcome:

Contact: basex-talk@mailman.uni-konstanz.de

Version: BaseX 8.0 beta aaca13a

Java: Oracle Corporation, 1.7.0_71

OS: Windows Vista, x86

Stack Trace: 

java.lang.ClassCastException: org.basex.query.value.type.AtomType cannot be
cast to org.basex.query.value.type.FuncType

at org.basex.query.func.Closure.item(Closure.java:272)

at org.basex.query.func.Closure.value(Closure.java:314)

at org.basex.query.QueryContext.value(QueryContext.java:402)

at
org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:187)

at org.basex.query.expr.gflwor.GFLWOR$2.next(GFLWOR.java:74)

at org.basex.query.iter.Iter.value(Iter.java:54)

at org.basex.query.expr.ParseExpr.value(ParseExpr.java:67)

at org.basex.query.QueryContext.value(QueryContext.java:402)

at
org.basex.query.func.StaticFunc.invValue(StaticFunc.java:199)

at org.basex.query.func.FuncCall.invoke(FuncCall.java:87)

at org.basex.query.func.FuncCall.value(FuncCall.java:61)

at org.basex.query.QueryContext.value(QueryContext.java:402)

at
org.basex.query.value.item.FuncItem.invValue(FuncItem.java:127)

at org.basex.query.func.FuncCall.invoke(FuncCall.java:87)

at org.basex.query.func.FuncCall.value(FuncCall.java:159)

at
org.basex.query.value.item.FItem.invokeValue(FItem.java:43)

at
org.basex.query.func.fn.FnFoldLeft.iter(FnFoldLeft.java:28)

at org.basex.query.expr.TypeCheck.iter(TypeCheck.java:85)

at org.basex.query.expr.ParseExpr.item(ParseExpr.java:49)

at org.basex.query.expr.ParseExpr.toItem(ParseExpr.java:467)

at org.basex.query.expr.ParseExpr.toMap(ParseExpr.java:619)

at
org.basex.query.func.map.MapForEach.iter(MapForEach.java:17)

at org.basex.query.expr.gflwor.GFLWOR$2.next(GFLWOR.java:78)

at org.basex.query.MainModule$1.next(MainModule.java:117)

at
org.basex.query.QueryContext.execute(QueryContext.java:614)

at
org.basex.query.QueryProcessor.execute(QueryProcessor.java:100)

at org.basex.core.cmd.AQuery.query(AQuery.java:82)

at org.basex.core.cmd.XQuery.run(XQuery.java:22)

at org.basex.core.Command.run(Command.java:360)

at org.basex.core.Command.execute(Command.java:94)

at org.basex.gui.GUI.exec(GUI.java:470)

at org.basex.gui.GUI.access$5(GUI.java:427)

at org.basex.gui.GUI$8.run(GUI.java:414)



---
Dit e-mailbericht is gecontroleerd op virussen met Avast antivirussoftware.
http://www.avast.com


Re: [basex-talk] Error while acceessing embedded databases through client-server.

2014-09-05 Thread Christian Grün
Hi Kunal,

actually, the database format of BaseX has not changed for quite a
while. Could you please give us more information on what you have
done, or, ideally, provide us an SSCCE [1] that allows us to reproduce
the problem.

Thanks,
Christian

[1] http://sscce.org



On Thu, Sep 4, 2014 at 3:48 PM, Kunal Chauhan mail...@gmail.com wrote:
 Hello,

 I have created embedded database using java API.
 Now, while opening the databases using XQJ client-server architecture.

 Exception in thread main javax.xml.xquery.XQException:
   BXCE001 - Stopped at ., 1/245:
 [BXDB0002] The database format has changed; please use a newer version.
   at HelloWorld.main(HelloWorld.java:39)


 I started the BaseXServer and
 while running BaseXClient from command prompt, following is the output of
 list command.

 list
 name  Resources  Size  Input Path
 -
 testDB   0  0 Error

 but I am able to open the same database through Java API.

 So, my question is can we use databases which are created in embedded mode
 and use it through client-server architecture ?

 Thanks,
 --
 Kunal Chauhan
 mail...@gmail.com
 [+918655517141]


[basex-talk] Error while acceessing embedded databases through client-server.

2014-09-04 Thread Kunal Chauhan
Hello,

I have created embedded database using java API.
Now, while opening the databases using XQJ client-server architecture.

Exception in thread main javax.xml.xquery.XQException:
  BXCE001 - Stopped at ., 1/245:
[BXDB0002] The database format has changed; please use a newer version.
  at HelloWorld.main(HelloWorld.java:39)


I started the BaseXServer and
while running BaseXClient from command prompt, following is the output of
list command.

 list
name  Resources  Size  Input Path
-
testDB   0  0 Error

but I am able to open the same database through Java API.

So, my question is can we use databases which are created in embedded mode
and use it through client-server architecture ?

Thanks,
-- 
*Kunal Chauhan*
mail...@gmail.com
[+918655517141]


[basex-talk] Error while adding

2014-08-27 Thread irisDeveloper

Hi all,

Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 7.8
Java: Sun Microsystems Inc., 1.6.0_30
OS: Linux, amd64
Stack Trace:
java.lang.RuntimeException: Data Access out of bounds:
- pre value: 48280236
- #used blocks: 188573
- #total locks: 188573
- access: 188572 (188573  188572]
at org.basex.util.Util.notExpected(Unknown Source)
at org.basex.io.random.TableDiskAccess.cursor(Unknown Source)
at org.basex.io.random.TableDiskAccess.read5(Unknown Source)
at org.basex.data.Data.textOff(Unknown Source)
at org.basex.data.DiskData.text(Unknown Source)
at org.basex.index.resource.Docs.paths(Unknown Source)
at org.basex.index.resource.Docs.insert(Unknown Source)
at org.basex.index.resource.Resources.insert(Unknown Source)
at org.basex.data.Data.insert(Unknown Source)
at org.basex.core.cmd.Add.run(Unknown Source)
at org.basex.core.Command.run(Unknown Source)
at org.basex.core.Command.execute(Unknown Source)
at org.basex.server.LocalSession.execute(Unknown Source)
at org.basex.server.Session.execute(Unknown Source)
at org.basex.core.Main.execute(Unknown Source)
at org.basex.core.Main.execute(Unknown Source)
at org.basex.core.Main.console(Unknown Source)
at org.basex.BaseX.init(Unknown Source)
at org.basex.BaseX.main(Unknown Source)

Thanks
Samby


Re: [basex-talk] Error while adding

2014-08-27 Thread Christian Grün
Hi Samby,

thanks for the feedback. Could you possibly give us more hints how the
error was triggered? Did you interrupt any updating queries, or did
you try to concurrently update the database without the client/server
architecture?

Thanks,
Christian


On Wed, Aug 27, 2014 at 12:10 PM, irisDeveloper
developerati...@gmail.com wrote:
 Hi all,

 Improper use? Potential bug? Your feedback is welcome:
 Contact: basex-talk@mailman.uni-konstanz.de
 Version: BaseX 7.8
 Java: Sun Microsystems Inc., 1.6.0_30
 OS: Linux, amd64
 Stack Trace:
 java.lang.RuntimeException: Data Access out of bounds:
 - pre value: 48280236
 - #used blocks: 188573
 - #total locks: 188573
 - access: 188572 (188573  188572]
 at org.basex.util.Util.notExpected(Unknown Source)
 at org.basex.io.random.TableDiskAccess.cursor(Unknown Source)
 at org.basex.io.random.TableDiskAccess.read5(Unknown Source)
 at org.basex.data.Data.textOff(Unknown Source)
 at org.basex.data.DiskData.text(Unknown Source)
 at org.basex.index.resource.Docs.paths(Unknown Source)
 at org.basex.index.resource.Docs.insert(Unknown Source)
 at org.basex.index.resource.Resources.insert(Unknown Source)
 at org.basex.data.Data.insert(Unknown Source)
 at org.basex.core.cmd.Add.run(Unknown Source)
 at org.basex.core.Command.run(Unknown Source)
 at org.basex.core.Command.execute(Unknown Source)
 at org.basex.server.LocalSession.execute(Unknown Source)
 at org.basex.server.Session.execute(Unknown Source)
 at org.basex.core.Main.execute(Unknown Source)
 at org.basex.core.Main.execute(Unknown Source)
 at org.basex.core.Main.console(Unknown Source)
 at org.basex.BaseX.init(Unknown Source)
 at org.basex.BaseX.main(Unknown Source)

 Thanks
 Samby


Re: [basex-talk] Error while adding

2014-08-27 Thread irisDeveloper

Hi

Yes, actually I was adding files through add command on command prompt, 
I waited for long time but the process didnt get completed , so I killed 
using cntrl + c and then I tried again with error.


Thanks

On 08/27/2014 04:06 PM, Christian Grün wrote:

Hi Samby,

thanks for the feedback. Could you possibly give us more hints how the
error was triggered? Did you interrupt any updating queries, or did
you try to concurrently update the database without the client/server
architecture?

Thanks,
Christian


On Wed, Aug 27, 2014 at 12:10 PM, irisDeveloper
developerati...@gmail.com wrote:

Hi all,

Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 7.8
Java: Sun Microsystems Inc., 1.6.0_30
OS: Linux, amd64
Stack Trace:
java.lang.RuntimeException: Data Access out of bounds:
- pre value: 48280236
- #used blocks: 188573
- #total locks: 188573
- access: 188572 (188573  188572]
 at org.basex.util.Util.notExpected(Unknown Source)
 at org.basex.io.random.TableDiskAccess.cursor(Unknown Source)
 at org.basex.io.random.TableDiskAccess.read5(Unknown Source)
 at org.basex.data.Data.textOff(Unknown Source)
 at org.basex.data.DiskData.text(Unknown Source)
 at org.basex.index.resource.Docs.paths(Unknown Source)
 at org.basex.index.resource.Docs.insert(Unknown Source)
 at org.basex.index.resource.Resources.insert(Unknown Source)
 at org.basex.data.Data.insert(Unknown Source)
 at org.basex.core.cmd.Add.run(Unknown Source)
 at org.basex.core.Command.run(Unknown Source)
 at org.basex.core.Command.execute(Unknown Source)
 at org.basex.server.LocalSession.execute(Unknown Source)
 at org.basex.server.Session.execute(Unknown Source)
 at org.basex.core.Main.execute(Unknown Source)
 at org.basex.core.Main.execute(Unknown Source)
 at org.basex.core.Main.console(Unknown Source)
 at org.basex.BaseX.init(Unknown Source)
 at org.basex.BaseX.main(Unknown Source)

Thanks
Samby





Re: [basex-talk] Error XUST0001 for fold-left ?

2014-06-26 Thread Maximilian Gärber
Hi,

self-contained example attached, just drop to restxq enabled folder
and navigate to  [restxq url] /tmp/test-fold-left

still gives

Problem accessing /tmp/test-fold-left. Reason:

Stopped at restxq/tmp/test-update-error.xqm, 33/13:
[XUST0001] fn:fold-left(items,zero,function): all expressions must be
updating or return an empty sequence.



Regards,

Max

2014-06-25 16:25 GMT+02:00 Christian Grün christian.gr...@gmail.com:
 Hi Max,

 can you possibly provide us with a small, self-contained example?
 Maybe the error occurs somewhere else, even if the error points to
 this function. An example: Maps may also contain updating functions.

 Cheers,
 Christian


 On Wed, Jun 25, 2014 at 4:21 PM, Maximilian Gärber mgaer...@arcor.de wrote:
 Hi,

 I just tried a previously (7.8-Snapshot) working application with
 8.0-Snapshot and got:

   Stopped at /intersect-nodes.xqm, 22/13:
 [XUST0001] fn:fold-left(items,zero,function): all expressions must be
 updating or return an empty sequence.

 but there are no updates applied in this function (or ones calling
 this function):

 declare %public function _:intersect(
 $map as map(*))
 as node()*
 {
   fold-left(
 map:keys($map),
 $_:ALL,
 function($s1, $key as item()*) {
   let $s2 := $map($key),
   $a1 := _:all($s1),
   $a2 := _:all($s2)
   return if($a1)
 then if($a2) then $_:ALL else $s2
 else if($a2) then $s1 else $s1 intersect $s2
 }
   )

 Any ideas?

 Regards, Max


test-update-error.xqm
Description: Binary data


Re: [basex-talk] Error XUST0001 for fold-left ?

2014-06-26 Thread Christian Grün
 self-contained example attached, just drop to restxq enabled folder
 and navigate to  [restxq url] /tmp/test-fold-left

Appreciated! We have added an issue for that; will probably be fixed today:

  https://github.com/BaseXdb/basex/issues/964

Christian


Re: [basex-talk] Error XUST0001 for fold-left ?

2014-06-26 Thread Christian Grün
 Appreciated! We have added an issue for that; will probably be fixed today:

Done; please try the latest snapshot!
Christian


Re: [basex-talk] Error handling

2014-05-25 Thread Christian Grün
And another update (feeling like X-Mas ? ;)...

  http://docs.basex.org/wiki/RESTXQ#XQuery_Errors
  http://files.basex.org/releases/latest/



On Wed, Mar 26, 2014 at 11:09 AM, Marco Lettere m.lett...@gmail.com wrote:
 Hello all,
 the error interception functions are pretty useful. My feature request
 here is whether it could be possible to overcome:

 XQuery runtime errors can be processed via error annotations. A single
 argument must be supplied, which represents the QName of the error to be
 caught. A wildcard * may be specified to catch all possible errors. A
 function can only have a single error annotation:

 It could be useful to have at least a second level of wildcards on the QName
 prefix in order to be able to differentiate behaviours according to
 categories of errors.

 %rest:error(ns1:*)

 A more fine grained filtering (i.e. comma separated list of exception codes)
 could also be useful but since I don't understand the difficulty of building
 this into the code I won't ask too much.
 The only alternative I see at the moment is a single function with a switch
 or a lot of replicated functions.
 What is your opinion on this?

 Thanks and regards,
 Marco.

 ___
 BaseX-Talk mailing list
 BaseX-Talk@mailman.uni-konstanz.de
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk



Re: [basex-talk] Error handling

2014-03-27 Thread Christian Grün
Hi Marco,

adding wildcard support to the %restxq:error annotation shouldn't be
that much effort. We may need to clarify, however, what is going to
happen if more than one candidate is found for an error message. I've
added an issue [1]

Christian

[1] https://github.com/BaseXdb/basex/issues/915


On Wed, Mar 26, 2014 at 11:09 AM, Marco Lettere m.lett...@gmail.com wrote:
 Hello all,
 the error interception functions are pretty useful. My feature request
 here is whether it could be possible to overcome:

 XQuery runtime errors can be processed via error annotations. A single
 argument must be supplied, which represents the QName of the error to be
 caught. A wildcard * may be specified to catch all possible errors. A
 function can only have a single error annotation:

 It could be useful to have at least a second level of wildcards on the QName
 prefix in order to be able to differentiate behaviours according to
 categories of errors.

 %rest:error(ns1:*)

 A more fine grained filtering (i.e. comma separated list of exception codes)
 could also be useful but since I don't understand the difficulty of building
 this into the code I won't ask too much.
 The only alternative I see at the moment is a single function with a switch
 or a lot of replicated functions.
 What is your opinion on this?

 Thanks and regards,
 Marco.

 ___
 BaseX-Talk mailing list
 BaseX-Talk@mailman.uni-konstanz.de
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


[basex-talk] Error handling

2014-03-26 Thread Marco Lettere

Hello all,
the error interception functions are pretty useful. My feature request 
here is whether it could be possible to overcome:


XQuery runtime errors can be processed via /error annotations/. A 
single argument must be supplied, which represents the QName of the 
error to be caught. A wildcard |*| may be specified to catch all 
possible errors. A function can only have a single error annotation:


It could be useful to have at least a second level of wildcards on the 
QName prefix in order to be able to differentiate behaviours according 
to categories of errors.


|%rest:error||(||ns1:*||)|

A more fine grained filtering (i.e. comma separated list of exception 
codes) could also be useful but since I don't understand the difficulty 
of building this into the code I won't ask too much.
The only alternative I see at the moment is a single function with a 
switch or a lot of replicated functions.

What is your opinion on this?

Thanks and regards,
Marco.
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Error in webdav.xqm

2014-03-19 Thread France Baril
Hi, it took a while before I could upgrade. So far, so good. No more error
message in 7.8.2,


On Fri, Mar 7, 2014 at 11:39 AM, Christian Grün
christian.gr...@gmail.comwrote:

 Hi France,

 Dimitar was so kind to fix the reported issue. Could you please check
 out the latest snapshot [1]?

 All the best,
 Christian

 [1] http://files.basex.org/releases/latest/
 ___

 On Tue, Mar 4, 2014 at 7:13 AM, France Baril
 france.ba...@architextus.com wrote:
  I'm using BaseX with Oxygen, accessing content through a webdav folder.
 
  Since the upgrade to 7.8.1, I'm getting these errors in the terminal
 Window
  (see end of message).
 
  Interestingly, I have no xquery folder under /Users/archie and a search
  return no file named webdav.xqm on the computer.
 
  I haven't seen differences in the behaviour with the upgrade, just these
  messages.
 
  Regards,
 
  France
 
  Last login: Fri Feb 28 11:37:18 on ttys000
 
  NoName:~ archie$ /Applications/basex/bin/basexhttp ; exit;
 
  BaseX 7.8.1 [Server]
 
  Server was started (port: 1984)
 
  HTTP Server was started (port: 8984)
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
  Stopped at /Users/archie/xquery/webdav.xqm, 1/246:
 
  [XPTY0004] Cannot treat xs:string as xs:integer: 300.
 
  com.bradmcevoy.http.exceptions.BadRequestException
 
 
 
  --
  France Baril
  Architecte documentaire / Documentation architect
  france.ba...@architextus.com
  (514) 572-0341
 
  ___
  BaseX-Talk mailing list
  BaseX-Talk@mailman.uni-konstanz.de
  https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
 




-- 
France Baril
Architecte documentaire / Documentation architect
france.ba...@architextus.com
(514) 572-0341
___
BaseX-Talk mailing list

[basex-talk] Error in webdav.xqm

2014-03-03 Thread France Baril
I'm using BaseX with Oxygen, accessing content through a webdav folder.

Since the upgrade to 7.8.1, I'm getting these errors in the terminal Window
(see end of message).

Interestingly, I have no xquery folder under /Users/archie and a search
return no file named webdav.xqm on the computer.

I haven't seen differences in the behaviour with the upgrade, just these
messages.

Regards,

France

Last login: Fri Feb 28 11:37:18 on ttys000

NoName:~ archie$ /Applications/basex/bin/basexhttp ; exit;

BaseX 7.8.1 [Server]

Server was started (port: 1984)

HTTP Server was started (port: 8984)

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException

Stopped at /Users/archie/xquery/webdav.xqm, 1/246:

[XPTY0004] Cannot treat xs:string as xs:integer: 300.

com.bradmcevoy.http.exceptions.BadRequestException



-- 
France Baril
Architecte documentaire / Documentation architect
france.ba...@architextus.com
(514) 572-0341
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


[basex-talk] Error while adding a document.

2013-12-03 Thread Tojo Rakotoarison
Hello to the BaseX Team !
I am new to BaseX and exploring its functionalities.
I have created an empty database named 'NBS' and I have got a script in
which I have the following lines :

OPEN NBS
SHOW USERS
ADD nbs_1Chr.xml

When I am trying to run it in the basexclient, it raises an error and does
not want to add the document. Here is the output.

Do you have any idea where the problem comes from ? The XML file
nbs_1Chr.xml is in the current working directory.
Thank you very much !

---
 RUN insert_nbs_test.bxs
Username  Read  Write  Create  Admin

admin X X  X   X

1 Users.
Database 'NBS' was opened in 1.93 ms.
Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 7.6
Java: Sun Microsystems Inc., 1.6.0_22
OS: Linux, i386
Stack Trace:
java.lang.RuntimeException: Data Access out of bounds:
- pre value: 0
- #used blocks: 0
- #total locks: 0
- access: -1 (0  -1]
  org.basex.util.Util.notexpected(Util.java:53)
  org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:488)
  org.basex.io.random.TableDiskAccess.read5(TableDiskAccess.java:211)
  org.basex.data.Data.textOff(Data.java:422)
  org.basex.data.DiskData.text(DiskData.java:234)
  org.basex.index.resource.Docs.paths(Docs.java:107)
  org.basex.index.resource.Docs.insert(Docs.java:142)
  org.basex.index.resource.Resources.insert(Resources.java:73)
  org.basex.data.Data.insert(Data.java:676)
  org.basex.core.cmd.Add.run(Add.java:118)
  org.basex.core.Command.run(Command.java:342)
  org.basex.core.cmd.Execute.run(Execute.java:49)
  org.basex.core.Command.run(Command.java:342)
  org.basex.core.Command.exec(Command.java:321)
  org.basex.core.Command.execute(Command.java:78)
  org.basex.server.ClientListener.run(ClientListener.java:145)


-- 
Tojo Rakotoarison

*@tojo_rs https://twitter.com/#%21/tojo_rs *
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Error while adding a document.

2013-12-03 Thread Christian Grün
Hi Toko,

thanks for your mail. Is the NBS database empty? Could you provide us
with the document that causes the problem?

Christian
___

 I am new to BaseX and exploring its functionalities.
 I have created an empty database named 'NBS' and I have got a script in
 which I have the following lines :

 OPEN NBS
 SHOW USERS
 ADD nbs_1Chr.xml

 When I am trying to run it in the basexclient, it raises an error and does
 not want to add the document. Here is the output.

 Do you have any idea where the problem comes from ? The XML file
 nbs_1Chr.xml is in the current working directory.
 Thank you very much !

 ---
 RUN insert_nbs_test.bxs
 Username  Read  Write  Create  Admin
 
 admin X X  X   X

 1 Users.
 Database 'NBS' was opened in 1.93 ms.
 Improper use? Potential bug? Your feedback is welcome:
 Contact: basex-talk@mailman.uni-konstanz.de
 Version: BaseX 7.6
 Java: Sun Microsystems Inc., 1.6.0_22
 OS: Linux, i386
 Stack Trace:
 java.lang.RuntimeException: Data Access out of bounds:
 - pre value: 0
 - #used blocks: 0
 - #total locks: 0
 - access: -1 (0  -1]
   org.basex.util.Util.notexpected(Util.java:53)
   org.basex.io.random.TableDiskAccess.cursor(TableDiskAccess.java:488)
   org.basex.io.random.TableDiskAccess.read5(TableDiskAccess.java:211)
   org.basex.data.Data.textOff(Data.java:422)
   org.basex.data.DiskData.text(DiskData.java:234)
   org.basex.index.resource.Docs.paths(Docs.java:107)
   org.basex.index.resource.Docs.insert(Docs.java:142)
   org.basex.index.resource.Resources.insert(Resources.java:73)
   org.basex.data.Data.insert(Data.java:676)
   org.basex.core.cmd.Add.run(Add.java:118)
   org.basex.core.Command.run(Command.java:342)
   org.basex.core.cmd.Execute.run(Execute.java:49)
   org.basex.core.Command.run(Command.java:342)
   org.basex.core.Command.exec(Command.java:321)
   org.basex.core.Command.execute(Command.java:78)
   org.basex.server.ClientListener.run(ClientListener.java:145)


 --
 Tojo Rakotoarison
 @tojo_rs

 ___
 BaseX-Talk mailing list
 BaseX-Talk@mailman.uni-konstanz.de
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Error message

2013-10-31 Thread Christian Grün
Hi Lars,

 Line too long for a single database {filename}  and {line number}.

I guess it was Input is too large for a single database?

In this case, the recommended procedure is to create multiple
databases for your collections, which can then be queried by a single
XQuery expression. You could even think about creating an own database
for each collection, but the optimal trade off in your scenario is
probably 5-10 databases. It could also be up to 100, depending on the
size of your input data. – How big (gb/tb) is your total XML input?

Best,
Christian


 The file itself looks ok, with a single tag in the referenced position.
 What is the recommended procedure from here?

 All the best
 Lars G Johnsen
 National Library of Norway


 ___
 BaseX-Talk mailing list
 BaseX-Talk@mailman.uni-konstanz.de
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Error messages from BaseX.main()

2013-06-19 Thread Christian Grün
Hi David,

 I want to call BaseX.main() from a Java GUI and need to display errors to
 the user.  There are no exceptions thrown by this method, and I do not see a
 way to redirect so that I can capture and display.

In BaseX, all main() functions serve as main entry points. It’s
probably better to instantiate a new BaseX class instead.

Hope this helps,
Christian
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Error messages from BaseX.main()

2013-06-19 Thread Brock, David
Instantiating the BaseX class worked perfectly, thanks!

David

Sent from my iPhone

On Jun 19, 2013, at 4:01 AM, Christian Grün christian.gr...@gmail.com wrote:

 Hi David,
 
 I want to call BaseX.main() from a Java GUI and need to display errors to
 the user.  There are no exceptions thrown by this method, and I do not see a
 way to redirect so that I can capture and display.
 
 In BaseX, all main() functions serve as main entry points. It’s
 probably better to instantiate a new BaseX class instead.
 
 Hope this helps,
 Christian
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


[basex-talk] Error while storing and = in DB

2013-05-15 Thread John Best
Hi there,

I am trying to save the generated queries in database, to have a Search
History.

Some of my queries have where conditions with  (less than) and = (less
than equal to operators.

This is the insert query -

for $x in doc('SHIST')/Searches return
insert node SHId0/IdDate20130515 14:05:44/DateQuery
for $x in doc('Docs')/Docs/Doc where$x/Title[Desc/@name='IT' and Year =
'2010' and Year = '2013']
/Query/SH as last into $x

I am getting error Expecting tag name, '=' found

Any workaround for the same...??

-- 
Have a nice day
JBest
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Error while storing and = in DB

2013-05-15 Thread Christian Grün
Hi John,

your query contained several syntactical bugs; this one is probably
what you were looking for:

for $x in doc('SHIST')/Searches
return insert node
  SHId0/IdDate20130515 14:05:44/DateQuery{
   for $x in doc('Docs')/Docs/Doc
 where $x/Title[Desc/@name='IT'
   and Year = '2010'
   and Year = '2013']
return $x
  }/Query/SH
  as last into $x

Best,
Christian
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Error in 7.6 !! but not in 7.5

2013-03-14 Thread Christian Grün
 I am storing Dates in MMDD Format as PubDate d=20040608 tag. The
 above query will return
 the Date of the Document published for the searched criteria. Using the
 BaseX 7.5, I was able to run the query
 correctly. But with 7.6, I am getting error

 Single item expected, (20040608, 20040609) found

It looks as if a node in your data has several Publish or PubDate
children; to confirm this, you could try the following queries..

  a) db:open('work')//Doc/Publish[count(PubDate)  1]
  b) db:open('work')//Doc[count(PubDate)  1]/Publish

As you are searching for string theory, I have some guess that it
could also be related to the two-dimensionality of quantum states.

Christian ;)
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


[WARNING: VIRUS REMOVED][basex-talk] Error

2012-06-13 Thread Post Office


This attachment contained a virus and was stripped.
Filename: transcript.exe
Content-Type: application/octet-stream
Virus(es): W32/MyDoom-O
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] error message

2012-05-28 Thread Christian Grün
Dear David,

do you have a reproducible example, or at least a full stack trace?
Otherwise, it may get tough for us to track down the problem.

Christian
_

On Mon, May 28, 2012 at 9:08 PM, Brown, David (SSC-A)
david.k.bro...@navy.mil wrote:
 The first 8 characters of the root is a folder name. I want to group by
 folder name. I simplified the xquery to eliminate the collateral
 interactions, but still receive this error.



 p.s. I was able to get bindings working using quotes:

 open C4;set  QUERYPATH c:\dev\xq;set bindings $date=20120507,
 $envir=PRD_Win



 Source scheme:

 20120507/PRD_Win.nessus

    NessusClientData_v2

   Policy

   Report

    ReportHost

    ReportItem



 ---

 Query: declare variable $date external;

 results

 {

 for $x in //Report/ReportHost/ReportItem

   let $src := fn:root($x)

    return

  summary

   sourcesubstring(fn:name({$src}),1,8)/source

  /summary

 }/results

 Query plan:

 QueryPlan

   VarStack

     Var name=$date id=0

   Atm value=20120507 type=xs:untypedAtomic/

     /Var

     Var name=$envir id=1

   Atm value=PRD_Win type=xs:untypedAtomic/

     /Var

   /VarStack

   CElem

     QNm value=results type=xs:QName/

     FLWR

   For var=$x

     AxisPath

   DBNodeSeq size=28

     DBNode name=C4 pre=0/

     DBNode name=C4 pre=21934/

     DBNode name=C4 pre=74441/

     DBNode name=C4 pre=121967/

     DBNode name=C4 pre=145433/

   /DBNodeSeq

   IterStep axis=descendant test=Report/

       IterStep axis=child test=ReportHost/

   IterStep axis=child test=ReportItem/

     /AxisPath

   /For

   Let var=$src

     FNNode name=root([node])

   VarRef

     Var name=$x id=3/

   /VarRef

     /FNNode

   /Let

   Return

     CElem

   QNm value=summary type=xs:QName/

   CElem

     QNm value=source type=xs:QName/

     Str value=substring(fn:name( type=xs:string/

     VarRef

   Var name=$src id=4/

     /VarRef

     Str value=),1,8) type=xs:string/

   /CElem

     /CElem

   /Return

     /FLWR

   /CElem

 /QueryPlan

 Error: Improper use? Potential bug? Your feedback is welcome:

 Contact: basex-talk@mailman.uni-konstanz.de

 Version: BaseX 7.2.2 beta

 Java: Oracle Corporation, 1.7.0

 OS: Windows 7, amd64

 Stack Trace:

 java.lang.ArrayIndexOutOfBoundsException



 v/r,

 David Brown
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Error using transform method (XSLT Module)

2012-05-14 Thread Maximilian Gärber
Hi,

I've never seen a stylesheet without the stylesheet root element and
at least one template inside. Should be something like:

xsl:stylesheet version='2.0'
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'

xsl:template match=/
html xmlns='http://www.w3.org/1999/xhtml'
body
  h1Books/h1
  ul
xsl:for-each select='books/book'
...

Regards,

Max

2012/5/14 Anand Chiney anandc@gmail.com

 Dear Team,

 http://docs.basex.org/wiki/XSLT_Module

 Out of the 3 Example, 1 and 3 are working... at my end.


 The error with the second one is as -

 Error: [FODC0002] Could not compile stylesheet


 Have a nice day

 Regs
 Anand C



 On Fri, May 11, 2012 at 4:44 PM, Anand Chiney anandc@gmail.com wrote:

 Hi there,

 I am using BaseX 7.2 Beta.

 I am trying to extract certain XML Documents from the DB and then applying 
 the XSLT
 to convert these docs to HTML.

 Following is the query, which I am typing in Editor -

 let $in := /Chapters
 let $style := doc('C:\Program Files\BaseX\data\chapter.xslt')
 return Chapters{(
   xslt:transform($in, $style),
   xslt:transform($in, $style)
 )}/Chapters


 I am getting error message -
 Error: [FODC0002]  (Line 34): /head found, /meta expected.

 First I thought that, META tag might be compulsory. So I added the same
 to the XSLT file. Still error

 What does it means? Am I doing anything wrong?

 The XSLT works correctly when used individually with Java code.

 Ready to sent the XML and XSLT File

 --
 Regards

 Have a nice day :)
 Anand C




 --
 Regards


 Have a nice day :)
 Anand Chiney


 ___
 BaseX-Talk mailing list
 BaseX-Talk@mailman.uni-konstanz.de
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk


Re: [basex-talk] Error using transform method (XSLT Module)

2012-05-14 Thread Christian Grün
Dear Anand, thanks all,

I have updated the buggy example (it was successfully parsed by Saxon,
which is probably the reason why it managed to slip into the
documentation):

  http://docs.basex.org/wiki/XSLT_Module#Examples

Christian
___

On Mon, May 14, 2012 at 9:30 AM, Maximilian Gärber mgaer...@arcor.de wrote:
 Hi,

 I've never seen a stylesheet without the stylesheet root element and
 at least one template inside. Should be something like:

 xsl:stylesheet version='2.0'
 xmlns:xsl='http://www.w3.org/1999/XSL/Transform'

 xsl:template match=/
 html xmlns='http://www.w3.org/1999/xhtml'
 body
   h1Books/h1
   ul
 xsl:for-each select='books/book'
 ...

 Regards,

 Max

 2012/5/14 Anand Chiney anandc@gmail.com

 Dear Team,

 http://docs.basex.org/wiki/XSLT_Module

 Out of the 3 Example, 1 and 3 are working... at my end.


 The error with the second one is as -

 Error: [FODC0002] Could not compile stylesheet


 Have a nice day

 Regs
 Anand C



 On Fri, May 11, 2012 at 4:44 PM, Anand Chiney anandc@gmail.com wrote:

 Hi there,

 I am using BaseX 7.2 Beta.

 I am trying to extract certain XML Documents from the DB and then applying 
 the XSLT
 to convert these docs to HTML.

 Following is the query, which I am typing in Editor -

 let $in := /Chapters
 let $style := doc('C:\Program Files\BaseX\data\chapter.xslt')
 return Chapters{(
   xslt:transform($in, $style),
   xslt:transform($in, $style)
 )}/Chapters


 I am getting error message -
 Error: [FODC0002]  (Line 34): /head found, /meta expected.

 First I thought that, META tag might be compulsory. So I added the same
 to the XSLT file. Still error

 What does it means? Am I doing anything wrong?

 The XSLT works correctly when used individually with Java code.

 Ready to sent the XML and XSLT File

 --
 Regards

 Have a nice day :)
 Anand C




 --
 Regards


 Have a nice day :)
 Anand Chiney


 ___
 BaseX-Talk mailing list
 BaseX-Talk@mailman.uni-konstanz.de
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk

 ___
 BaseX-Talk mailing list
 BaseX-Talk@mailman.uni-konstanz.de
 https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
___
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk