Hi Stefan Thanks for tracking this down. May I ask you to report an issue at https://issues.apache.org/jira/browse/SLING and attach the patch to that issue ?
Thanks Felix Am 03.03.2014 um 08:21 schrieb Stefan Scheidewig <[email protected]>: > Hello, > > I tried to build the Apache Sling project but the build always fails within > the "Apache Sling Launchpad Testing" project. The reason for that failure are > two tests regarding the dynamic namespace mapping > NamespaceMappingTest#testNamespaceFromNamespaceMapper and > NamespaceMappingTest#testNamespaceFromNamespaceMapperWithImpersonation. A > closer look to the failing code it reveals that within the class > org.apache.sling.jcr.jackrabbit.server.impl.SlingServerRepositoryManager the > bind method for the namespace service references is accessing the > ComponentContext set by the activate method but unfortunately that is > incorrect because the Declarative Services Specification Version 1.1 - > section 112.5.6 states that the binding happens before the activation. So the > attempt to bind the TestNamespaceMapper Service to the > SlingServerRepositoryManager always results in a NPE. > > After I changed the service binding slightly the TestNamespaceMapper can be > called. See the attached patch. > > Regards, > Stefan > <namespacemapper_binding_fix.patch>
