Deal with use case not in OSGi runtime
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jackrabbit / src / main / java / org / argeo / jackrabbit / JackrabbitWrapper.java
index 1505b1cfe9763d50f25c69e7cdda849fe3b1e9f9..4807f0951d574375bcdb142552907261678f9c0e 100644 (file)
@@ -301,6 +301,9 @@ public class JackrabbitWrapper extends JcrRepositoryWrapper implements
         */
        /** Find which OSGi bundle provided the data model resource */
        protected Bundle findDataModelBundle(String resUrl) {
+               if (bundleContext == null)
+                       return null;
+
                if (resUrl.startsWith("/"))
                        resUrl = resUrl.substring(1);
                String pkg = resUrl.substring(0, resUrl.lastIndexOf('/')).replace('/',