<feed xmlns="http://www.w3.org/2005/Atom">
    <id>urn:uuid:8809b162-0794-4810-9a26-4615810d29ad</id>
    <updated>2008-08-23T09:24:44+01:00</updated>
    <title>Troubleshooting</title>
    <author>
        <atom:name xmlns:atom="http://www.w3.org/2005/Atom">wolf</atom:name>
    </author>
    <atom:category xmlns:atom="http://www.w3.org/2005/Atom" scheme="http://exist-db.org/NS/wiki/type/" term="wiki"/>
    <link href="#" rel="edit" type="application/atom+xml"/>
    <link href="#" rel="self" type="application/atom+xml"/>
    <entry>
        <id>urn:uuid:5448f396-2624-4345-be12-8afade3a95a3</id>
        <updated>2008-08-23T09:24:44+01:00</updated>
        <atom:published xmlns:atom="http://www.w3.org/2005/Atom">2008-08-22T20:49:18+01:00</atom:published>
        <link href="?id=urn:uuid:5448f396-2624-4345-be12-8afade3a95a3" rel="edit" type="application/atom+xml"/>
        <title type="text">Design size of Collections</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">CollectionSize</wiki:id>
        <author>
            <atom:name xmlns:atom="http://www.w3.org/2005/Atom">wolf</atom:name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <h1>What is the optimal number of documents in a collection?</h1>
                <p>With current eXist versions you have to find a compromise between query speed and update costs: storing all documents into a single collection results in fast queries. The drawback is that removing or replacing documents can become really slow! On the other hand, using one collection per document would guarantee that document updates run in linear time, but the query overhead would be considerable.</p>
                <p>So if you need reasonable fast updates, the recommendation is to keep the number of documents in one collection below 2000 or so. Otherwise, if you never delete documents, you can easily store some 100,000 docs into one collection.</p>
                <p>We plan to redesign the current index organization in the coming months.</p>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/HowTo/Troubleshooting"/>
    </entry>
    <entry>
        <id>urn:uuid:0a59ff4f-6250-444d-bac2-700be2d7b99d</id>
        <updated>2008-08-22T20:31:40+01:00</updated>
        <atom:published xmlns:atom="http://www.w3.org/2005/Atom">2008-08-22T20:31:40+01:00</atom:published>
        <link href="?id=urn:uuid:0a59ff4f-6250-444d-bac2-700be2d7b99d" rel="edit" type="application/atom+xml"/>
        <title type="text">eXist-db does not work/install on RedHat, Ubuntu, Linux</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">LinuxInstall</wiki:id>
        <author>
            <atom:name xmlns:atom="http://www.w3.org/2005/Atom">wolf</atom:name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Probably you use the default installed java version, gnu classpath/gjc. We recommend the Sun JVM, but JVMs of other vendors should work as well</p>
                <p>Search for "gjc" in the errormessages:</p>
                <pre>java.lang.ArrayIndexOutOfBoundsException
   at java.lang.System.arraycopy(libgcj.so.70)
   at java.io.ObjectInputStream.read(libgcj.so.70 )
   at java.io.InputStream.skip(libgcj.so.70)
   at com.izforge.izpack.installer.Unpacker.run(Unpacker.java:425)
   at java.lang.Thread.run(libgcj.so.70)</pre>
                <p> 
or </p>
                <pre>12 Aug 2008 16:34:31,161 [P1-9] WARN  (ServletHandler.java
[handle]:629) - Error for /exist/logo.jpg
java.lang.NoClassDefFoundError: org.apache.cocoon.reading.ImageReader
  at java.lang.Class.initializeClass(libgcj.so.81)
  at java.lang.Class.newInstance(libgcj.so.81)
</pre>
                <p>or</p>
                <pre>Exception in thread "main" java.lang.InternalError: unexpected exception
during linking: java.lang.ClassNotFoundException: javax.swing.JFrame
  at 0x004f8ca3: java.lang.Throwable.Throwable(java.lang.String)
(/usr/lib/./libgcj.so.3)
  at 0x004ebb1e: java.lang.Error.Error(java.lang.String)
(/usr/lib/./libgcj.so.3)
  at 0x004f9086:
java.lang.VirtualMachineError.VirtualMachineError(java.lang.String)
(/usr/lib/./libgcj.so.3)
</pre>
                <p>
                    <span class="strong">ant</span> can help you out to determine the java version:</p>
                <pre>ant -diagnostics | grep java.vm</pre>
                <p>or</p>
                <pre>build.sh diagnostics | grep java.vm</pre>
                <p>results in</p>
                <pre>java.vm.version : 1.5.0_13-119
