The problem is caused by
org/apache/sling/installer/factories/configuration/impl/ConfigRemoveTask.java
if ( !ConfigUtil.isSameData(cfg.getProperties(),
this.getResource().getDictionary()) ) {
this.getLogger().debug("Configuration has
changed after it has been installed!");
} else {
this.getLogger().info("Deleting config {}
({})", getCompositePid(), getResource());
cfg.delete();
ctx.log("Deleted configuration {} from
resource {}", getCompositePid(), getResource());
}
It seems incorrectly think the configuration hasn't changed and so deletes it.
I have run out of time today, but will look at it this weekend. For
the moment try and use the 1.0.4 version. There are only a few
differences, it was released in Jan 2012.
Ian
2 09:37:56.185 *INFO* [FelixStartLevel] org.apache.sling.event
[org.apache.sling.event.impl.EnvironmentComponent] Dependency Manager:
Service settingsService registered, activate component
26.05.2012 09:37:56.186 *INFO* [FelixStartLevel]
org.apache.sling.event
[org.apache.sling.event.impl.jobs.DefaultJobManager] Dependency
Manager: Service environment registered, activate component
26.05.2012 09:37:56.189 *INFO* [JcrInstaller.1]
org.apache.sling.installer.provider.jcr.impl.JcrInstaller Bundles root
node /libs not found, ignored
26.05.2012 09:37:56.193 *INFO* [OsgiInstallerImpl]
org.apache.sling.installer.factories.configuration.impl.ConfigRemoveTask
Deleting config org.apache.sling.servlets.post.impl.SlingPostServlet
(TaskResource(url=jcrinstall:/apps/sling/config/org.apache.sling.servlets.post.impl.SlingPostServlet.config,
entity=config:org.apache.sling.servlets.post.impl.SlingPostServlet,
state=UNINSTALL,
attributes=[resource.uri.hint=org.apache.sling.servlets.post.impl.SlingPostServlet,
service.pid=org.apache.sling.servlets.post.impl.SlingPostServlet],
digest=1a83b75c7ce697bd9617e4b34ab3c162))
26.05.2012 09:37:56.198 *INFO* [OsgiInstallerImpl]
org.apache.sling.audit.osgi.installer Deleted configuration
org.apache.sling.servlets.post.impl.SlingPostServlet from resource
TaskResource(url=jcrinstall:/apps/sling/config/org.apache.sling.servlets.post.impl.SlingPostServlet.config,
entity=config:org.apache.sling.servlets.post.impl.SlingPostServlet,
state=UNINSTALL,
attributes=[resource.uri.hint=org.apache.sling.servlets.post.impl.SlingPostServlet,
service.pid=org.apache.sling.servlets.post.impl.SlingPostServlet],
digest=1a83b75c7ce697bd9617e4b34ab3c162)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26.05.2012 09:37:56.206 *INFO* [FelixStartLevel]
org.apache.sling.commons.threads.impl.DefaultThreadPool Initializing
thread pool [ThreadPool-609f4099-23e7-47ab-9d6e-bc6ae37b49f4 (Apache
Sling Eventing Thread Pool)] ...
26.05.2012 09:37:56.206 *INFO* [FelixStartLevel]
org.apache.sling.commons.threads.impl.DefaultThreadPool Thread pool
[ThreadPool-609f4099-23e7-47ab-9d6e-bc6ae37b49f4 (Apache Sling
Eventing Thread Pool)] initialized.
26.05.2012 09:37:56.224 *INFO* [CM Event Dispatcher (Fire
ConfigurationEvent:
pid=org.apache.sling.servlets.post.impl.SlingPostServlet)]
org.apache.sling.servlets.resolver Service [ServletResourceProvider
for Servlets at [/libs/sling/servlet/default/POST.servlet,
/libs/sling/servlet/default/POST],156] ServiceEvent UNREGISTERING
26.05.2012
On 26 May 2012 09:23, Ian Boston <[email protected]> wrote:
> Downgrading to
> slinginstall:org.apache.sling.installer.factory.configuration-1.0.4.jar
>
> removes the problem, it must be something in the current version of that
> bundle.
> Ian
>
> On 26 May 2012 09:01, Ian Boston <[email protected]> wrote:
>> Yes, same here.
>> The config files all get deleted.
>> It happens after the bootstrap finished, and if I make the files
>> readonly they are not deleted but there is not exception in the logs.
>>
>> Not sure why, I'll continue looking. If you havent already could you
>> submit a bug report.
>> Thanks
>> Ian
>>
>> On 26 May 2012 07:28, Pontus Amberg <[email protected]> wrote:
>>> Where you able to reproduce the behaviour? I've also tried to use the
>>> org.apache.sling.launchpad-7-SNAPSHOT-standalone.jar produced
>>> by building the current trunk and I get the same behaviour when
>>> stopping & starting the standalone jar.
>>>
>>> /Pontus
>>>
>>>
>>> On 2012-05-18 10:17, Ian Boston wrote:
>>>>
>>>> On 18 May 2012 01:45, Pontus Amberg<[email protected]> wrote:
>>>>>
>>>>> A file was created in /config/org/apache/sling/commons/log when I changed
>>>>> the
>>>>> log level in the Logger Configuration but when I restarted the system it
>>>>> was
>>>>> also removed at the startup. So the problem is not only affecting the
>>>>> Authenticator.
>>>>>
>>>>> I might add that I modified the property
>>>>> "installer.configuration.version"
>>>>> in
>>>>> installer/factories/configuration/pom.xml to 1.0.9-SNAPSHOT since It
>>>>> otherwise was impossible to build Sling with an empty Maven repository.
>>>>> I've added an issue in Jira about this
>>>>> https://issues.apache.org/jira/browse/SLING-2482
>>>>>
>>>>> Might this be the reason I'm having troubles with the config files?
>>>>
>>>>
>>>> Could be.
>>>> I am trying to reproduce now. Been a hectic day, sorry for the delay.
>>>> Ian
>>>>
>>>>> /Pontus
>>>>>
>>>>>
>>>>> On 2012-05-17 01:19, Ian Boston wrote:
>>>>>>
>>>>>> AFAIK, This doesn't normally happen.
>>>>>>
>>>>>> Does it happen to any of the other config files, or just the
>>>>>> SlingAuthenticator.config ?
>>>>>>
>>>>>> Try adding a logging configuration, stopping and starting the tomcat
>>>>>> instance.
>>>>>>
>>>>>> Ian
>>>>>>
>>>>>>
>>>>>> On 17 May 2012 09:09, Pontus Amberg<[email protected]> wrote:
>>>>>>>
>>>>>>> I just noticed that config files stored in {sling.home}/config are
>>>>>>> purged
>>>>>>> when I
>>>>>>> restart the server that the Sling WAR archive is hosted on.
>>>>>>>
>>>>>>> If I for example add authentication requirements in the authentication
>>>>>>> service
>>>>>>> I can see that the SlingAuthenticator.config file is created in
>>>>>>> config/org/apache/sling/engine/impl/auth but when I restart the server
>>>>>>> the
>>>>>>> file
>>>>>>> is removed and the settings are lost. The folders are still there
>>>>>>> though.
>>>>>>>
>>>>>>> Is this a bug or is it a feature and if it is a feature how is it
>>>>>>> disabled?
>>>>>>>
>>>>>>> /Pontus
>>>>>>>
>>>