[
https://issues.apache.org/jira/browse/SLING-5779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327630#comment-15327630
]
Chetan Mehrotra commented on SLING-5779:
----------------------------------------
Looking at logs it appears following sequence is happening
# System starts and launchpad installer registers the config collected from
launchpad jar
{noformat}
10.06.2016 18:18:46.919 *INFO* [OsgiInstallerImpl]
org.apache.sling.installer.core.impl.OsgiInstallerImpl Apache Sling OSGi
Installer Service started.
10.06.2016 18:18:46.919 *INFO* [FelixStartLevel]
org.apache.sling.launchpad.installer Service [Apache Sling Launchpad Startup
Listener,36, [org.apache.sling.installer.api.event.InstallationListener]]
ServiceEvent REGISTERED
10.06.2016 18:18:46.920 *INFO* [FelixStartLevel]
org.apache.sling.launchpad.installer.impl.LaunchpadConfigInstaller Activating
launchpad config installer, configuration path=resources/config, install
path=resources/install
10.06.2016 18:18:47.003 *INFO* [FelixStartLevel]
org.apache.sling.launchpad.installer.impl.LaunchpadConfigInstaller 138
resources registered with OsgiInstaller
{noformat}
# ConfigTaskCreator gets registered
{noformat}
10.06.2016 18:18:47.018 *INFO* [FelixStartLevel]
org.apache.sling.installer.factory.configuration Service [Apache Sling
Configuration Install Task Factory,37,
[org.apache.sling.installer.api.tasks.InstallTaskFactory,
org.osgi.service.cm.ConfigurationListener,
org.apache.sling.installer.api.tasks.ResourceTransformer]] ServiceEvent
REGISTERED
{noformat}
# oak-lucene starts
{noformat}
10.06.2016 18:18:48.784 *INFO* [OsgiInstallerImpl]
org.apache.jackrabbit.oak-lucene BundleEvent RESOLVED
10.06.2016 18:18:48.784 *INFO* [OsgiInstallerImpl]
org.apache.jackrabbit.oak-lucene BundleEvent STARTING
10.06.2016 18:18:48.792 *INFO* [OsgiInstallerImpl]
org.apache.jackrabbit.oak-lucene Service
[org.apache.jackrabbit.oak.plugins.index.lucene.IndexAugmentorFactory,150,
[org.apache.jackrabbit.oak.plugins.index.lucene.IndexAugmentorFactory]]
ServiceEvent REGISTERED
10.06.2016 18:18:48.824 *INFO* [OsgiInstallerImpl]
org.apache.jackrabbit.oak-lucene Service [152,
[org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean]] ServiceEvent REGISTERED
10.06.2016 18:18:48.824 *INFO* [OsgiInstallerImpl]
org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService
Extracted text caching enabled with maxSize 20 MB, expiry time 300 secs
{noformat}
# Sometime later the config gets delivered
{noformat}
10.06.2016 18:18:49.836 *INFO* [OsgiInstallerImpl]
org.apache.sling.audit.osgi.installer Installed configuration
org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService from
resource
TaskResource(url=launchpad:resources/config/org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService.config,
entity=config:org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService,
state=INSTALL,
attributes=[org.apache.sling.installer.api.tasks.ResourceTransformer=:24:34:37:,
service.pid=org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService],
digest=d241243dc9632e2cef550e2cea5b860c)
{noformat}
Comparing it with other setups I think difference here is that
{{ConfigTaskCreator}} gets registered *after* configs were registered. In
normal startups configs gets registered after {{ConfigTaskCreator}} gets
activated hence they get registered with ConfigAdmin immediately. While in
current case configs get registered after all the bundles get installed.
[~cziegeler] Probably OSGiInstaller should handle this case better where
ConfigInstaller gets activated later. It should probably check for existing
registered config and install them
> LuceneIndexProviderService is sometimes not configured
> ------------------------------------------------------
>
> Key: SLING-5779
> URL: https://issues.apache.org/jira/browse/SLING-5779
> Project: Sling
> Issue Type: Bug
> Components: Launchpad
> Reporter: Robert Munteanu
> Fix For: Launchpad Builder 9
>
> Attachments: error.log.gz, stdout.log.gz
>
>
> (Setting version to Launchpad for now until we find out the root cause).
> From time to time I see the launchpad failing to start properly. The first
> error that is visible is {noformat}10.06.2016 18:18:48.826 *ERROR*
> [OsgiInstallerImpl] org.apache.jackrabbit.oak-lucene
> [org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexProviderService(31)]
> The activate method has thrown an exception (java.lang.NullPointerException:
> Index directory cannot be determined as neither index directory path
> [localIndexDir] nor repository home [repository.home] defined)
> java.lang.NullPointerException: Index directory cannot be determined as
> neither index directory path [localIndexDir] nor repository home
> [repository.home] defined
> at
> com.google.common.base.Preconditions.checkNotNull(Preconditions.java:236){noformat}
> That's weird since the provisioning model holds all the configurations and
> the relevant bundles are present in the {{:boot}} feature → Start Level 1.
> My launchpad jar was built from r1747733 ( but of course SNAPSHOT
> dependencies mean that someone else building the launchpad will not get the
> same exact output ).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)