You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "Phukan, Anit" <An...@intuit.com> on 2009/11/10 19:41:45 UTC

Clustering issue with Jackrabbit

Hi,

Has anyone faced issues while clustering Jackrabbit repository nodes?

I am getting the following exceptions while starting up the jboss app server with the cluster configured repository.xml

Caused by: javax.jcr.RepositoryException: Invalid repository configuration: repository.xml: File system initialization failure.: failed to initialize file system: File system initialization failure.: failed to initialize file system: failed to initialize file system
	at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:250)
	at org.apache.jackrabbit.core.TransientRepository.startRepository(TransientRepository.java:265)
	at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:333)
	at org.apache.jackrabbit.core.TransientRepository.login(TransientRepository.java:363)
	at com.intuit.internal.objectstore.IStoreObjectImpl.<clinit>(IStoreObjectImpl.java:70)
	... 109 more
Caused by: org.apache.jackrabbit.core.config.ConfigurationException: File system initialization failure.: failed to initialize file system: failed to initialize file system
	at org.apache.jackrabbit.core.config.FileSystemConfig.createFileSystem(FileSystemConfig.java:54)
	at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:210)
	at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:497)
	at org.apache.jackrabbit.core.TransientRepository$2.getRepository(TransientRepository.java:245)
	... 113 more
Caused by: org.apache.jackrabbit.core.fs.FileSystemException: failed to initialize file system
	at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:190)
	at org.apache.jackrabbit.core.config.FileSystemConfig.createFileSystem(FileSystemConfig.java:47)
	... 116 more
Caused by: java.sql.SQLException: No suitable driver found for jdbc:sqlserver:xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx
	at java.sql.DriverManager.getConnection(DriverManager.java:602)
	at java.sql.DriverManager.getConnection(DriverManager.java:185)
	at org.apache.jackrabbit.core.fs.db.DbFileSystem.getConnection(DbFileSystem.java:187)
	at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.initConnection(DatabaseFileSystem.java:988)
	at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:172)
	... 117 more

I have been using the same DB config for unclustered Jackrabbit operations.

This is how my repository.xml looks like for the clustered part:

<Cluster id="node1" syncDelay="2000">
		<Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal">
		 <param name="revision" value="${rep.home}/revision.log" />
		 <param name="driver" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
			<param name="url" value="jdbc:sqlserver:xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx" />
		 <param name="user" value="xxxx" />
         <param name="password" value="xxxxxxxxxxx" />
		</Journal>
	</Cluster>	


Thanks
Anit

-----Original Message-----
From: Florian Roth [mailto:Florian.Roth@in-gmbh.de] 
Sent: Monday, November 09, 2009 11:59 PM
To: users@jackrabbit.apache.org
Subject: AW: jackrabbit-webapp local access from webapp in same tomcat container

Good morning,

I solved one of the problems. Now I can access via crossContext the jackrabbit-webapp. Problem was, that I had two jcr-1.0.jar. One in my WEB-INF/lib and one in tomcat/lib. So I got an classCast exception. With Maven2 and eclipse simply delete the dependency to jcr-1.0 and to servlet-api from pom file. The add new library and select tomcat6 runtime. So you get the tomcat/lib jars to build your webapplication.

Im still trying to register jackrabbit-webapp repository via bootstrap.config to tomcat JNDI. Can anybody help me? I know I could register a global resource, but therefore I have to put all the jackrabbit jars in tomcat/lib. I don't want that. I want to register jackrabbit-webapp.

Best respects

Flo Roth

-----Ursprüngliche Nachricht-----
Von: Florian Roth [mailto:Florian.Roth@in-gmbh.de] 
Gesendet: Montag, 9. November 2009 15:20
An: users@jackrabbit.apache.org
Betreff: jackrabbit-webapp local access from webapp in same tomcat container

Hi,

I could not access jackrabbit webapp repeository from another webapp on the same container. I have deployed jackrabbit webapp and the accessing webapp at same tomcat 6.

Access via JNDI I have the following bootstrap.properties:

