John Preimonas | 29 Aug 02:56 2014
Picon

Creating a web app question

This may sound stupid but I am new to eXist: When creating a New App what do I put in the "Name"?  I don't have a web
page. Do I use something like http://local host:8080/apps/gliding ?

Sent from my iPhone
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
John Preimonas | 28 Aug 12:56 2014
Picon

What is an Error 500?

Hi,

One of my Xquerys which ran last night is now not working. I get the following message. I tracked down ~.lock.2.xml in ./fs/db/Gliding-Logbook/gliders/data and deleted it. Now I cannot work on or in the folder ‘gliders’. I’ve tried deleting it, and recovering a backup copy but it get: "The operation can’t be completed because one or more required items can’t be found.(Error code -43)
All indications seem to point me to the folder ‘gliders’ is corrupt, and eXist is confused. I sometime can build gliders folder but I then get errors trying to build /data /edit & /views. Using webdav doesn’t help either. I create new folders but I cannot rename them to data or edit or views. i constantly get server errors or these folders already exist - but I cannot see them. I’v stopped the server and restarted it. Nothing helps. This product is a mess.


Attached is the app that gave me the 500 error (if that helps - but i doubt it)

Also, I have had to rebuild my database because something caused an irretrievable crash. I had to delete all references to eXist-db (i.e. org.exist, etc) before I could even load a virgin copy of eXist, then rebuild the application and rebuild the xml data files. So I would like to thank you for your responses to my previous queries (‘Cannot run HTML’ - I can do that now. I am still trying to get ‘Unable to run POST/GET on my eXist-db’ to work. I will be experimenting with betterForms to see if I can come up with some sort of solution.)
Attachment (list-flights-w-costs.xq): application/octet-stream, 10 KiB

HTTP ERROR 500

Problem accessing /exist/rest/db/Gliding-Logbook/flights/views/list-flights-w-costs.xq. Reason:

An error occurred: Invalid URI: xmldb URI scheme has no instance name: xmldb:.~lock.2.xml#

Caused by:

javax.servlet.ServletException: An error occurred: Invalid URI: xmldb URI scheme has no instance name: xmldb:.~lock.2.xml# at org.exist.http.servlets.EXistServlet.doGet(EXistServlet.java:256) at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:575) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:229) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:103) at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50) at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:221) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:932) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:994) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) 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) Caused by: java.lang.IllegalArgumentException: Invalid URI: xmldb URI scheme has no instance name: xmldb:.~lock.2.xml# at org.exist.xmldb.XmldbURI.create(XmldbURI.java:188) at org.exist.dom.BinaryDocument.read(BinaryDocument.java:97) at org.exist.storage.NativeBroker$DocumentCallback.indexInfo(NativeBroker.java:3898) at org.exist.storage.btree.BTree$BTreeNode.query(BTree.java:1834) at org.exist.storage.btree.BTree$BTreeNode.query(BTree.java:1761) at org.exist.storage.btree.BTree$BTreeNode.access$12(BTree.java:1736) at org.exist.storage.btree.BTree.query(BTree.java:381) at org.exist.storage.NativeBroker.getCollectionResources(NativeBroker.java:2278) at org.exist.collections.Collection.read(Collection.java:1027) at org.exist.storage.NativeBroker.openCollection(NativeBroker.java:953) at org.exist.storage.NativeBroker.openCollection(NativeBroker.java:823) at org.exist.storage.NativeBroker.getCollection(NativeBroker.java:818) at org.exist.xquery.functions.fn.ExtCollection.eval(ExtCollection.java:136) at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:56) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ForExpr.eval(ForExpr.java:197) at org.exist.xquery.ForExpr.eval(ForExpr.java:304) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:164) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.EnclosedExpr.eval(EnclosedExpr.java:80) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:311) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:311) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:311) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:311) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.XQuery.execute(XQuery.java:297) at org.exist.xquery.XQuery.execute(XQuery.java:217) at org.exist.http.RESTServer.executeXQuery(RESTServer.java:1533) at org.exist.http.RESTServer.doGet(RESTServer.java:508) at org.exist.http.servlets.EXistServlet.doGet(EXistServlet.java:222) ... 41 more

Caused by:

