jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wei <chanchin...@stee.stengg.com>
Subject Can't get it work in tomcat 5.0.28
Date Wed, 05 Apr 2006 09:13:36 GMT
I tried to set up the jackrabbit in tomcat 5.0.28, but i get "[Fatal 
Error] :1:1: Content is not allowed in prolog." error when i tried to lookup a 
repository.  Please help to see anything wrong in my setting.

in server.xml of tomcat, i set the configFilePath to a 
fullpath "F:/Java/jakarta-tomcat-
5.0.28/webapps/rabbittest/docMan", and repHomeDir to "F:/Java/jakarta-tomcat-
5.0.28/webapps/rabbittest/docMan/rep"
<Context path="/rabbittest" docBase="rabbittest" debug="0"
                 reloadable="true" crossContext="true">
	<Resource name="jcr/repository" auth="Container"
		          type="javax.jcr.Repository"/>
		
	<ResourceParams name="jcr/repository">
	  <parameter>
	    <name>factory</name>
    <value>org.apache.jackrabbit.core.jndi.BindableRepositoryFactory</value>
	  </parameter>
	  <parameter>
	    <name>configFilePath</name>
	    <value>F:/Java/jakarta-tomcat-
5.0.28/webapps/rabbittest/docMan</value>
	  </parameter>
	  <parameter>
	    <name>repHomeDir</name>
	    <value>F:/Java/jakarta-tomcat-
5.0.28/webapps/rabbittest/docMan/rep</value>
	  </parameter>
	</ResourceParams>
</Context>

in web.xml, i follow exactly the same as step 2 in 
http://jackrabbit.apache.org/doc/deploy/howto-client.html

in my servlet java file,
InitialContext context = new InitialContext();
Context environment = (Context) context.lookup
("java:comp/env");
Repository repository = (Repository) environment.lookup
("jcr/repository");

Sorry that i have can't paste the whole code here as gmane keep complaining i 
do top-posting if i do it.


Mime
View raw message