Can't start Magnolia on MySQL: PathNotFoundException: /system/anonymous

40 views
Skip to first unread message

Max Fischer

unread,
Jan 17, 2025, 6:57:20 AMJan 17
to Magnolia User Mailing List
Dear all,

I have encountered an issue with my instance of Magnolia Community 6.2.43 after restarting my Tomcat server and was hoping that someone may have encountered it as well or know a possible solution approach. 

When starting up Magnolia, I'm redirected to the usual update page. After clicking "Start Magnolia", things seem to work fine, however as soon as I am redirected to my login page, I am confronted with the following error message:

ERROR info.magnolia.cms.security.JCRSessionOp           :  :  Error caught while loading the system user anonymous: javax.jcr.PathNotFoundException: /system/anonymous
javax.jcr.PathNotFoundException: /system/anonymous
        at org.apache.jackrabbit.core.ItemManager.getNode(ItemManager.java:576) ~[jackrabbit-core-2.20.16.jar:2.20.16]
        at org.apache.jackrabbit.core.session.SessionItemOperation$6.perform(SessionItemOperation.java:129) ~[jackrabbit-core-2.20.16.jar:2.20.16]
        at org.apache.jackrabbit.core.session.SessionItemOperation$6.perform(SessionItemOperation.java:125) ~[jackrabbit-core-2.20.16.jar:2.20.16]
        at org.apache.jackrabbit.core.session.SessionItemOperation.perform(SessionItemOperation.java:187) ~[jackrabbit-core-2.20.16.jar:2.20.16]
        at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) ~[jackrabbit-core-2.20.16.jar:2.20.16]
        at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:363) ~[jackrabbit-core-2.20.16.jar:2.20.16]
        at org.apache.jackrabbit.core.SessionImpl.getNode(SessionImpl.java:1152) ~[jackrabbit-core-2.20.16.jar:2.20.16]
        at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNode(DelegateSessionWrapper.java:177) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNode(DelegateSessionWrapper.java:177) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.decoration.ContentDecoratorSessionWrapper.getNode(ContentDecoratorSessionWrapper.java:120) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNode(DelegateSessionWrapper.java:177) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.decoration.ContentDecoratorSessionWrapper.getNode(ContentDecoratorSessionWrapper.java:120) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNode(DelegateSessionWrapper.java:177) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.decoration.ContentDecoratorSessionWrapper.getNode(ContentDecoratorSessionWrapper.java:120) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNode(DelegateSessionWrapper.java:177) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.decoration.ContentDecoratorSessionWrapper.getNode(ContentDecoratorSessionWrapper.java:120) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.wrapper.DelegateSessionWrapper.getNode(DelegateSessionWrapper.java:177) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.jcr.decoration.ContentDecoratorSessionWrapper.getNode(ContentDecoratorSessionWrapper.java:120) ~[magnolia-core-6.2.54.jar:?]
        at info.magnolia.cms.security.SystemUserManager$2.doExec(SystemUserManager.java:172) [magnolia-core-6.2.54.jar:?]
        at info.magnolia.cms.security.SystemUserManager$2.doExec(SystemUserManager.java:165) [magnolia-core-6.2.54.jar:?]
        at info.magnolia.cms.security.SilentSessionOp.exec(SilentSessionOp.java:70) [magnolia-core-6.2.54.jar:?]

The error seems to be linked to this known issue:

Unfortunately, the existing issue tickets are related to H2 and Postgres, while I am using MySQL as my database. It seems as the Jackrabbit Repository may be corrupted.

My approach would be to recreate the anonymous user from bootstrap in the Groovy Rescue Tool, however there seems to be only little documentation on how to do so. 

Did anyone else encounter this issue as well and find a solution or maybe know another way how I could resolve this issue.

Thank you very much and best regards
Max

Roman Kovařík

unread,
Jan 17, 2025, 7:04:51 AMJan 17
to Magnolia User Mailing List, Max Fischer

Hi Max

My approach would be to recreate the anonymous user from bootstrap in the Groovy Rescue Tool, however there seems to be only little documentation on how to do so. 

Documentation for the rescue app is at https://docs.magnolia-cms.com/product-docs/6.2/modules/list-of-modules/groovy-module/#_rescue_app

This script might do the trick:

```groovy
resources = new String[]{"/mgnl-bootstrap/core/users.system.anonymous.xml"}
info.magnolia.importexport.BootstrapUtil.bootstrap(resources, 0)
MgnlContext.getJCRSession("users").save()
```

It seems as the Jackrabbit Repository may be corrupted.

You're right, I'm afraid. Even if you restore the anonymous user, there might be other missing pieces, but it's worth a shot.


Regards, Roman


Reply all
Reply to author
Forward
0 new messages