Re: [basex-talk] BaseX File Module : access network folder on windows server

2018-01-22 Thread Imsieke, Gerrit, le-tex

It works with a file: URI with five forward slashes, like
file:list('file:/SERVERNAME_or_IP/Freigabename/')

The results, if folders, may contain backslashes though.


On 22/01/2018 19:05, Christian Grün wrote:

Hi Dieter,

I haven’t tried Window networking by myself, but AFAIK access on
server is not possible via the File Module. It is based on Java’s
default file access, and an additional library (such as [1]) would
need to be embedded. JCIFS uses the CIFS/SMB networking protocol to
access network drives.

Sorry for that,
Christian

[1] https://jcifs.samba.org/



On Mon, Jan 22, 2018 at 1:49 PM, Dieter Zanzinger
 wrote:


I am working with den BaseX-File-Module for a while and can access a local
folder,
for example: file:list('C:/').

Now I want the same in a Windows network.
If I create a folder on the Desktop of the local machine = localhost and
give it a "Freigabe" with "Freigabename" netzlaufwerktestF, it is possible
to list it´s contents with:
file:list('//WIN7PROPARPC/netzlaufwerktestF/').

Now I try the same with a folder on a server, which I can access by windows
explorer. I expected the following to work:
file:list('//SERVERNAME_or_IP/Freigabename/')

But I get only errors.
Does anybody know the right way to access a network folder with the file
module of BaseX under windows?
(I didn´t find anything in the wiki or by google).

Thanks in advance

Dieter Zanzinger


--
Gerrit Imsieke
Geschäftsführer / Managing Director
le-tex publishing services GmbH
Weissenfelser Str. 84, 04229 Leipzig, Germany
Phone +49 341 355356 110, Fax +49 341 355356 510
gerrit.imsi...@le-tex.de, http://www.le-tex.de

Registergericht / Commercial Register: Amtsgericht Leipzig
Registernummer / Registration Number: HRB 24930

Geschäftsführer: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt


Re: [basex-talk] BaseX File Module : access network folder on windows server

2018-01-22 Thread Christian Grün
Hi Dieter,

I haven’t tried Window networking by myself, but AFAIK access on
server is not possible via the File Module. It is based on Java’s
default file access, and an additional library (such as [1]) would
need to be embedded. JCIFS uses the CIFS/SMB networking protocol to
access network drives.

Sorry for that,
Christian

[1] https://jcifs.samba.org/



On Mon, Jan 22, 2018 at 1:49 PM, Dieter Zanzinger
 wrote:
>
> I am working with den BaseX-File-Module for a while and can access a local
> folder,
> for example: file:list('C:/').
>
> Now I want the same in a Windows network.
> If I create a folder on the Desktop of the local machine = localhost and
> give it a "Freigabe" with "Freigabename" netzlaufwerktestF, it is possible
> to list it´s contents with:
> file:list('//WIN7PROPARPC/netzlaufwerktestF/').
>
> Now I try the same with a folder on a server, which I can access by windows
> explorer. I expected the following to work:
> file:list('//SERVERNAME_or_IP/Freigabename/')
>
> But I get only errors.
> Does anybody know the right way to access a network folder with the file
> module of BaseX under windows?
> (I didn´t find anything in the wiki or by google).
>
> Thanks in advance
>
> Dieter Zanzinger


Re: [basex-talk] BaseX 9.0 sql:prepare not working

2018-01-22 Thread Christian Grün
Thanks for the report. It ought to be working again. With BaseX 9.0,
the integer handles will be replaced with URIs, and something went
wrong in the URI generation step of prepared statements.


