[ 
https://issues.apache.org/jira/browse/SLING-407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Felix Meschberger closed SLING-407.
-----------------------------------

    Resolution: Fixed

Fixed in Rev 652632 (and deployed snapshot)

> SlingServerRepository.copyFile may throw NullPointerException
> -------------------------------------------------------------
>
>                 Key: SLING-407
>                 URL: https://issues.apache.org/jira/browse/SLING-407
>             Project: Sling
>          Issue Type: Bug
>          Components: Repository
>            Reporter: Felix Meschberger
>            Assignee: Felix Meschberger
>            Priority: Critical
>             Fix For: 2.0.0
>
>
> Reported by Joseph Ottinger:
> Okay, so putting in the declarative services gave me another issue, which is 
> an improvement: 
> 93 [Start Level Event Dispatcher] ERROR 
> org.apache.sling.jcr.jackrabbit.server.Activator - verifyConfiguration: 
> Cannot check or define configuration
> java.lang.NullPointerException
>     at 
> org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.copyFile(SlingServerRepository.java:177)
>     at 
> org.apache.sling.jcr.jackrabbit.server.Activator.initDefaultConfig(Activator.java:185)
>     at 
> org.apache.sling.jcr.jackrabbit.server.Activator.verifyConfiguration(Activator.java:151)
>     at 
> org.apache.sling.jcr.jackrabbit.server.Activator.serviceChanged(Activator.java:112)
>     at 
> org.eclipse.osgi.framework.internal.core.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:94)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:1224)
>     at 
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:209)
>     at 
> org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:141)
>     at 
> org.eclipse.osgi.framework.internal.core.Framework.publishServiceEventPrivileged(Framework.java:1558)
>     at 
> org.eclipse.osgi.framework.internal.core.Framework.publishServiceEvent(Framework.java:1533)
>     at 
> org.eclipse.osgi.framework.internal.core.ServiceRegistrationImpl.<init>(ServiceRegistrationImpl.java:103)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.createServiceRegistration(BundleContextImpl.java:657)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:609)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:675)
>     at org.eclipse.equinox.internal.cm.Activator.start(Activator.java:53)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:999)
>     at java.security.AccessController.doPrivileged(Native Method)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:993)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:974)
>     at 
> org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)
>     at 
> org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:355)
>     at 
> org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1073)
>     at 
> org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:632)
>     at 
> org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:506)
>     at 
> org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:280)
>     at 
> org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:466)
>     at 
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:209)
>     at 
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:319)
> Erm... what file is it trying to copy? Is it looking for a repository.xml? 
> (If so: classpath, I assume?)
> The problem is that the sling.home property is not set and hence the 
> File.getParentFile() may throw a NullPointerException.
> The fix is for the Activator.initConfig() method of jackrabbit-server to 
> check for this situation and try to use the bundle private data area or the 
> current working directory instead.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to