#bootstrap properties for the repository startup servlet.
#Mon Nov 09 12:49:11 CET 2009
java.naming.factory.initial=org.apache.jackrabbit.core.jndi.provider.DummyInitialContextFactory
repository.home=d\:\\jackrabbit
rmi.enabled=true
repository.config=d\:\\jackrabbit/repository.xml
repository.name=jackrabbit.repository
rmi.host=localhost
java.naming.provider.url=java\:comp/env
jndi.enabled=true
rmi.port=0

then I try the following

InitialContext initialcontext = new InitialContext(); Context environment = (Context) initialcontext.lookup("java:comp/env");
repository = (Repository) environment.lookup("jackrabbit.repository");

Acess via cross context also does not work for me. In the tomcats global context.xml I sai <Context crossContext="true" .... and try to access with

ServletContext context = this.getServletContext();
                ServletContext jackrabbit = context
                                .getContext("/jackrabbit-webapp-2.0-beta1");
                repository = (Repository) context.getAttribute(Repository.class
                                .getName());

Also the ServletRepository method does not work for me:

repository=new ServletRepository(this);

Can pleas someone help me to access the jackrabbit-webapp repository from an other webapp in the same container (local access)?

Best regards

Flo Roth



in-integrierte informationssysteme GmbH
Am Seerhein 8 . 78467 Konstanz
http://www.in-gmbh.de/ . mailto:info@in-gmbh.de

Telefon: +49 7531 8145-0
Telefax: +49 7531 8145-81


Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Sitz der Gesellschaft: Konstanz . Amtsgericht Freiburg i.B. . Registernummer: HRB 380976 . Geschäftsführer: Siegfried Wagner




RE: Clustering issue with Jackrabbit

Posted by "Phukan, Anit" <An...@intuit.com>.
Thanks Sebastien,

Yes, it was a typo on my part while copying over the JDBC url.

jdbc:sqlserver:xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx
to:
jdbc:sqlserver://xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx

worked for me. 

Thanks again
Anit


-----Original Message-----
From: Sébastien Launay [mailto:sebastienlaunay@gmail.com] 
Sent: Tuesday, November 10, 2009 12:24 PM
To: users@jackrabbit.apache.org
Subject: Re: Clustering issue with Jackrabbit

Hi Anit,

2009/11/10 Phukan, Anit <An...@intuit.com>:
> Caused by: java.sql.SQLException: No suitable driver found for jdbc:sqlserver:xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx
>        at java.sql.DriverManager.getConnection(DriverManager.java:602)
>        at java.sql.DriverManager.getConnection(DriverManager.java:185)
>        at org.apache.jackrabbit.core.fs.db.DbFileSystem.getConnection(DbFileSystem.java:187)
>        at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.initConnection(DatabaseFileSystem.java:988)
>        at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:172)
>        ... 117 more

I think that you are missing the jar containing the JDBC driver for
SqlServer in the classpath.
>From what i found the jar file is named sqljdbc.jar.

If this is not the case, you can try to change the JDBC URL from:
jdbc:sqlserver:xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx
to:
jdbc:sqlserver://xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx

-- 
Sébastien Launay

Re: Clustering issue with Jackrabbit

Posted by Sébastien Launay <se...@gmail.com>.
Hi Anit,

2009/11/10 Phukan, Anit <An...@intuit.com>:
> Caused by: java.sql.SQLException: No suitable driver found for jdbc:sqlserver:xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx
>        at java.sql.DriverManager.getConnection(DriverManager.java:602)
>        at java.sql.DriverManager.getConnection(DriverManager.java:185)
>        at org.apache.jackrabbit.core.fs.db.DbFileSystem.getConnection(DbFileSystem.java:187)
>        at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.initConnection(DatabaseFileSystem.java:988)
>        at org.apache.jackrabbit.core.fs.db.DatabaseFileSystem.init(DatabaseFileSystem.java:172)
>        ... 117 more

I think that you are missing the jar containing the JDBC driver for
SqlServer in the classpath.
>From what i found the jar file is named sqljdbc.jar.

If this is not the case, you can try to change the JDBC URL from:
jdbc:sqlserver:xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx
to:
jdbc:sqlserver://xxxxxxx.xxx.local:1433;DatabaseName=xxxxxxx

-- 
Sébastien Launay