Hi Sol,

Your app server is bound to a certain database. You need to make sure that the 
forest you are targetting is part of the documents database that is assigned to 
your app server. It sounds like your app server is using a database of which 
your MyForest isn't part. If you haven't assigned your forest to any database, 
you could assign it to the database that is assigned to your app server. 
Alternatively, you could create a new database, add your forest to that one, 
and tie that database as documents database to your app server.

I tend to prefer to use separate databases for different app servers, unless 
there is a good reason to share the data with other app servers. And you might 
better not point to forests yourself. It makes things complicated if you decide 
later on to have multiple forest to store the data of your database. Just use a 
separate database, and let MarkLogic Server decide for it self how to divide 
the content between the forests of that database..

Kind regards,
Geert

Van: [email protected] 
[mailto:[email protected]] Namens Sol Lederman
Verzonden: zondag 13 februari 2011 21:40
Aan: [email protected]
Onderwerp: [MarkLogic Dev General] xdmp-document load doesn't see my forest

Hi,

I'm new to MarkLogic.

I'm trying to create a service that imports a bunch of documents into ML. I've 
created an HTTP application and I've created a .xqy script that calls 
xdmp-document-load like this:

for $x in tokenize($urls," ")
  return
   xdmp:document-load($x,
   <options xmlns="xdmp:document-load" xmlns:http="xdmp:http">
      <repair>none</repair>
      <permissions>{xdmp:default-permissions()}</permissions>
      <format>xml</format>
      <http:authentication>
          <http:username>xxxxxxxxx</http:username>
         <http:password>xxxxxxxx</http:password>
      </http:authentication>
      <forests>
           <forest>{xdmp:forest("MyForest")}</forest>
      </forests>
   </options>)

I then do a POST to the URL where the .xqy script is and I get this error:

<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>
    <title>500 Internal Server Error</title>
    <meta name="robots" content="noindex,nofollow"/>
    <link rel="stylesheet" href="/error.css"/>
  </head>
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                  <body>
    <span class="error">
      <h1>500 Internal Server Error</h1>
      <dl>
        <dt>XDMP-FORESTNID: Specified forest 12171438460380643660 not in 
database</dt>
        <dd></dd>
        <dt> [1.0-ml]</dt>
        <dd></dd>
      </dl>
    </span>
  </body>
</html>

I believe the forest is there because cq loads the document just fine with the 
exact same function call. Also, if I list the forests with the admin tool that 
forest is there.

What am I missing?

Thanks.

Sol
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to