jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Roth <Florian.R...@in-gmbh.de>
Subject AW: jackrabbit-webapp local access from webapp in same tomcat container
Date Tue, 10 Nov 2009 07:58:37 GMT
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


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

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
                repository = (Repository) context.getAttribute(Repository.class

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

View raw message