Setting OSGi config for LinkInfoStorageImpl via source package does not work
Hi folks
I am currently trying to set the OSGi configuration for com.day.cq.rewriter.linkchecker.impl.LinkInfoStorageImpl via a source content package (/apps/.../config/...) in AEM6. My XML looks like this:
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:OsgiConfig" service.max_links_per_host="{Long}500" service.save_external_link_references="{Boolean}false" />As soon as I deploy such a content package with the above content the publish instance does not work anymore and I can see a lot of error messages like the following:
11.06.2015 14:21:52.170 *ERROR* [pool-5-thread-5] com.day.cq.cq-rewriter [com.day.cq.rewriter.linkchecker.impl.LinkInfoStorageImpl(1170)] The activate method has thrown an exception (java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer) java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
Next I checked /crx-quickstart/launchpad/config/com/day/cq/rewriter/linkchecker/impl/LinkInfoStorageImpl.config and observed the following:
When setting the max links setting via web console the following gets written to the file.
service.save_external_link_references=B"false" service.pid="com.day.cq.rewriter.linkchecker.impl.LinkInfoStorageImpl" service.max_links_per_host=I"500"
When setting the max links value via a source package with the above XML snippet the following gets written to the file.
service.pid="com.day.cq.rewriter.linkchecker.impl.LinkInfoStorageImpl" service.save_external_link_references=B"false" service.max_links_per_host=L"500"
So apparently the configuration of the max links setting must be an integer value. However I don't know how to set an integer value via XML configuration. Am I missing something here? I thought that {Long} is the only possibility to define a number value. I also tried {Integer} just to be sure but that did not work either (in fact it prevents the config file from getting created). Did anybody else have this kind of problem and has a solution for it? I thought I ask here first before opening a daycare ticket. Any help is appreciated.
Cheers