java.vm.vendor : Apple Inc.
java.vm.name : Java HotSpot(TM) Client VM
java.vm.specification.name : Java Virtual Machine Specification
java.vm.specification.vendor : Sun Microsystems Inc.
java.vm.specification.version : 1.0
java.vm.info : mixed mode
</pre>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/HowTo/Troubleshooting"/>
    </entry>
    <entry>
        <id>urn:uuid:7ebdbcd6-a601-4656-80c8-7bd33ff82613</id>
        <updated>2008-08-22T20:30:58+01:00</updated>
        <atom:published xmlns:atom="http://www.w3.org/2005/Atom">2008-08-22T20:30:58+01:00</atom:published>
        <link href="?id=urn:uuid:7ebdbcd6-a601-4656-80c8-7bd33ff82613" rel="edit" type="application/atom+xml"/>
        <title type="text">Explicit validation does not work in Apache Tomcat</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">ValidationTomcat</wiki:id>
        <author>
            <atom:name xmlns:atom="http://www.w3.org/2005/Atom">wolf</atom:name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>There are indeed limitations regarding the functionality of the "validation:" functions, due to restrictions of tomcat. These are very vague.</p>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/HowTo/Troubleshooting"/>
    </entry>
    <entry>
        <id>urn:uuid:facee87b-004d-4fe7-b818-ea5bd8181a7a</id>
        <updated>2008-08-22T20:30:11+01:00</updated>
        <atom:published xmlns:atom="http://www.w3.org/2005/Atom">2008-08-22T20:30:11+01:00</atom:published>
        <link href="?id=urn:uuid:facee87b-004d-4fe7-b818-ea5bd8181a7a" rel="edit" type="application/atom+xml"/>
        <title type="text">eXist-db does not start in Apache Tomcat</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">TomcatStartup</wiki:id>
        <author>
            <atom:name xmlns:atom="http://www.w3.org/2005/Atom">wolf</atom:name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>The war files are tested and should work. Be sure that tomcat is not setup with the "SecurityManager" enabled (we should work this out) and that (for older versions of tomcat) all relevant XML jar files (xerces, resolver, xalan) have been installed in the 'endorsed' directory.</p>
                <p>For more information check our documentation.</p>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/HowTo/Troubleshooting"/>
    </entry>
    <entry>
        <id>urn:uuid:18eb7c06-f21d-4e88-9149-c8e617e029d4</id>
        <updated>2008-08-22T20:32:38+01:00</updated>
        <atom:published xmlns:atom="http://www.w3.org/2005/Atom">2008-08-22T20:28:45+01:00</atom:published>
        <link href="?id=urn:uuid:18eb7c06-f21d-4e88-9149-c8e617e029d4" rel="edit" type="application/atom+xml"/>
        <title type="text">My webstart client does not start (with log)</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">webstart</wiki:id>
        <author>
            <atom:name xmlns:atom="http://www.w3.org/2005/Atom">wolf</atom:name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Probably you see something like</p>
                <div class="ext:code">
An error occurred while launching/running the application.
Title: eXist XML-DB client
Vendor: exist-db.org
Category: Security Error
Unsigned application requesting unrestricted access to system
Unsigned resource: http://localhost:8080/exist/webstart/stax-api-1.0.1.jar
</div>
                <p>while the exception reads like:
 </p>
                <div class="ext:code">
JNLPException[category: Security Error : Exception: null : LaunchDesc: 
&lt;jnlp spec="1.0+" codebase="http://localhost:8080/exist/webstart/"
      href="http://localhost:8080/exist/webstart/exist.jnlp"&gt;
</div>
                <p>The solution is to re-sign the jar files:</p>
                <pre>build.sh -f build/scripts/jarsigner.xml jnlp-unsign-all jnlp-sign-all</pre>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/HowTo/Troubleshooting"/>
    </entry>
    <entry>
        <id>urn:uuid:50b23f21-d695-4e46-93a8-5193ea6fad6a</id>
        <updated>2008-08-21T19:52:59+01:00</updated>
        <atom:published xmlns:atom="http://www.w3.org/2005/Atom">2008-08-21T13:31:13+01:00</atom:published>
        <link href="?id=urn:uuid:50b23f21-d695-4e46-93a8-5193ea6fad6a" rel="edit" type="application/atom+xml"/>
        <title type="text">How to restore into a clean database?</title>
        <wiki:id xmlns:wiki="http://exist-db.org/xquery/wiki">Restore</wiki:id>
        <author>
            <atom:name xmlns:atom="http://www.w3.org/2005/Atom">wolf</atom:name>
        </author>
        <atom:content xmlns:atom="http://www.w3.org/2005/Atom" type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>If your db instance crashed (e.g. by running out of memory or other fatal errors), eXist will usually trigger an automatic recovery run, which should restore the database into a consistent state.</p>
                <p>However, it sometimes happens that the recovery fails or you start seeing fatal exceptions in the logs, even though the recovery completed normally. In this case, it might be necessary to restart with a clean environment (which is also important when debugging an error).</p>
                <h3>Create a backup</h3>
                <p>Before cleaning the db, you need to create a backup of your data. For older eXist versions, use the Java admin client to create a <a href="http://exist-db.org/backup.html#N10350">backup</a>. Since version 1.2.1, eXist also provides a <a href="http://exist-db.org/backup.html#N10350">check and export tool</a>, which has the advantage that it will test your db for errors before running the export.</p>
                <p>If you have problems to even start the db, try removing all .log files from the <code>webapp/WEB-INF/data</code> directory.</p>
                <h3>Clean the database directory</h3>
                <p>Stop the database instance if you have not already done so and remove all files from the <code>webapp/WEB-INF/data</code> directory. eXist will recreate those files the next time it is started.</p>
                <h3>Restore the backup</h3>
                <p>Restart eXist. The db should now be empty and you can restore the previously created backup using the Java admin client.</p>
            </div>
        </atom:content>
        <atom:link xmlns:atom="http://www.w3.org/2005/Atom" type="blog" href="/db/apps/wiki/data/HowTo/Troubleshooting"/>
    </entry>
</feed>