[ 
https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843973#action_12843973
 ] 

Michael Stämpfli commented on JCR-2450:
---------------------------------------

I created a small package, with which I was able to reproduce the problem. My 
environment: Jackrabbit 2.0, Tomcat 6.0.20, MySQL 5.0, Ubuntu 9.04 64 bit.
To reproduce the problem you need to do the following steps:
* Download the WAR file attached to this issue.
* Deploy it to tomcat (or another servlet container)
* Go to http://localhost:8080/jackrabbit-test/repository/default/ with your 
browser. Login with the standard admin credentials. This will trigger the 
security manager, that will create the administrator user. Afterwards you will 
see the file list of the default workspace.
* Stop tomcat.
* Restart tomcat.
* Go again to http://localhost:8080/jackrabbit-test/repository/default/. You 
will then see the following error message:

{code:xml}
<D:error xmlns:D="DAV:">
<dcr:exception xmlns:dcr="http://www.day.com/jcr/webdav/1.0";>
<dcr:class>
javax.jcr.ItemNotFoundException
</dcr:class>
<dcr:message>
failed to build path of cb324f73-471a-41df-b002-0d41416362e9: 
cafebabe-cafe-babe-cafe-babecafebabe has no child entry for 
cb324f73-471a-41df-b002-0d41416362e9
</dcr:message>
</dcr:exception>
</D:error>
{code}

When I start Tomcat the first time, I see a log entry concerning the node 
mentioned above.
11.03.2010 09:54:43 *DEBUG* ItemManager: invalidated item 
cafebabe-cafe-babe-cafe-babecafebabe (ItemManager.java, line 991)
11.03.2010 09:54:43 *DEBUG* ItemManager: removing item 
cafebabe-cafe-babe-cafe-babecafebabe from cache (ItemManager.java, line 935)
I don't know if this is severe since it will only be removed from the cache. 
There are no other entries concerning this node.

The second time I start Tomcat, I see the following log entries:
11.03.2010 09:58:49 *DEBUG* HierarchyManagerImpl: failed to build path of 
56d043fb-dd77-404a-b302-68fe50b264b0: cafebabe-cafe-babe-cafe-babecafebabe has 
no child entry for 56d043fb-dd77-404a-b302-68fe50b264b0 
(HierarchyManagerImpl.java, line 290)
11.03.2010 09:58:49 *DEBUG* DavException: DavException: (403) failed to build 
path of 56d043fb-dd77-404a-b302-68fe50b264b0: 
cafebabe-cafe-babe-cafe-babecafebabe has no child entry for 
56d043fb-dd77-404a-b302-68fe50b264b0 (DavException.java, line 101)
11.03.2010 09:58:49 *DEBUG* JcrDavException: Handling exception with error code 
403 (JcrDavException.java, line 118)
javax.jcr.ItemNotFoundException: failed to build path of 
56d043fb-dd77-404a-b302-68fe50b264b0: cafebabe-cafe-babe-cafe-babecafebabe has 
no child entry for 56d043fb-dd77-404a-b302-68fe50b264b0
        at 
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:291)
        at 
org.apache.jackrabbit.core.CachingHierarchyManager.buildPath(CachingHierarchyManager.java:198)
        at 
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:280)
        at 
org.apache.jackrabbit.core.CachingHierarchyManager.buildPath(CachingHierarchyManager.java:198)
        at 
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:280)
        at 
org.apache.jackrabbit.core.CachingHierarchyManager.buildPath(CachingHierarchyManager.java:198)
        at 
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:280)
        at 
org.apache.jackrabbit.core.CachingHierarchyManager.buildPath(CachingHierarchyManager.java:198)
        at 
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:280)
        at 
org.apache.jackrabbit.core.CachingHierarchyManager.buildPath(CachingHierarchyManager.java:198)
        at 
org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath(HierarchyManagerImpl.java:280)
        at 
