You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Peter Darton <pe...@intrinsica.co.uk> on 2005/12/01 11:58:08 UTC

JCR-Server initialisation bug

I think I've found a bug in the way the jackrabbit code code
initialises, and possibly a build bug in
jackrabbit/contrib/jcr-server/webapp.

Possible build bug in jackrabbit/contrib/jcr-server/webapp:
I downloaded & built it all.
I uploaded the webapp .war file to tomcat.
Tomcat failed to start - the jcr-server code had failed because it was
looking for org.apache.xalan.processor.TransformerFactoryImpl but the
war file did not include xalan.jar (or serializer.jar).
See attached file "missingJarFilesException.txt" for full exception
text.
I say this is a "possible" build bug because these jar files had to be
placed into maven's "endorsed" directory to workaround an existing
Jackrabbit build bug with JDK5.0, hence this might just be a "side
effect" of that workaround.

The problem is that this then leaves a partly-created directory
structure for the repository:
jackrabbit/
  repository/
    repository/
    version/
      version.dat
    workspaces/
      default/


However, if one then fixes the missing jar files by adding them to the
lib directory in tomcat, and restart the application, one discovers that
the partly-created directory structure now prevents the repository from
starting at all.
The class org.apache.jackrabbit.core.config.RepositoryConfig looks for
valid repositories (there are none, because the creation aborted part
way through), and if there are none, it creates one, but assumes that
nothing exists.  When its attempt to create the directory "default"
fails (because the directory already exists), an exception is thrown.
A workaround is to locate where the directory has been created and
delete it.
See attached file "directoryExistsException.txt" for full details of the
exception.


The above was observed using a copy of JackRabbit downloaded on the 8th
November 2005, build using Java 1.5.0_05 on Linux, run using Java
1.5.0_04 & Netbeans 4.1 (and its built-in Tomcat) on Windows XP.

_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com