On Mon, Jan 22, 2018 at 3:41 PM, Jan Dölle  wrote:
> Hi,
>
> the function sql:prepare it not longer working
>
> Best Regards
>
> Jan
>
> (
>   sql:init("org.sqlite.JDBC"),
>   let $conn := sql:connect("jdbc:sqlite:database.db")
>   let $prep := sql:prepare($conn, "select 'Nothing'")
>   let $result := sql:execute-prepared($prep)
>   return (
>  $result,
>  sql:close($prep),
>  sql:close($conn)
>  )
> )
>
> ->
>
> Improper use? Potential bug? Your feedback is welcome:
> Contact: basex-talk@mailman.uni-konstanz.de
> Version: BaseX 9.0 beta
> Java: Oracle Corporation, 1.8.0_151
> OS: Linux, amd64
> Stack Trace:
> java.lang.NullPointerException
> at org.basex.util.Token.string(Token.java:87)
> at org.basex.query.func.sql.JDBCConnections.add(JDBCConnections.java:42)
> at org.basex.query.func.sql.SqlPrepare.item(SqlPrepare.java:27)
> at org.basex.query.func.sql.SqlPrepare.item(SqlPrepare.java:1)
> at org.basex.query.expr.ParseExpr.value(ParseExpr.java:71)
> at org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:177)
> at org.basex.query.expr.gflwor.GFLWOR$1.next(GFLWOR.java:87)
> at org.basex.query.QueryContext.next(QueryContext.java:398)
> at org.basex.query.expr.List$1.next(List.java:119)
> at org.basex.query.QueryContext.next(QueryContext.java:398)
> at org.basex.query.scope.MainModule$1.next(MainModule.java:122)
> at org.basex.query.QueryContext.next(QueryContext.java:398)
> at org.basex.query.QueryContext.cache(QueryContext.java:620)
> at org.basex.query.QueryProcessor.cache(QueryProcessor.java:112)
> at org.basex.core.cmd.AQuery.query(AQuery.java:86)
> at org.basex.core.cmd.XQuery.run(XQuery.java:22)
> at org.basex.core.Command.run(Command.java:257)
> at org.basex.core.Command.execute(Command.java:93)
> at org.basex.gui.GUI.exec(GUI.java:430)
> at org.basex.gui.GUI.lambda$4(GUI.java:373)
> at java.lang.Thread.run(Thread.java:748)
>
>
> --
> Jan Dölle
> E-Mail: basex-l...@id1.de Telefon +49-69-244502-0 Home: www.id1.de
>
> Information Design One AG, Baseler Straße 10, 60329 Frankfurt am Main
> Registereintrag: Amtsgericht Frankfurt am Main, HRB 52596
> Vorstand: Robert Peters, Aufsichtsrat: Christian Hecht (Vorsitz)
>
>


[basex-talk] BaseX 9.0 sql:prepare not working

2018-01-22 Thread Jan Dölle

Hi,

the function sql:prepare it not longer working

Best Regards

Jan

(
  sql:init("org.sqlite.JDBC"),
  let $conn := sql:connect("jdbc:sqlite:database.db")
  let $prep := sql:prepare($conn, "select 'Nothing'")
  let $result := sql:execute-prepared($prep)
  return (
 $result,
 sql:close($prep),
 sql:close($conn)
 )
)

->

Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 9.0 beta
Java: Oracle Corporation, 1.8.0_151
OS: Linux, amd64
Stack Trace:
java.lang.NullPointerException
    at org.basex.util.Token.string(Token.java:87)
    at 
org.basex.query.func.sql.JDBCConnections.add(JDBCConnections.java:42)

    at org.basex.query.func.sql.SqlPrepare.item(SqlPrepare.java:27)
    at org.basex.query.func.sql.SqlPrepare.item(SqlPrepare.java:1)
    at org.basex.query.expr.ParseExpr.value(ParseExpr.java:71)
    at org.basex.query.expr.gflwor.Let$LetEval.next(Let.java:177)
    at org.basex.query.expr.gflwor.GFLWOR$1.next(GFLWOR.java:87)
    at org.basex.query.QueryContext.next(QueryContext.java:398)
    at org.basex.query.expr.List$1.next(List.java:119)
    at org.basex.query.QueryContext.next(QueryContext.java:398)
    at org.basex.query.scope.MainModule$1.next(MainModule.java:122)
    at org.basex.query.QueryContext.next(QueryContext.java:398)
    at org.basex.query.QueryContext.cache(QueryContext.java:620)
    at org.basex.query.QueryProcessor.cache(QueryProcessor.java:112)
    at org.basex.core.cmd.AQuery.query(AQuery.java:86)
    at org.basex.core.cmd.XQuery.run(XQuery.java:22)
    at org.basex.core.Command.run(Command.java:257)
    at org.basex.core.Command.execute(Command.java:93)
    at org.basex.gui.GUI.exec(GUI.java:430)
    at org.basex.gui.GUI.lambda$4(GUI.java:373)
    at java.lang.Thread.run(Thread.java:748)


--
Jan Dölle
E-Mail: basex-l...@id1.de Telefon +49-69-244502-0 Home: www.id1.de

Information Design One AG, Baseler Straße 10, 60329 Frankfurt am Main
Registereintrag: Amtsgericht Frankfurt am Main, HRB 52596
Vorstand: Robert Peters, Aufsichtsrat: Christian Hecht (Vorsitz)




[basex-talk] BaseX File Module : access network folder on windows server

2018-01-22 Thread Dieter Zanzinger
 
I am working with den BaseX-File-Module for a while and can access a local 
folder, 
for example: file:list('C:/').
 
Now I want the same in a Windows network.
If I create a folder on the Desktop of the local machine = localhost and give 
it a "Freigabe" with "Freigabename" netzlaufwerktestF, it is possible to list 
it´s contents with:
file:list('//WIN7PROPARPC/netzlaufwerktestF/'). 
 
Now I try the same with a folder on a server, which I can access by windows 
explorer. I expected the following to work:
file:list('//SERVERNAME_or_IP/Freigabename/')
 
But I get only errors.
Does anybody know the right way to access a network folder with the file module 
of BaseX under windows?
(I didn´t find anything in the wiki or by google).
 
Thanks in advance
 
Dieter Zanzinger