org.apache.jackrabbit.core.CachingHierarchyManager.buildPath(CachingHierarchyManager.java:198)
        at 
org.apache.jackrabbit.core.HierarchyManagerImpl.getPath(HierarchyManagerImpl.java:395)
        at 
org.apache.jackrabbit.core.CachingHierarchyManager.getPath(CachingHierarchyManager.java:232)
        at org.apache.jackrabbit.core.ItemImpl.getPrimaryPath(ItemImpl.java:216)
        at 
org.apache.jackrabbit.core.NodeImpl.getPrimaryPath(NodeImpl.java:3077)
        at org.apache.jackrabbit.core.ItemImpl.getPath(ItemImpl.java:1315)
        at 
org.apache.jackrabbit.core.security.user.UserManagerImpl.getAuthorizable(UserManagerImpl.java:608)
        at 
org.apache.jackrabbit.core.security.user.UserManagerImpl.internalGetAuthorizable(UserManagerImpl.java:668)
        at 
org.apache.jackrabbit.core.security.user.UserManagerImpl.getAuthorizable(UserManagerImpl.java:337)
        at 
org.apache.jackrabbit.core.DefaultSecurityManager.createSystemUsers(DefaultSecurityManager.java:581)
        at 
org.apache.jackrabbit.core.DefaultSecurityManager.init(DefaultSecurityManager.java:202)
        at 
org.apache.jackrabbit.core.RepositoryImpl.getSecurityManager(RepositoryImpl.java:483)
        at 
org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1496)
        at 
org.apache.jackrabbit.server.SessionProviderImpl.getSession(SessionProviderImpl.java:55)
        at 
org.apache.jackrabbit.webdav.simple.DavSessionProviderImpl.attachSession(DavSessionProviderImpl.java:85)
        at 
org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.service(AbstractWebdavServlet.java:186)
        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:128)
        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:849)
        at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
        at 
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
        at java.lang.Thread.run(Thread.java:636)

Another thing: It could be that the source of the problem is in the class 
BundleDbPersistenceManager. I also tried PostgreSQL instead of MySQL and got 
the same error. Then I configured the webapp to use the file system instead of 
a DB. It worked perfectly. I assume that BundleDbPersistenceManager does not 
save node modifications properly.

> UserManager inconsistency
> -------------------------
>
>                 Key: JCR-2450
>                 URL: https://issues.apache.org/jira/browse/JCR-2450
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core, security
>    Affects Versions: 1.6.0, 2.0-beta4
>         Environment: Ubuntu 9.04 64bit, Tomcat 6.0.20, Jackrabbit 1.6 and 
> 2.0-beta4
>            Reporter: Michael Stämpfli
>            Priority: Blocker
>
> I used the default class UserManagerImpl to add a user to my jackrabbit (1.6) 
> environment. My application can successfully login to the repository with 
> this user. As soon as I restart Tomcat, the login fails.
> I did some research and found out why. Obviously the user manager cannot find 
> the user, I registered previously, anymore. Using WebDAV I made a connection 
> to the security workspace. When I create a new user, a new node for this user 
> is created in /jcr:root/rep:security/rep:authorizables/rep:users/admin. As 
> soon as I restart Tomcat and login to the security workspace again (using 
> WebDAV), I see that the user node moved to the root node. As a consequence 
> the user cannot login to the repository because the user manager cannot find 
> the user node anymore.
> In jackrabbit 2.0-beta4 I get a similar bug and I assume, that the root cause 
> is the same as above. I log into the repository using the administrator 
> account, which is created automatically with the class UserManagerImpl. When 
> I restart Tomcat and try to login to the repository I get the error: 
> javax.jcr.ItemNotFoundException: failed to build path of 
> 55411ff4-d6c7-410a-a16e-5531e1c7afae: cafebabe-cafe-babe-cafe-babecafebabe 
> has no child entry for 55411ff4-d6c7-410a-a16e-5531e1c7afae

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to