java.lang.IllegalArgumentException: Invalid URI: xmldb URI scheme has no instance name: xmldb:.~lock.2.xml# at org.exist.xmldb.XmldbURI.create(XmldbURI.java:188) at org.exist.dom.BinaryDocument.read(BinaryDocument.java:97) at org.exist.storage.NativeBroker$DocumentCallback.indexInfo(NativeBroker.java:3898) at org.exist.storage.btree.BTree$BTreeNode.query(BTree.java:1834) at org.exist.storage.btree.BTree$BTreeNode.query(BTree.java:1761) at org.exist.storage.btree.BTree$BTreeNode.access$12(BTree.java:1736) at org.exist.storage.btree.BTree.query(BTree.java:381) at org.exist.storage.NativeBroker.getCollectionResources(NativeBroker.java:2278) at org.exist.collections.Collection.read(Collection.java:1027) at org.exist.storage.NativeBroker.openCollection(NativeBroker.java:953) at org.exist.storage.NativeBroker.openCollection(NativeBroker.java:823) at org.exist.storage.NativeBroker.getCollection(NativeBroker.java:818) at org.exist.xquery.functions.fn.ExtCollection.eval(ExtCollection.java:136) at org.exist.xquery.InternalFunctionCall.eval(InternalFunctionCall.java:56) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ForExpr.eval(ForExpr.java:197) at org.exist.xquery.ForExpr.eval(ForExpr.java:304) at org.exist.xquery.BindingExpression.eval(BindingExpression.java:164) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.EnclosedExpr.eval(EnclosedExpr.java:80) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:311) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:311) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:311) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.ElementConstructor.eval(ElementConstructor.java:311) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.PathExpr.eval(PathExpr.java:264) at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) at org.exist.xquery.XQuery.execute(XQuery.java:297) at org.exist.xquery.XQuery.execute(XQuery.java:217) at org.exist.http.RESTServer.executeXQuery(RESTServer.java:1533) at org.exist.http.RESTServer.doGet(RESTServer.java:508) at org.exist.http.servlets.EXistServlet.doGet(EXistServlet.java:222) at javax.servlet.http.HttpServlet.service(HttpServlet.java:735) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:575) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:229) at org.eclipse.jetty.server.Dispatcher.forward(Dispatcher.java:103) at org.exist.http.urlrewrite.Forward.doRewrite(Forward.java:50) at org.exist.http.urlrewrite.XQueryURLRewrite.service(XQueryURLRewrite.java:221) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:457) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:533) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:368) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:488) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:932) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:994) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) 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) Powered by Jetty://



















Regards,
John

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
mountainbiker | 28 Aug 10:15 2014
Picon

response:stream() terminates with a 500 and I want a 404

In some controller code, I am getting a server error of 500 on the following:

