--David
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
Unfortunately, it looks like the "setComponentManager" is called before the Rest client is constructed by Spring, so I get an exception:Marijan,I tried adding a call to "initialize" on the "setComponentManager" method of the ClientComponentManager class.
[INFO] [talledLocalContainer] 24.06.2016 07:58:28 WARN [org.springframework.context.support.AbstractApplicationContext.refresh():486] Exception encountered during context initialization - cancelling refresh attempt
[INFO] [talledLocalContainer] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.example.rest.client.ClientComponentConfigurationManager#0' defined in file [/apps/git/public-hippo/public-common/target/classes/META-INF/hst-assembly/overrides/client-component-configuration-listener.xml]: Initialization of bean failed; nested exception is org.hippoecm.hst.core.container.ModuleNotFoundException: No Addon Module is found.
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:529)
[INFO] [talledLocalContainer] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
...
[INFO] [talledLocalContainer] Caused by: org.hippoecm.hst.core.container.ModuleNotFoundException: No Addon Module is found.
[INFO] [talledLocalContainer] at org.hippoecm.hst.site.container.SpringComponentManager.getComponent(SpringComponentManager.java:267)
[INFO] [talledLocalContainer] at org.example.rest.client.ClientComponentConfigurationManager.initialize(ClientComponentConfigurationManager.java:56)
[INFO] [talledLocalContainer] at org.example.rest.client.ClientComponentConfigurationManager.setComponentManager(ClientComponentConfigurationManagerjava:26)
[INFO] [talledLocalContainer] at org.hippoecm.hst.site.container.DefaultComponentManagerApplicationContext.postProcessBeforeInitialization(DefaultComponentManagerApplicationContext.java:121)...Any suggestions would be appreciated.
Hi David,
We used to have an option (check.repositories.running = true in hst-config.properties) to have HST Container initialization wait for the underlying repository really responding, but unfortunately the option was disabled since Hippo 10.2. [1] We forgot its goodness at the moment.Please feel free to create an HSTTWO issue for an improvement.As a workaround, I would try the following at the moment:- You can add another bean which has an init method (supposed to be invoked through "init-method" while applicationContext being loaded) which is checking the repository status until you get a valid jcr session from the javax.jcr.Repository bean (ID: "javax.jcr.Repository" as well) with looping and thread sleep.
Ard, Woonsan, Marijan, et al.,
I was able to modify my Spring configuration to use setter injection to supply the ClientComponentConfigurationManager reference to the GoGreenClient.
Here's a summary of the changes that I made:
1) Added a "configManager" instance variable and getConfigManager/setConfigManager methods on GoGreenClient. Modified the "getTopTenProducts()" method to call the "initialize" method on the ClientComponentConfigurationManager instance. Note: The "getTopTenProducts" method should probably be synchronized (or have a synchronized block) so multiple requests don't try to retrieve objects from the web service. I don't know if there is a better way to handle that.
2) Modified the "hst-assembly/overrides/client-component-configuration-listener.xml" file, adding an "id" attribute for the ClientComponentConfigurationManager bean. This enables the GoGreenClient Spring configuration file to reference it.
3) Modified the "hst-assembly/addon/org/example/rest/client/SpringComponentManager-ignite.xml" file, adding a "property" field to the "GoGreenClient" bean to set the configManager.
4) In the "ClientComponentConfigurationManager" class, modified the "initialized" method to check whether the "initialized" boolean instance variable was true (returning in that case), otherwise ran the rest of the method and set the "initialized" boolean to true. Note: Made the method synchronized, in case multiple near-simultaneous requests were being made.
It would be great if the Hippo documentation could be updated with an improved version. Is there a particular Jira portal I should add an issue to?
On Wed, Jun 29, 2016 at 10:57 AM, David Steelman <dsteel...@gmail.com> wrote:It would be great if the Hippo documentation could be updated with an improved version. Is there a particular Jira portal I should add an issue to?4) In the "ClientComponentConfigurationManager" class, modified the "initialized" method to check whether the "initialized" boolean instance variable was true (returning in that case), otherwise ran the rest of the method and set the "initialized" boolean to true. Note: Made the method synchronized, in case multiple near-simultaneous requests were being made.3) Modified the "hst-assembly/addon/org/example/rest/client/SpringComponentManager-ignite.xml" file, adding a "property" field to the "GoGreenClient" bean to set the configManager.2) Modified the "hst-assembly/overrides/client-component-configuration-listener.xml" file, adding an "id" attribute for the ClientComponentConfigurationManager bean. This enables the GoGreenClient Spring configuration file to reference it.1) Added a "configManager" instance variable and getConfigManager/setConfigManager methods on GoGreenClient. Modified the "getTopTenProducts()" method to call the "initialize" method on the ClientComponentConfigurationManager instance. Note: The "getTopTenProducts" method should probably be synchronized (or have a synchronized block) so multiple requests don't try to retrieve objects from the web service. I don't know if there is a better way to handle that.Here's a summary of the changes that I made:Ard, Woonsan, Marijan, et al.,I was able to modify my Spring configuration to use setter injection to supply the ClientComponentConfigurationManager reference to the GoGreenClient.Hi David,Thanks for your this! The Jira project for our product documentation is not public but I created a ticket to review, update and improve this documentation based on your feedback. I'll try to pick this up after the Hippo CMS 11 release.
Regards,Niels
>> > To post to this group, send email to hippo-community@googlegroups.com
>> > RSS:
>> >
>> > https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Hippo Community" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to hippo-community+unsubscribe@googlegroups.com.
>> > Visit this group at https://groups.google.com/group/hippo-community.
>> > For more options, visit https://groups.google.com/d/optout.
>>
>>
>>
>> --
>> Hippo Netherlands, Oosteinde 11, 1017 WT Amsterdam, Netherlands
>> Hippo USA, Inc. 71 Summer Street, 2nd Floor Boston, MA 02110, United
>> states of America.
>>
>> US +1 877 414 4776 (toll free)
>> Europe +31(0)20 522 4466
>> www.onehippo.com
>>
>> --
>> Hippo Community Group: The place for all discussions and announcements
>> about Hippo CMS (and HST, repository etc. etc.)
>>
>> To post to this group, send email to hippo-community@googlegroups.com
>> RSS:
>> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Hippo Community" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to hippo-community+unsubscribe@googlegroups.com.
>> Visit this group at https://groups.google.com/group/hippo-community.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> Hippo Community Group: The place for all discussions and announcements about
> Hippo CMS (and HST, repository etc. etc.)
>
> To post to this group, send email to hippo-community@googlegroups.com
> RSS:
> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google Groups
> "Hippo Community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hippo-community+unsubscribe@googlegroups.com.
> Visit this group at https://groups.google.com/group/hippo-community.
> For more options, visit https://groups.google.com/d/optout.
--
Hippo Netherlands, Oosteinde 11, 1017 WT Amsterdam, Netherlands
Hippo USA, Inc. 71 Summer Street, 2nd Floor Boston, MA 02110, United
states of America.
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.
--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
To post to this group, send email to hippo-community@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-community+unsubscribe@googlegroups.com.