<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'Cannot install book code using eXist' | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/63/topics/354</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <item>
      <title>Cannot install book code using eXist posted by Ron Hitchens @ Mon, 14 Apr 2008 02:42:38 -0000</title>
      <description>&lt;p&gt;OK, so I made a last minute change to where the source code is loaded and missed an update to the eXist loader script.  I&amp;#8217;ve updated the sources in Pragmatic&amp;#8217;s svn repository, but if you&amp;#8217;ve already downloaded the source-ball then you may also encounter this issue.&lt;/p&gt;


	&lt;p&gt;You can fix it by adding a single line to the file pragmatic/exist/loaddata.xqy in the unpacked .zip file.  At about line 20, add a line to the function local:load-dir so that it looks like this (don&amp;#8217;t forget the comma):&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
declare function local:load-dir ($coll as xs:string,
        $fsdir as xs:string,
        $pattern as xs:string, $mime-type as xs:string)
{
        local:insure-collection($coll),
        xmldb:store-files-from-pattern ($coll,
                $fsdir, $pattern, $mime-type, true())
};
&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;

	&lt;p&gt;That should do it &amp;#8211; just hit the Load button again.  Sorry for the hassle.&lt;/p&gt;</description>
      <pubDate>Mon, 14 Apr 2008 02:42:38 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:63:354:2587</guid>
      <author>Ron Hitchens</author>
      <link>http://forums.pragprog.com/forums/63/topics/354</link>
    </item>
    <item>
      <title>Cannot install book code using eXist posted by Pete Aven @ Sun, 13 Apr 2008 19:40:57 -0000</title>
      <description>&lt;p&gt;Hi Juan,&lt;/p&gt;


	&lt;p&gt;I had the same issue.  I was able to create the collections using the exist sandbox (&lt;a href="http://localhost:8080/exist/sandbox/sandbox.xql"&gt;http://localhost:8080/exist/sandbox/sandbox.xql&lt;/a&gt;)&lt;br /&gt;In the sandbox evaluate the following ( I ran one at a time )&lt;/p&gt;


	&lt;p&gt;xmldb:create-collection (&amp;#8221;/&amp;#8221;, &amp;#8220;marklogic&amp;#8221;)&lt;br /&gt;xmldb:create-collection (&amp;#8221;/&amp;#8221;, &amp;#8220;xquery1.0&amp;#8221;)&lt;br /&gt;xmldb:create-collection (&amp;#8221;/&amp;#8221;, &amp;#8220;common&amp;#8221;)&lt;br /&gt;xmldb:create-collection (&amp;#8221;/&amp;#8221;, &amp;#8220;exist&amp;#8221;)&lt;/p&gt;


	&lt;p&gt;Once I created the collections, by evaluating the above, I could then run loaddata.xqy successfully and was in business.&lt;/p&gt;</description>
      <pubDate>Sun, 13 Apr 2008 19:40:57 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:63:354:2586</guid>
      <author>Pete Aven</author>
      <link>http://forums.pragprog.com/forums/63/topics/354</link>
    </item>
    <item>
      <title>Cannot install book code using eXist posted by Juan E. Murillo @ Fri, 04 Apr 2008 22:10:29 -0000</title>
      <description>&lt;p&gt;After downloading the example files for the book, I followed the instructions to set up the xQuery code with eXist but I cannot get the data to load to the database. I used eXist because there is no downloadable version of marklogic for Mac &lt;span class="caps"&gt;OS X&lt;/span&gt; (the operating system I use).&lt;/p&gt;


	&lt;p&gt;I get the following error message when loading default.xqy into the browser and&lt;br /&gt;then clicking on the &amp;#8220;Load&amp;#8221; button &amp;#8211; please note that I followed all instructions and did not change any default installation path for eXist:&lt;/p&gt;


	&lt;p&gt;Error found&lt;/p&gt;


	&lt;p&gt;Could not locate collection: /pragmatic/code/marklogic [at line 20, column 9]&lt;/p&gt;


	&lt;p&gt;XQuery Stack Trace&lt;br /&gt;local:load-dir(xs:string, xs:string, xs:string, xs:string)    59:38&lt;br /&gt;Java Stack Trace:&lt;br /&gt;Class Name    Method Name    File Name    Line&lt;br /&gt;org.exist.xquery.functions.xmldb.XMLDBAbstractCollectionManipulator    eval&lt;br /&gt;XMLDBAbstractCollectionManipulator.java    134&lt;br /&gt;org.exist.xquery.BasicFunction    eval    BasicFunction.java    68&lt;br /&gt;org.exist.xquery.InternalFunctionCall    eval    InternalFunctionCall.java    50&lt;br /&gt;org.exist.xquery.AbstractExpression    eval    AbstractExpression.java    59&lt;br /&gt;org.exist.xquery.PathExpr    eval    PathExpr.java    242&lt;br /&gt;org.exist.xquery.UserDefinedFunction    eval    UserDefinedFunction.java    122&lt;br /&gt;org.exist.xquery.FunctionCall    evalFunction    FunctionCall.java    223&lt;br /&gt;org.exist.xquery.FunctionCall    eval    FunctionCall.java    161&lt;br /&gt;org.exist.xquery.AbstractExpression    eval    AbstractExpression.java    59&lt;br /&gt;org.exist.xquery.PathExpr    eval    PathExpr.java    242&lt;br /&gt;org.exist.xquery.ForExpr    eval    ForExpr.java    183&lt;br /&gt;org.exist.xquery.BindingExpression    eval    BindingExpression.java    158&lt;br /&gt;org.exist.xquery.AbstractExpression    eval    AbstractExpression.java    59&lt;br /&gt;org.exist.xquery.PathExpr    eval    PathExpr.java    242&lt;br /&gt;org.exist.xquery.EnclosedExpr    eval    EnclosedExpr.java    68&lt;br /&gt;org.exist.xquery.AbstractExpression    eval    AbstractExpression.java    59&lt;br /&gt;org.exist.xquery.PathExpr    eval    PathExpr.java    242&lt;br /&gt;org.exist.xquery.ElementConstructor    eval    ElementConstructor.java    237&lt;br /&gt;org.exist.xquery.AbstractExpression    eval    AbstractExpression.java    59&lt;br /&gt;org.exist.xquery.PathExpr    eval    PathExpr.java    242&lt;/p&gt;</description>
      <pubDate>Fri, 04 Apr 2008 22:10:29 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:63:354:2546</guid>
      <author>Juan E. Murillo</author>
      <link>http://forums.pragprog.com/forums/63/topics/354</link>
    </item>
  </channel>
</rss>
