jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkrejcirik <vkrejci...@gmail.com>
Subject javax.jcr.AccessDeniedException
Date Sun, 01 Mar 2009 10:59:09 GMT
I have problem with login to JCR for modify node over POST request.
I try to login over XmlHttpRequest (AJAX) and also with URL, but I get 
the same error.

my code in esb file:

part of form for modify currentNode property:
 <input type="hidden" name="currentNode@marshaler" 
value="EntireMarshaler"/>


next:  
var logger = document.getElementById("logger").value;
var url = "config?time=" + new Date().getTime();
var queryString = "logger=" + logger;
  xmlHttp = createXMLHttpRequest();
  xmlHttp.onreadystatechange = processSaveSettings;
  xmlHttp.open("POST", url, true, "admin", "admin");
  xmlHttp.setRequestHeader("Content-Type", 
"application/x-www-form-urlencoded;");
  xmlHttp.send(queryString);

log file:

org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception 
during response processing. javax.jcr.AccessDeniedException: 
/content/servicemix/config: not allowed to modify item
 at 
org.apache.jackrabbit.core.ItemImpl.validateTransientItems(ItemImpl.java:483) 

 at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1205)
 at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:897)
 at 
org.apache.sling.jcr.base.internal.PooledSession.save(PooledSession.java:255) 

 at 
org.apache.sling.servlets.post.AbstractSlingPostOperation.run(AbstractSlingPostOperation.java:82)


 at 
org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:142) 

 at 
org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:143)


 at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:338)


 at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:370)


 at 
org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:462) 

 at 
org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:419) 

 at 
org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48)


 at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:54)


 at 
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)


 at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:52)


 at 
org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:273) 

 at 
org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:171) 

 at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
 at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
 at 
org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:51)


 at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
 at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:722)
 at 
org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:87) 

 at 
org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:63)


 at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
 at org.mortbay.jetty.Server.handle(Server.java:324)
 at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
 at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:842) 

 at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:648)
 at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
 at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
 at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228) 

 at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) 


Repository.xml:

<Repository>
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="${rep.home}/repository"/>
    </FileSystem>

    <Security appName="Jackrabbit">
        <AccessManager 
class="org.apache.jackrabbit.core.security.SimpleAccessManager">
        </AccessManager>

        <LoginModule 
class="org.apache.jackrabbit.core.security.SimpleLoginModule">
           <param name="anonymousId" value="anonymous"/>
        </LoginModule>
    </Security>

    <Workspaces rootPath="${rep.home}/workspaces" 
defaultWorkspace="default"/>

    <Workspace name="${wsp.name}">
        <FileSystem 
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${wsp.home}"/>
        </FileSystem>
        <PersistenceManager 
class="org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager">
          <param name="url" value="jdbc:derby:${wsp.home}/db;create=true"/>
          <param name="schemaObjectPrefix" value="${wsp.name}_"/>
        </PersistenceManager>
        <SearchIndex 
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
            <param name="textFilterClasses" 
value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
            <param name="extractorPoolSize" value="2"/>
            <param name="supportHighlighting" value="true"/>
        </SearchIndex>
    </Workspace>

    <Versioning rootPath="${rep.home}/version">
        <FileSystem 
class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
            <param name="path" value="${rep.home}/version" />
        </FileSystem>

        <PersistenceManager 
class="org.apache.jackrabbit.core.persistence.db.DerbyPersistenceManager">
          <param name="url" 
value="jdbc:derby:${rep.home}/version/db;create=true"/>
          <param name="schemaObjectPrefix" value="version_"/>
        </PersistenceManager>
    </Versioning>

    <SearchIndex 
class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        <param name="path" value="${rep.home}/repository/index"/>
        <param name="textFilterClasses" 
value="org.apache.jackrabbit.extractor.MsWordTextExtractor,org.apache.jackrabbit.extractor.MsExcelTextExtractor,org.apache.jackrabbit.extractor.MsPowerPointTextExtractor,org.apache.jackrabbit.extractor.PdfTextExtractor,org.apache.jackrabbit.extractor.OpenOfficeTextExtractor,org.apache.jackrabbit.extractor.RTFTextExtractor,org.apache.jackrabbit.extractor.HTMLTextExtractor,org.apache.jackrabbit.extractor.XMLTextExtractor"/>
        <param name="extractorPoolSize " value="2"/>
        <param name="supportHighlighting" value="true"/>
    </SearchIndex>

    <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"/>
</Repository>

-- 
/**************************************/
Best regards / S pozdravem
Vladislav Krejčiřík

http://www.vkrejcirik.info


Mime
View raw message