let $item := response:set-error-code(404)
let $html := &lt;h1>error 404&lt;/h1>
return response:stream($html, "media-type=text/html"

However, I get a 404 with 

let $item := response:set-error-code(404)
let $html := &lt;h1>error 404&lt;/h1>
return $html
(: but side-effect is it continues on, and I don't want it to :)

/*What am I missing?  How can I get the first example to provide a 404, or
the second example to terminate gracefully?*/

--
View this message in context: http://exist.2174344.n4.nabble.com/response-stream-terminates-with-a-500-and-I-want-a-404-tp4665320.html
Sent from the exist-open mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
josh2007 | 28 Aug 01:17 2014
Picon

EXPath Http Client produces serialization error for multipart post

Hi everybody,

Did anyone succeed sending multipart requests with EXPath Http Client?

This test taken from
"https://github.com/adamretter/expath-http-client-java/blob/master/samples/post-params.xq"
returns the following error: 

exerr:ERROR Error executing the HTTP method: Error serializing the body
content [source: XXXX.xq]

Test:

xquery version "3.0";

declare namespace http = "http://expath.org/ns/http-client";

let $request := 
<http:request method="post" http-version="1.0"
href="http://localhost:8080/exist/XXX">
<http:multipart media-type="multipart/form-data" boundary="xyzBouNDarYxyz">
<http:header name="content-disposition" value='form-data; name="a"'/>
<http:body media-type="text/plain">3</http:body>
<http:header name="content-disposition" value='form-data; name="b"'/>
<http:body media-type="text/plain">4</http:body>
</http:multipart>
</http:request>

return http:send-request($request)

Thank you for any input.

Josh

--
View this message in context: http://exist.2174344.n4.nabble.com/EXPath-Http-Client-produces-serialization-error-for-multipart-post-tp4665314.html
Sent from the exist-open mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Martin Mueller | 27 Aug 18:32 2014

Is there an XML based collaborative curation environment?

I have sent this post simultaneously to the eXist, baseX, and TEI lists in
the hope that I will get some useful advice  on how to cobble together an
XML-based collaborative curation platform. If there is something "out
there" that meets some of my requirements I would love to hear about it.

Phil Burns, Craig Berry, and I  have been engaged in an informal project
that I call Shakespeare His Contemporaries (SHC). The source texts for SHC
are the TCP transcriptions, transformed into TEI P5 with Abbot and
linguistically with MorphAdorner. To goal is to produce "good enough"
texts (in original and standardized spellings) through collaborative
curation, enlisting the help of educated amateurs as well as professional
scholars. A group of Northwestern undergraduate on summer internships
fixed about 70% of some 45,000 known errors in almost 500 Early Modern
non-Shakespearean plays and demonstrated that you don't need to have a
Ph.D. to make valuable contributions to scholarship.

My curation framework has been a mixture of XML and SQL. MorphAdorner can
spit out its data as a TEI file or in a tabular
format.(http://morphadorner.northwestern.edu). The latter is easily turned
into a MySQL database.  AnnoLex, our curation tool
(http://annolex.at.northwestern.edu), was built by Craig Berry. It is a
Django web site that talks to an underlying MySQL database and lets
registered users make emendations that are kept in a separate table for
subsequent review and integration into the XML files. MorphAdorner
includes scripts for updating XML files in the light of approved
emendations. It also keeps track of changes made.

This system works well in environments where curators operate in a
controlled and work-like environment, cycling through textual phenomena
selected by some criteria likely to return incomplete or incorrect text.
It works well  because most of the errors in the TCP transcriptions are of
a very simple kind that lends itself to an 'atomic' word by word
treatment.The combination of Django and a relational database makes it
very easy to keep track of who did what where and when, and who approved
or rejected an emendation. These are non-trivial virtues, and there are
many TCP errors that can be fixed by this method before you run up against
its limits.

On the other hand, this method does not support what I call "curation en
passant," readers reading "with a pencil" or its digital equivalent,
stopping here or there to question a word or passages and offering a
diagnosis or emendation as a marginal gloss. I would like to have an
curation environment that looks like a page that supports reading of the
common garden variety but through a click on a word  shows a pop-up window
that lists the properties of a token and offers a template for structured
and free-form annotation.

The current model also fails when it comes to making changes in the XML
structure. In terms of the immediate needs of a project that focus on
EEBO-TCP drama texts, the most common errors involve just the correction
of  a tag name: turning <stage> into <l> or the other way round. There are
ways in which these errors could be corrected by extending AnnoLex, but it
would be clumsy, and it would not support more substantial changes in the
XML structure. So you want a curation environment that lets you manipulate
the XML structure as well as the words inside elements.  For instance,
half the plays in the EEBO-TCP collections are not divided into acts and
scenes because such a division is lacking in the printed source.  Adding
scene divisions (with an appropriate notation that they are supplied by an
editor) is an important step towards making the texts more "machine
actionable," and a proper digital corpus should be both human readable and
machine actionable.

The best curation environment would be XML based, but I wonder about
scale. As I understand it, 'scale' in an XML application is a function of
the number of documents, their size, and the complexity of encoding. The
SHC corpus has about 500 documents and could grow to 1,000 if one
interpreted "contemporaries" more generously or decided to include
Shakespeare's Restoration heirs. Most plays fall in a range between 15,000
and 25,000 words. In a linguistically annotated corpus the typical leaf
node is a <w> or <pc> element with a set of attributes, such as

<w xml:id="A04632_0500750" lemma ="Cleopatra", ana="#npg1">Cleopatraes</w>

The modal XPath of such a leaf node goes like

TEI/text/body/div <at> act/div <at> scene/sp/l/w

There are about 12 million Xpaths in the SHC corpus, and it is important
for readers to be able to move quickly from one to the other within and
across plays so as to support what I call "cascading curation," where the
diagnosis of an error in one play leads to the question whether there are
similar errors elsewhere.

So much for scale, and I don't know whether it is a big problem, a small
problem, or no longer a problem at all. If you want to extend a curation
model from 500 plays to the eventually 70,000 texts in the EEBO TCP corpus
there might be a scale problem. On the other hand, if you think of
collaborative curation in a humanities environment and you think of
scholarly data communities that organize themselves around some body of
texts, it may be that something like 1,000 texts or 50 millon words words
is a good enough upper limit: breaking down the big city of a large corpus
into "corpus villages" (perhaps with some overlap) may be technically and
socially preferable.

I don't have a very clear idea how a permissions regime would work in an
XML environment. It is clear to me that a change of any kind should take
the form of an annotation and that the integration of such an annotation
into the source text would be the work of an editor with special
privileges. There needs to be a clear trail of the 'who, what, when, and
where' of any textual change, and as much a possible of this detail should
be logged automatically.   The scholarly communities I'm familiar with are
unlikely to accept texts as curated unless there are familiar  seals of
good housekeeping that they recognize as the equivalent of the assurances
that come with a reputable printed text.

I could go on in considerable detail about the needs of our project (and
similar ones), but I hope I have outlined enough of the requirements in
sufficient detail.

Thanks in advance for any advice

Martin Mueller
Professor emeritus of English and Classics
Northwestern University

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Alasdair Dougall | 27 Aug 20:45 2014
Picon

Best options for root setting

Hi All,

As I have been busily converting my old java / eXist web app to run solely on eXist, I have reached a point where I want to base the root path to point to my app.

My App exists in '/db/apps/foodiesite' (URL is 'http://localhost:8080/exist/apps/foodiesite/'), but when I publish it locally for testing, I want the URL to be in the form foodiesite.local (which points to 127.0.0.1) and for the controller-config.xml file, I added:

   <!-- <root pattern=".*" path="/"/> -->
   <root server-name="foodiesite.local" 
      pattern="/*" path="xmldb:exist:///db/apps/foodiesite/"/>

This didn't work, but I can confirm if I launch the App from dashboard it response as it should.

So, question is how to configure the eXist server to serve my App at the root level?

Thanks in advance,

Alasdair
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
p_j_anderson | 27 Aug 13:42 2014
Picon

Startup error v2.1 binary distro (homepage, portal contexts) - IncompatibleClassChangeError

Hi,

My problem is that when I start eXist installed (headless, so with all options, but otherwise empty) from
the 2.1 stable binary (eXist-db-setup-2.1-rev18721.jar), the contexts /portal and /homepage fail to
initialize. The logs show one java.lang.IncompatibleClassChangeError for each failed context (see below).
I am running eXist on 64 bit Linux (up-to-date Debian), Oracle Java 6 and Java 7 latest updates (both give the
same result).

I think the problem has already cropped up over the past year (including the past couple of days) and has been
discussed and then put aside each time without a definitive answer as far as I know.

If I can live without /homepage and /portal, shall I just ignore the errors? Or is it better to rely on 2.2?

Thanks

Paul.

>>>>
java.lang.IncompatibleClassChangeError: Implementing class 
java.lang.IncompatibleClassChangeError: Implementing class
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.eclipse.jetty.annotations.AnnotationConfiguration.createAnnotationParser(AnnotationConfiguration.java:154)
	at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:105)
	at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:466)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1245)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
	at org.eclipse.jetty.server.Server.doStart(Server.java:280)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.exist.jetty.JettyStart.run(JettyStart.java:187)
	at org.exist.jetty.JettyStart.main(JettyStart.java:71)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.exist.start.Main.invokeMain(Main.java:126)
	at org.exist.start.Main.run(Main.java:448)
	at org.exist.start.Main.main(Main.java:50)
27 Aug 2014 11:43:47,431 [main] WARN  (DeploymentManager.java [requestAppGoal]:501) - Unable to reach
node goal: started 
java.lang.IncompatibleClassChangeError: Implementing class
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
	at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at org.eclipse.jetty.annotations.AnnotationConfiguration.createAnnotationParser(AnnotationConfiguration.java:154)
	at org.eclipse.jetty.annotations.AnnotationConfiguration.configure(AnnotationConfiguration.java:105)
	at org.eclipse.jetty.webapp.WebAppContext.configure(WebAppContext.java:466)
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1245)
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:39)
	at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:186)
	at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:494)
	at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:141)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:145)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:56)
	at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:609)
	at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:540)
	at org.eclipse.jetty.util.Scanner.scan(Scanner.java:403)
	at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:337)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:121)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:555)
	at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:230)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.eclipse.jetty.util.component.AggregateLifeCycle.doStart(AggregateLifeCycle.java:81)
	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:58)
	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:96)
	at org.eclipse.jetty.server.Server.doStart(Server.java:280)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
	at org.exist.jetty.JettyStart.run(JettyStart.java:187)
	at org.exist.jetty.JettyStart.main(JettyStart.java:71)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.exist.start.Main.invokeMain(Main.java:126)
	at org.exist.start.Main.run(Main.java:448)
	at org.exist.start.Main.main(Main.java:50)

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
Nick Sincaglia | 27 Aug 00:57 2014

