I'm having trouble configuring the externalizer service via an XML file.
The first thing I did was add a domain via the Felix console to test, and that worked. Then I created a file in my project at /apps/client/project/config/com.day.cq.commons.impl.ExternalizerImpl.xml. It looks like
<?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" externalizer.contextpath="" externalizer.host="" externalizer.domains="[local http://donotuse.com,author http://donotuse.com,publish http://donotuse.com,project-placeholder http://project-placeholder.com]"/>
When I build the project with Maven, I can see that this does get successfully deployed by looking at CRXDE Lite. However, the configuration that I see in the Felix console never changes to reflect this.
I also tried moving this XML file to /apps/client/project/config.author, with the same results.
I also tried looking in CRXDE Lite /apps/system/config for the configuration I set via Felix, and didn't find it. I did find it on the file system, and after restarting AEM, the configuration has returned to the default configuration, not what I specified in my XML file.
Is there something wrong that I'm not seeing in my XML?
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
Found it!
In my first post, I mentioned "I also tried looking in CRXDE Lite /apps/system/config for the configuration I set via Felix". I don't know which article I found that suggested looking there, but it turns out there was a node in /apps/cq/commons that appears to have the values I set in the Felix interface. This node was taking precedence over the node I created in my actual project.
Thanks for your time, all.
Views
Replies
Total Likes
Joel Triemstra wrote...
I'm having trouble configuring the externalizer service via an XML file.
The first thing I did was add a domain via the Felix console to test, and that worked. Then I created a file in my project at /apps/client/project/config/com.day.cq.commons.impl.ExternalizerImpl.xml. It looks like
<?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"
externalizer.contextpath=""
externalizer.host=""
externalizer.domains="[local http://donotuse.com,author http://donotuse.com,publish http://donotuse.com,project-placeholder http://project-placeholder.com]"/>
The content of config looks ok to me. But the extension of file ".xml" does not make sense. Can you send snapshot from crxdelight ?
When I build the project with Maven, I can see that this does get successfully deployed by looking at CRXDE Lite. However, the configuration that I see in the Felix console never changes to reflect this.
Config not picked by installer & hence not seeing it.
I also tried moving this XML file to /apps/client/project/config.author, with the same results.
I also tried looking in CRXDE Lite /apps/system/config for the configuration I set via Felix, and didn't find it. I did find it on the file system, and after restarting AEM, the configuration has returned to the default configuration, not what I specified in my XML file.
Which version of AEM? Sounds like enable write back is disabled. Verify at
http://host:port/system/console/configMgr/org.apache.sling.installer.provider.jcr.impl.JcrInstaller
Is there something wrong that I'm not seeing in my XML?
Thanks
Views
Replies
Total Likes
Thanks, but it looks like that's not making a difference.
Views
Replies
Total Likes
I'm using AEM 6.1, and writeback is enabled.
Here's a screenshot of what I see in CRXDE Lite after deploying my package
[img]Externalizer1.jpg[/img]
Also, here's a screenshot of my project in Eclipse - hopefully that explains where the XML file I'm referring to comes from. I believe the other OsgiConfigs in there are working properly.
[img]Externalizer2.jpg[/img]
Views
Replies
Total Likes
Hi Joel,
I tried the same thing and it seems to be working. Can you remove the properties externalizer.contextpath and host.
Regards,
Lokesh
Views
Replies
Total Likes
That also doesn't seem to be making a difference.
When you add the \ character, as in
externalizer.domains="[local\ http://donotuse.com,author\ http://donotuse.com,publish\ http://donotuse.com,project-placeholder\ http://project-placeholder.com]"/>
do you see that character in CRXDE Lite after deploying? I don't; I'm assuming it's behaving as an escape character, so I shouldn't see it, but wanted to double check.
Views
Replies
Total Likes
Steps I followed which worked for me
1. copy the 'config.author' folder from /libs/cq/commons where the OOB configuration resides
2. paste it under the 'config' folder in under /apps/<project>
3. Change the values for different instances required and save.
Views
Replies
Total Likes
Found it!
In my first post, I mentioned "I also tried looking in CRXDE Lite /apps/system/config for the configuration I set via Felix". I don't know which article I found that suggested looking there, but it turns out there was a node in /apps/cq/commons that appears to have the values I set in the Felix interface. This node was taking precedence over the node I created in my actual project.
Thanks for your time, all.
Views
Replies
Total Likes
check if you have the correct Service PID
Views
Replies
Total Likes
The PID is
com.day.cq.commons.impl.ExternalizerImpl
And that just needs to match the file name, correct?
com.day.cq.commons.impl.ExternalizerImpl.xml
I think I'm good from that respect - is there another place the PID comes into play?
Thanks
Views
Replies
Total Likes
As @Sham mentioned, just the file name saving as .xml will not work,
Can you let us know the steps you have followed or how have you created this configuration.
Views
Replies
Total Likes
Views
Likes
Replies