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:[email protected]] Gesendet: Montag, 9. November 2009 15:20 An: [email protected] 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:[email protected] 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
