jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabio Boulos <fabiobou...@yahoo.com>
Subject Jackrabbit and Tomcat - not allowed to modify item
Date Fri, 06 Jan 2006 01:01:48 GMT
Hi people.

I'm trying jackrabbit in a web application using tomcat 5.5.
I'm using jackrabbit-1.0-SNAPSHOT.jar and  jcr-1.0.jar

When I execute this code,  db,  repository ,  versions, index   and  workspaces directories
are created.

    Session jcrSession = r.login(new SimpleCredentials("anonymous", "".toCharArray()), null);
      Node rn=jcrSession.getRootNode();

    
         out.println("rn.getPrimaryNodeType().getName(): "+rn.getPrimaryNodeType().getName());
      
      if (!rn.hasNode("testnode")) {
          out.println("creating testnode");
          
          Node n=rn.addNode("testnode", "nt:unstructured");
          n.setProperty("testprop", jcrSession.getValueFactory().createValue("Hello, World."));
          jcrSession.save();
        }


I receive  exception to execute addnode

 An exception was thrown:  javax.jcr.AccessDeniedException: /: not allowed to modify item

With the following stack trace:

javax.jcr.AccessDeniedException: /testnode: not allowed to modify item
    at org.apache.jackrabbit.core.ItemImpl.validateTransientItems(ItemImpl.java:491)
    at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1131)
    at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:749)
    at org.apache.jsp.testejackrabbit_jsp._jspService(testejackrabbit_jsp.java:123)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
    at java.lang.Thread.run(Thread.java:552)

Is necessary any special configuration to use jackrabbit with tomcat?

Thanks !

Boulos 


			
---------------------------------
Yahoo! Photos
 Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message