You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Michael Stämpfli (JIRA)" <ji...@apache.org> on 2010/01/05 15:10:54 UTC

[jira] Created: (JCR-2450) UserManager inconsistency

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: 2.0-beta4, 1.6.0
         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.


[jira] Commented: (JCR-2450) UserManager inconsistency

Posted by "Michael Stämpfli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12796680#action_12796680 ] 

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

I have to correct my statement above. The user node didn't move, it disappeared!

> 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.


[jira] Commented: (JCR-2450) UserManager inconsistency

Posted by "Michael Stämpfli (JIRA)" <ji...@apache.org>.
    [ 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.


[jira] Resolved: (JCR-2450) UserManager inconsistency

Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Mueller resolved JCR-2450.
---------------------------------

    Resolution: Not A Problem

Closing as "not a problem". Please re-open if the problem persists.

> 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
>         Attachments: jackrabbit-test.zip
>
>
> 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.


[jira] Commented: (JCR-2450) UserManager inconsistency

Posted by "Felix Meschberger (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844007#action_12844007 ] 

Felix Meschberger commented on JCR-2450:
----------------------------------------

I just stumbled upon a strange thing in the UserManager API: This has a method "autosave(boolean)" which can be used to ensure changes to the User/Group base through the UserManager API are persisted. If autosave is false (check UserManager.isAutoSave()), the session producing the UserManager must be saved  -- Session.save() -- to persist any changes.

Could it be that your application misses persisting the changes ?

> 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
>         Attachments: jackrabbit-test.zip
>
>
> 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.


[jira] Updated: (JCR-2450) UserManager inconsistency

Posted by "Michael Stämpfli (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Stämpfli updated JCR-2450:
----------------------------------

    Attachment: jackrabbit-test.zip

Use "mvn package" to generate the WAR file to reproduce the problem.

> 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
>         Attachments: jackrabbit-test.zip
>
>
> 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.


[jira] Commented: (JCR-2450) UserManager inconsistency

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844030#action_12844030 ] 

angela commented on JCR-2450:
-----------------------------

the original usermanager implementation does not support (and will not support) the autosave feature because there is no way to save changes of a different workspace using Session.save().

apart from that: the default of the autosave functionality is 'false'.
from my point of view it is clear that the problem described here has nothing to do with the autosave.

1) 1.6 didn't have that functionality
2) default UserManagerImpl as present in 1.6 doesn't support it
3) it's disabled by default.




> 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
>         Attachments: jackrabbit-test.zip
>
>
> 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.


[jira] Commented: (JCR-2450) UserManager inconsistency

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12845793#action_12845793 ] 

angela commented on JCR-2450:
-----------------------------

> Use "mvn package" to generate the WAR file to reproduce the problem. 

thanks for the package. i generated the war file from as indicated above.
deploying in tomcat failed with NPE due to some missing libraries. so i tried it in our own servlet engine and
found the following:

- deploy war
- access the jackrabbit webapp 
  -> prompt for creating or specifying the repository 
  -> create new one
- as result i got a jackrabbit repository with the simple security configuration instead of the one you wish to have.
  -> obviously no users as the simple configuration doesn't provide any user management
- changed the security configuration to use the one you specified in your repository.xml but NOT changing
  the persistence manager implemenation.
- consequently the default users were created and i added another testuser.
  -> check: user was there
- stop the server
- restart the server
  -> all users were still present.

regarding the error messages you found:

> 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) 

this is the root node... and basically i shouldn't be a problem if it is removed from the cache.

so, to get this to an end:
- i don't manage to get inconsistent user content by restarting the repository.
- BUT: i didn't use the mysql persistence manager for the reasons mentioned above.

michael, could you
- exclude this potential error source by using a different persistence manager for test purpose ?

then i would like to get an idea if the user you created was ever persisted:
- can you test if the user-node is present in workspace it is expected to be?
and to exclude the possibility that something went wrong with the 2 workspace:
- can you change the configuration to use but a single workspace (specify the security workspace to be
  the same as the default)?









> 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
>         Attachments: jackrabbit-test.zip
>
>
> 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.


[jira] Issue Comment Edited: (JCR-2450) UserManager inconsistency

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843647#action_12843647 ] 

angela edited comment on JCR-2450 at 3/10/10 5:26 PM:
------------------------------------------------------