Schematron Validation

I am trying to validate an XML document using a schematron file within eXist-db. I am able to perform this task using Oxygen which tells me my XML and schematron file are valid.

I am following this example (which I have tested and it works fine on my system)

However, when I try to replace the XML schema file with a schematron file I receive an error saying “org.xml.sax.SAXParseException:  no implementation available for schema language with namespace URI "http://purl.oclc.org/dsdl/schematron” 

I also tried replacing the validation:validation-report() function with the validation:jing-report() function but that did not change anything. 

What am I doing wrong? Do I have to configure something within eXist-db to support this namespace URI? Is there something I need to enable or install?

Any help would be greatly appreciated.

Nick

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
josh2007 | 26 Aug 18:04 2014
Picon

Problem converting Base64Binary data to raw binary data for Google Drive Api

Hi everybody.

I want to upload an image to Google Drive.
The image needs to be sent as raw binary data.

However, when loading the file using a form and fetching it with
request:get-uploaded-file-data(), I receive a base64Binary content.

I tried to convert base64 to raw binary using util:base64-decode() and
util:binary-to-string(), but the result is a malformed raw data with
unreadable characters.

My question: is there a way to get raw binary data from base64 or to receive
multipart/form-data content as raw binary?

Thanks,

Josh

Here is my test case, which requires an access_token.

