Re: [basex-talk] [UPDINDEX] db:add bug
Hi Fabrice, Christian just uploaded a new [snapshot] that should fix the problem. Thanks for your report! Cheers, Lukas [snapshot] http://files.basex.org/releases/latest/ On Fri, Mar 15, 2013 at 5:04 PM, Fabrice Etanchaud fetanch...@questel.comwrote: Dear all, ** ** The following list of commands/queries lead to a bug report : ** ** Set updindex true ** ** Create db mydb ** ** db:add('mydb',root/,'mydb.xml') ** ** Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 7.7 beta Java: Oracle Corporation, 1.7.0_15 OS: Windows 7, amd64 Stack Trace: java.lang.NullPointerException org.basex.data.Data.insert(Data.java:840) org.basex.query.up.primitives.DBNew.addDocs(DBNew.java:57) org.basex.query.up.primitives.DBAdd.prepare(DBAdd.java:49) org.basex.query.up.DatabaseUpdates.check(DatabaseUpdates.java:109) org.basex.query.up.ContextModifier.apply(ContextModifier.java:89) org.basex.query.up.Updates.apply(Updates.java:120) org.basex.query.QueryContext.update(QueryContext.java:281) org.basex.query.QueryContext.value(QueryContext.java:265) org.basex.query.QueryContext.iter(QueryContext.java:250) org.basex.query.QueryContext.execute(QueryContext.java:499) org.basex.query.QueryProcessor.execute(QueryProcessor.java:96) org.basex.core.cmd.AQuery.query(AQuery.java:77) org.basex.core.cmd.XQuery.run(XQuery.java:22) 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.gui.GUI.exec(GUI.java:397) org.basex.gui.GUI$7.run(GUI.java:349) Query plan: QueryPlan FNDb name=add(database,input[,path]) Str value=mydb type=xs:string/ CElem QNm value=root type=xs:QName/ /CElem Str value=mydb.xml type=xs:string/ /FNDb /QueryPlan ** ** Have a nice week-end. ** ** Fabrice ___ 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] store results of a query in a new database
Hi Christian, Am 18.03.2013 um 23:53 schrieb Christian Grün christian.gr...@gmail.com: And my assumption isn't true: The document has to exist, I cannot specify a non-existing document, i.e., a document I maybe would like to produce later as an export of the DB. This sounds surprising to me, as I don’t get any errors when running e.g. the following command.. basex db:create('db', root/, 'doesnotexist.xml') How does your command call look like? It's in the cgi and it looks like this: $session-execute(xquery declare option db:ftindex 'on'; declare option db:updindex 'on'; db:create('annotate-$phraseme', root/, 'annotate-$phraseme.xml')); $phraseme holds the ID to be used. But it's funny, it works today without error, but it didn't work two days ago. And I did not install any updates. So it fixed itself, thanks! Cerstin -- Dr. phil. Cerstin Mahlow Universität Basel Departement Sprach- und Literaturwissenschaften Fachbereich Deutsche Sprach- und Literaturwissenschaft Nadelberg 4 4051 Basel Schweiz Tel: +41 61 267 07 65 Fax: +41 61 267 34 40 Mail: cerstin.mah...@unibas.ch Web: http://www.oldphras.net ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
[basex-talk] Using BaseX in Java - doc?
Hi, I was looking on http://docs.basex.org/ after documentation on integrating BaseX within a Java application, but couldn't find any. Did I miss them? In a few words, I have a Java webapp running in Tomcat, and I'd like to use a BaseX database for the storage. Can I embed it completely? Do I have to start a server as a completely separate process? Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/ ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
[basex-talk] reverse proxy basex behind nginx
Hello List I have basex 7.7 beta running in http server mode with httplocal = false. Access and searches either with the client direct to the BaseX server, or via restxq called directly on the server are a few tens of milliseconds. I have the BaseX httpserver accessible to the external network through a nginx reverse proxy. traceroute shows that a call gets to the machine in about 120ms. However, access and searches of the Basex database from the network are in the order of tens of seconds. I would appreciate details of more successful proxying, and also any hints on the nginx - basex coupling. Many thanks Peter ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] Using BaseX in Java - doc?
Hi, There are lots of examples on this page in the wiki: http://docs.basex.org/wiki/Java_Examples. You might be especially interested in the local examples, if you do not wish to start a server. And yes, you can embed it completely. What is the problem with wildcard imports? I didn't know this is an issue. Cheers, Dirk On Thu, Mar 21, 2013 at 7:09 PM, Kendall Shaw ques...@sonic.net wrote: On 03/21/2013 10:34 AM, Florent Georges wrote: Hi, I was looking on http://docs.basex.org/ after documentation on integrating BaseX within a Java application, but couldn't find any. Did I miss them? In a few words, I have a Java webapp running in Tomcat, and I'd like to use a BaseX database for the storage. Can I embed it completely? Do I have to start a server as a completely separate process? Regards, Hopefully someone has a better answer than this. I am looking at that right now, too. It looks to me like you can embed it using LocalSession. I am basing this on org.basex.test.server.**LocalSessionTest in the tests in basex directory on github. There are other examples there of starting client and server. I wish that the code did not use wildcard imports everywhere. Kendall __**_ BaseX-Talk mailing list basex-t...@mailman.uni-**konstanz.de BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.**de/mailman/listinfo/basex-talkhttps://mailman.uni-konstanz.de/mailman/listinfo/basex-talk -- Dirk Kirsten, BaseX GmbH, http://basex.org |-- Firmensitz: Blarerstrasse 56, 78462 Konstanz |-- Registergericht Freiburg, HRB: 708285, Geschäftsführer: | Dr. Christian Grün, Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22 ___ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
Re: [basex-talk] Using BaseX in Java - doc?
Hi, I have to stop introducing myself with negative comments. If people developing basex like the wildcards then that is a good enough reason to use them. My problem with wildcard imports is that I can't see what classes are imported by looking at the source code. I can use eclipse and find where things are. But, in that case, eclipse would by default be collapsing the imports making the source you see less cluttered than the imports with wildcards. On the other hand, if wildcard imports are used because people are manually typing in the import statements and it is easier to type in wildcards, then such people who are not the author, or are the author a week into the future, would not be able to see what classes were imported because of the wildcards. So, if it is based on the idea that everyone will use eclipse and it reduces clutter, it does the opposite for those people. If it is to make it easier for people not using eclipse, then people who work that way will have the problem of not seeing what classes are imported from looking at the source. For the eclipse people, it's slightly less cluttered and slightly easier to not use wildcards. For the people not using eclipse, it shifts the burden from the person adding the import to everyone in the future. Wow. Lot's of words. About the examples, unless I missed it they all start with someone having manually done something like run a server. So, I was happy that the tests showed how to use a sandbox which was more like where I personally would like to start from, learning about basex. Kendall On 03/21/2013 01:28 PM, Dirk Kirsten wrote: Hi, There are lots of examples on this page in the wiki: http://docs.basex.org/wiki/Java_Examples. You might be especially interested in the local examples, if you do not wish to start a server. And yes, you can embed it completely. What is the problem with wildcard imports? I didn't know this is an issue. Cheers, Dirk On Thu, Mar 21, 2013 at 7:09 PM, Kendall Shaw ques...@sonic.net wrote: On 03/21/2013 10:34 AM, Florent Georges wrote: Hi, I was looking on http://docs.basex.org/ after documentation on integrating BaseX within a Java application, but couldn't find any. Did I miss them? In a few words, I have a Java webapp running in Tomcat, and I'd like to use a BaseX database for the storage. Can I embed it completely? Do I have to start a server as a completely separate process? Regards, Hopefully someone has a better answer than this. I am looking at that right now, too. It looks to me like you can embed it using LocalSession. I am basing this on org.basex.test.server.**LocalSessionTest in the tests in basex directory on github. There are other examples there of starting client and server. I wish that the code did not use wildcard imports everywhere. Kendall __**_ BaseX-Talk mailing list basex-t...@mailman.uni-**konstanz.de BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.**de/mailman/listinfo/basex-talkhttps://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