it tried to reproduce it with apache-tomcat-6.0.24 and jackrabbit-webapp-2.1-SNAPSHOT (my current checkout).
i changed the repository configuration to use the same security setup as present in core/src/test/repository/repository.xml i.e. using the DefaultSecurityManager that writes the users to a separate workspace.

with that setup i was not able to reproduce the problem.

regarding 1.6 and intermediate 2.0-beta versions: I used to work quite some time with those in Day's CRX and never had a problem with disappearing users.

can you provide some more information? log entries? any debug information that would allow me to get a better idea what might be the problem?

      was (Author: anchela):
    it tried to reproduce it with apache-tomcat-6.0.24 and jackrabbit-webapp-2.1-SNAPSHOT (my current checkout).
i changed the repository configuration to use the same security setup as present in core/src/test/repository/repository.xml i.e. using the DefaultSecurityManager that writes the users to a separate workspace.

with that setup i was not able to reproduce the problem.

regarding 1.6 and intermediate 2.0-beta versions: I used to work quite some time with those in Day's CRX and never had a problem with disappearing users.

can you provide some information? log entries? any debug information that would allow me to get a 
better idea what might be the problem?
  
> 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.


[jira] Commented: (JCR-2450) UserManager inconsistency

Posted by "Michael Stämpfli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12844028#action_12844028 ] 

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

I saw that too but if you look at the implementation of UserManager, you see that this is currently not supported. Autosave is always enabled and cannot be changed.

> 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
>         Attachments: jackrabbit-test.zip
>
>
> 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.


[jira] Commented: (JCR-2450) UserManager inconsistency

Posted by "Michael Stämpfli (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846797#action_12846797 ] 

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

I deployed the standard jackrabbit webapp to my tomcat and created a new repository. So my repository should have the same simple configuration as yours. Then I played the login game with several different configurations.

When I use the derby persistence manager everything works perfectly. I even changed the security manager to DefaultSecurityManager, the access manager to DefaultAccessManager and the login module to DefaultLoginModule (those are the ones I use in my application). It still worked. This proves what you said before. If you don't change the persistence manager, there is no problem.

As said before the file persistence manager works too.

Then I changed the persistence manager to MySQL. The following list shows, which configuration worked and which showed the error described above:
* SimpleSecurityManager, SimpleAccessManager, SimpleLoginModule with security workspace "security" -> works
* DefaultSecurityManager, DefaultAccessManager, DefaultLoginModule with security workspace "security" -> ERROR
* DefaultSecurityManager, DefaultAccessManager, DefaultLoginModule with security workspace "default" -> works

I hope this will help you.

> 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
>         Attachments: jackrabbit-test.zip
>
>
> 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.


[jira] Commented: (JCR-2450) UserManager inconsistency

Posted by "angela (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12843647#action_12843647 ] 

angela commented on JCR-2450:
-----------------------------

it tried to reproduce it with apache-tomcat-6.0.24 and jackrabbit-webapp-2.1-SNAPSHOT (my current checkout).
i changed the repository configuration to use the same security setup as present in core/src/test/repository/repository.xml i.e. using the DefaultSecurityManager that writes the users to a separate workspace.

with that setup i was not able to reproduce the problem.

regarding 1.6 and intermediate 2.0-beta versions: I used to work quite some time with those in Day's CRX and never had a problem with disappearing users.

can you provide some information? log entries? any debug information that would allow me to get a 
better idea what might be the problem?

> 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.


[jira] Commented: (JCR-2450) UserManager inconsistency

Posted by "Thomas Mueller (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-2450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846829#action_12846829 ] 

Thomas Mueller commented on JCR-2450:
-------------------------------------

This looks like a repository configuration problem. In your test case there is a repository.xml file which contains:

<Workspace name="default">
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
        <param name="path" value="${wsp.home}" />
</FileSystem>
<PersistenceManager
        class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
        <param name="url" value="jdbc:mysql://localhost:3306/jackrabbit_test" />
        <param name="user" value="jack" />
        <param name="password" value="test" />
        <param name="schema" value="mysql" />
        <param name="schemaObjectPrefix" value="pm_jackrabbit_" />
</PersistenceManager>
<SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex">
        <param name="path" value="${wsp.home}/index" />
       ...
</SearchIndex>
</Workspace>

That means it will use a different file system path and search index for each workspace (${wsp.home}), but it will use the same database, schema prefix, and table for all workspaces. I suggest to use something like:

<param name="schemaObjectPrefix" value="${wsp.name}_"/>


> 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
>         Attachments: jackrabbit-test.zip
>
>
> 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.