xquery version "3.0";

declare namespace request = "http://exist-db.org/xquery/request";
declare namespace httpclient = "http://exist-db.org/xquery/httpclient";

let $form := 
	<form id="upload" method="POST" action="?uploaded=true"
enctype="multipart/form-data">
		<input type="file" name="file" id="file"/>
		<input type="submit" value="Upload"/>
	</form>

let $uploaded := request:get-parameter("uploaded", ())

return
	if ($uploaded)
	then 
		let $method := "post"
		let $url :=
"https://www.googleapis.com/upload/drive/v2/files?uploadType=media"
		let $headers := 
			<headers>
				<header name="Authorization" value="Bearer XXXX_access_token_XXXXX"/>
				<header name="Content-Type" value="image/jpeg"/>
			</headers>
		let $content :=
util:binary-to-string(request:get-uploaded-file-data("file"))
		return httpclient:post($url, $content, false(), $headers)
	else response:stream($form, "method=html5 media-type=text/html
omit-xml-declaration=yes indent=yes")

--
View this message in context: http://exist.2174344.n4.nabble.com/Problem-converting-Base64Binary-data-to-raw-binary-data-for-Google-Drive-Api-tp4665281.html
Sent from the exist-open mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
W.S. Hager | 26 Aug 17:46 2014
Picon

old fulltext directive

Hi,

Can the old fulltext index directive be removed yet in the latest dev?

If not, when? Just a question.

Thanks.

--

W.S. Hager
Lagua Web Solutions
http://lagua.nl

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Exist-open mailing list
Exist-open <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/exist-open
tech.vronk | 26 Aug 14:59 2014
Picon

xqsuite NullPointerException

Hi all,

trying to employ xqsuite, I ran into following:

for certain functions I get the message
<error type="java:java.lang.NullPointerException" message=""/>

my setup is:
a separate module for testing a number of other modules.
so the invoked function is a wrapper for the actually tested function.
Calling both the test-function and the tested function separately works 
fine.

the (quite simplified) definition (that still delivers the error) is:

  declare
     %test:name("execute query on test data")
     %test:arg("q", "persName=ferdinandus")
     %test:assertEquals("anything")
  function qix-tests:execute-query($q) as item()* {
     query:execute-query-map($q, (), ())
  };

full output:
<testsuites>
<testsuite package="http://aac.ac.at/content_repository/qix/tests" 
timestamp="2014-08-26T14:52:28.148+02:00" failures="0" tests="2" 
time="PT0.008S">
<testcase name="execute query on test data" 
class="qix-tests:execute-query"><error 
type="java:java.lang.NullPointerException" message=""/>
</testcase><testcase name="transform query to xpath" 
class="qix-tests:query-to-xcql"/>
</testsuite></testsuites>

nothing is written to log...

exist-version: git-stable, build from january this year (20140117)

any ideas how to debug this, or what the problem could be.

Or in general any ideas/experiences on xqsuite?
Basically, I like the idea (the approach with declarative annotations ),
but the debugging last day spent debugging the test setup, makes me 
wonder, if this is the way to go.

best,
matej

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/

Gmane