Has anyone changed the admin password in jackrabbit embedded in sling?

I looked over the Jackrabbit configuration parsing code, and no where does it make reference to being able to specify the admin password within the repository.xml configuration file.

When I change the admin password through osgi, it brings down the repository and then attempts to bring it back up, by doing this there are class unloading issues which prevent the repository from coming back online. It appears as if the resource resolver does not switch over. The following is an exception that comes from attempting to change the admin password for the SlingRepository via OSGi:

23.10.2009 17:27:50.207 *ERROR* [SCR Component Actor] org.apache.jackrabbit.classloader.DynamicRepositoryClassLoader unregisterListener: Cannot unregister org.apache.jackrabbit.classloader.DynamicRepositoryClassLoader: parent: { org .apache .sling.commons.classloader.impl.packageadminclassloa...@eeb619 }, user: admin, dirty: true from observation manager javax.jcr.RepositoryException: this session has been closed at org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:375) at org .apache.jackrabbit.core.WorkspaceImpl.sanityCheck(WorkspaceImpl.java: 175) at org .apache .jackrabbit .core.WorkspaceImpl.getObservationManager(WorkspaceImpl.java:717) at org .apache .jackrabbit .classloader .DynamicRepositoryClassLoader .unregisterListener(DynamicRepositoryClassLoader.java:601) at org .apache .jackrabbit .classloader .DynamicRepositoryClassLoader .destroy(DynamicRepositoryClassLoader.java:190) at org .apache .sling .jcr .classloader .internal .RepositoryClassLoaderFacade.destroy(RepositoryClassLoaderFacade.java: 98) at org .apache .sling .jcr .classloader .internal .DynamicClassLoaderProviderImpl .deactivate(DynamicClassLoaderProviderImpl.java:419)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25)
        at java.lang.reflect.Method.invoke(Method.java:592)
at org .apache .felix .scr .impl .ImmediateComponentManager .disposeImplementationObject(ImmediateComponentManager.java:269) at org .apache .felix .scr .impl .ImmediateComponentManager .deleteComponent(ImmediateComponentManager.java:150) at org .apache .felix .scr .impl .DelayedComponentManager.deleteComponent(DelayedComponentManager.java: 61) at org .apache .felix .scr .impl .AbstractComponentManager .deactivateInternal(AbstractComponentManager.java:521) at org.apache.felix.scr.impl.AbstractComponentManager.access $200(AbstractComponentManager.java:36) at org.apache.felix.scr.impl.AbstractComponentManager $4.run(AbstractComponentManager.java:204) at org .apache .felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:85)


Also, once the attempted change has been completed, this is all the GET servlet returns:

ResourceResolverFactory service missing, cannot service requests

RequestURI=/org.apache.sling.launchpad.webapp-6-SNAPSHOT

I'm wondering if anyone has gone into a production environment using sling, what they may have done to secure the administrative account.

On Oct 23, 2009, at 2:02 AM, Vidar Ramdal wrote:

On Thu, Oct 22, 2009 at 11:25 PM, Josh Kennedy <[email protected]> wrote:
What is the preferred method for configuring the Jackrabbit Admin password from within Sling? I've noticed that if the password is changed once Sling
is up and running, changing the password of the admin user causes the
pingAndCheck method to fail (stack trace below). I have tested changing the
password from the Felix Web Console, programatically through the OSGi
Configuration Admin, and also using the sling jackrabbit-usermanager
servlets. All of them cause the exception that follows to occur. If this password needs to be set prior to the repository starting, where should it
be configured?

I might be wrong, but I think you must set the admin password in
repository.xml.

The Felix Web Console plugin simply allows you to configure which
username/password Sling should use when connecting to Jackrabbit.
Thus, there's no way to configure "the Jackrabbit Admin password from
within Sling".

--
Vidar S. Ramdal <[email protected]> - http://www.idium.no
Sommerrogata 13-15, N-0255 Oslo, Norway
+ 47 22 00 84 00 / +47 21 531941, ext 2070

Reply via email to