Search code examples
javalinuxjackrabbit

Apache jackrabbit: Error while retrieving repository using JNDI


I am setting up Apache jackrabbit repository on Linux machine and while my server is starting up, I get the following error message

ERROR RepositoryAccessServlet: Error while retrieving repository using JNDI (name=jackrabbit.repository) (RepositoryAccessServlet.java, line 210) along with NameNotFoundException.

Complete stack trace follows

14.08.2012 16:35:37 ERROR RepositoryAccessServlet: Error while retrieving repository using JNDI (name=jackrabbit.repository) (RepositoryAccessServlet.java, line 210) javax.naming.NameNotFoundException at org.apache.jackrabbit.core.jndi.provider.DummyContext.getBoundObject(DummyContext.java:83) at org.apache.jackrabbit.core.jndi.provider.DummyContext.lookup(DummyContext.java:248) at org.apache.jackrabbit.core.jndi.provider.DummyContext.lookup(DummyContext.java:255) at javax.naming.InitialContext.lookup(Unknown Source) at org.apache.jackrabbit.j2ee.RepositoryAccessServlet.getRepositoryByJNDI(RepositoryAccessServlet.java:206) at org.apache.jackrabbit.j2ee.RepositoryAccessServlet.getRepository(RepositoryAccessServlet.java:295) at org.apache.jackrabbit.j2ee.RepositoryAccessServlet.getRepository(RepositoryAccessServlet.java:321) at org.apache.jsp.welcome_jsp._jspService(welcome_jsp.java:62) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:709) at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:680) at org.apache.jsp.index_jsp._jspService(index_jsp.java:61) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source) 14.08.2012 16:35:37 *INFO * RepositoryAccessServlet: trying to retrieve repository using rmi. uri=//localhost:1099/jackrabbit.repository (RepositoryAccessServlet.java, line 231) 14.08.2012 16:35:37 *INFO * RepositoryAccessServlet: Acquired repository via RMI. (RepositoryAccessServlet.java, line 243)

After searching on google for the Exception which is thrown I could not find any thing relevant.

Can some body point where things are going wrong?

Any help would be greatly appreciated.


Solution

  • Well I have solved the problem.

    Issue was with the permissions on directory structure. Tomcat didn't had enough permissions to access the required directory structure. In my case i was getting the error for repository named jackrabbit.reposiory and i had directory structure like jackrabbit/repository.

    Once I made sure tomcat has sufficient permissions on these directories(in my case write permission was lacking), things started moving in the right direction.