Hi,
I’m currently facing a problem where new content documents won’t be bootstrapped anymore. Let me explain the scenario:
We currently have a running system with the following folder:
/content/documents/myproject/config/labels
This folder already contains multiple resource bundles and I want to add another one like:
/content/documents/myproject/config/labels/footer-labels
But this does not work In other words, the document will not appear on the desired location.
The new file does appears in the hcm:hcm
after a deployment.
at /hcm:hcm/hcm:baseline/myproject-hippo/myproject-hippo/myproject-hippo-repository-data-application/hcm-content/content/documents/myproject/config/label/footer-labels.yaml
to be precise.
Although there is clearly something going wrong, there are no specific errors for this footer-labels.yaml
There is an interesting error though, which is the following, about the labels.yaml
(the folder above our file)
ERROR: Processing 'APPEND' action for content node '/content/documents/myproject/config/label' failed
07.05.2019 15:11:58 [localhost-startStop-1] ERROR [org.onehippo.cm.engine.ConfigurationContentService.apply():174] Processing ‘APPEND’ action for content node ‘/content/documents/myproject/config/label’ failed.
javax.jcr.ItemExistsException: Node already exists at path /content/documents/myproject/config/label
at org.onehippo.cm.engine.JcrContentProcessor.validateAppendAction(JcrContentProcessor.java:110) ~[hippo-repository-engine-5.6.1.jar:5.6.1]
at org.onehippo.cm.engine.JcrContentProcessor.apply(JcrContentProcessor.java:135) ~[hippo-repository-engine-5.6.1.jar:5.6.1]
at org.onehippo.cm.engine.ConfigurationContentService.apply(ConfigurationContentService.java:157) [hippo-repository-engine-5.6.1.jar:5.6.1]
at org.onehippo.cm.engine.ConfigurationContentService.apply(ConfigurationContentService.java:87) [hippo-repository-engine-5.6.1.jar:5.6.1]
at org.onehippo.cm.engine.ConfigurationServiceImpl.applyContent(ConfigurationServiceImpl.java:666) [hippo-repository-engine-5.6.1.jar:5.6.1]
at org.onehippo.cm.engine.ConfigurationServiceImpl.init(ConfigurationServiceImpl.java:216) [hippo-repository-engine-5.6.1.jar:5.6.1]
at org.onehippo.cm.engine.ConfigurationServiceImpl.start(ConfigurationServiceImpl.java:122) [hippo-repository-engine-5.6.1.jar:5.6.1]
at com.onehippo.repository.HippoEnterpriseRepository.initializeConfiguration(HippoEnterpriseRepository.java:178) [hippo-enterprise-repository-engine-5.6.1.jar:5.6.1]
at org.hippoecm.repository.LocalHippoRepository.initialize(LocalHippoRepository.java:292) [hippo-repository-engine-5.6.1.jar:5.6.1]
at com.onehippo.repository.HippoEnterpriseRepository.create(HippoEnterpriseRepository.java:63) [hippo-enterprise-repository-engine-5.6.1.jar:5.6.1]
at com.onehippo.repository.HippoEnterpriseRepository.create(HippoEnterpriseRepository.java:53) [hippo-enterprise-repository-engine-5.6.1.jar:5.6.1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_212]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_212]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_212]
at org.hippoecm.repository.HippoRepositoryFactory.getHippoRepository(HippoRepositoryFactory.java:147) [hippo-repository-connector-5.6.1.jar:5.6.1]
at org.hippoecm.repository.RepositoryServlet.init(RepositoryServlet.java:184) [hippo-repository-servlets-5.6.1.jar:5.6.1]
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1142) [catalina.jar:8.5.40]
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1089) [catalina.jar:8.5.40]
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:983) [catalina.jar:8.5.40]
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4956) [catalina.jar:8.5.40]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5270) [catalina.jar:8.5.40]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.5.40]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754) [catalina.jar:8.5.40]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730) [catalina.jar:8.5.40]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734) [catalina.jar:8.5.40]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980) [catalina.jar:8.5.40]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1851) [catalina.jar:8.5.40]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_212]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_212]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_212]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]
This error is quite explainable, because in the beginning of our project we’ve had a large labels.yaml
which not only consists of a folder, but also all the resources bundles underneath. Because this was not really the way we like to save files, we decided to split this up. Also because the resources bundles changed, and we wanted to update them locally as well. So we moved all resources bundles under /labels
to our repository-data-development
module. So since that moment our labels.yaml changed and starts throwing this non-sense error (in my eyes).
I’m not really sure how we could have done this without getting this error. Before Hippo 12 we could play around with the hippo:initialize
nodes, but this is not possible anymore since the switch to yaml.
The error of the labels.yaml
looks to be effecting the child nodes as well, although that’s just my assumption. Hope someone could make help me out here!
Thanks in advance for the effort at least
Cheers,
Jesper
PS: I know about the hcm-actions, but reloading the labels node will remove all existing labels on production as well, this is something we would like to avoid