<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to call the node-service when my AMP starts up? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147699#M103096</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tried to isolate the problem a little further; here's the revised picture: I have an AMP (org.myorg.module.MyPackage) that preloads the category hierarchy for the countries (this is the standard "REGIONS" category hierarchy of Alfresco). I need to preload them because I need very fast access to them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This AMP has the following configuration in my module's module-context.xml:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt; &amp;lt;!– Instantiate the custom Service. –&amp;gt;&lt;BR /&gt; &amp;lt;bean id="myService" class="org.myorg.module.MyPackage.service.MyService" init-method="init"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="serviceRegistry"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="ServiceRegistry" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="policyComponent"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="policyComponent" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="dirRoot"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;${dir.root}&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;/bean&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The class MyService has a method&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;nbsp; /**&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Returns the list of all country categories. The first time you call this,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * the list is actually fetched from the repository but cached afterwards, so that&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * subsequent calls are very fast.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; public List&amp;lt;NodeRef&amp;gt; getCachedCountryHierarchy()&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // …&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeRef tag = …;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;ChildAssociationRef&amp;gt; childAssocs = nodeService.getChildAssocs(tag); // (*)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // …&lt;BR /&gt;&amp;nbsp; }&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The important thing here is that this method calls NodeService's getChildAssocs() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now comes the problem: Some *other* code uses my AMP and calls getCachedCountryHierarchy() from within a &lt;/SPAN&gt;&lt;A href="http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/transaction/TransactionListener.html" rel="nofollow noopener noreferrer"&gt;afterCommit()&lt;/A&gt;&lt;SPAN&gt; listener. If this is the first time (since Alfresco startup) that getCachedCountryHierarchy() gets called, the line (*) is executed, which results in the exception from the original post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it seems that I have to make sure that getCachedCountryHierarchy() is called after Alfresco startup. How can I do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to do it in my service's init() method (see configuration above), by just calling getCachedCountryHierarchy() there. But at this point, no Alfresco transaction is set up and I get an authentication error, so I am wondering what the "standard" way is to perform tasks against the repository (queries in my case) after AMP startup. I think it's a general pattern that many AMPs will require, so I thought there's maybe a general way to do it…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kaspar&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 19 Jan 2008 09:20:50 GMT</pubDate>
    <dc:creator>hbf</dc:creator>
    <dc:date>2008-01-19T09:20:50Z</dc:date>
    <item>
      <title>How to call the node-service when my AMP starts up?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147697#M103094</link>
      <description>Hi!My AMP preloads some data (the country tags that are currently in use, to be precise). I've first implemented "lazy caching" in the sense that the data is loaded/fetched only when some code asks for it.This does not work however, as some client code is asking for the data within an afterCommit()</description>
      <pubDate>Fri, 18 Jan 2008 12:38:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147697#M103094</guid>
      <dc:creator>hbf</dc:creator>
      <dc:date>2008-01-18T12:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to call the node-service when my AMP starts up?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147698#M103095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Please post your configuration files and your java classes, so we can have a look and may help you. &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers, CM.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Jan 2008 19:56:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147698#M103095</guid>
      <dc:creator>claudio_martins</dc:creator>
      <dc:date>2008-01-18T19:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to call the node-service when my AMP starts up?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147699#M103096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tried to isolate the problem a little further; here's the revised picture: I have an AMP (org.myorg.module.MyPackage) that preloads the category hierarchy for the countries (this is the standard "REGIONS" category hierarchy of Alfresco). I need to preload them because I need very fast access to them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This AMP has the following configuration in my module's module-context.xml:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt; &amp;lt;!– Instantiate the custom Service. –&amp;gt;&lt;BR /&gt; &amp;lt;bean id="myService" class="org.myorg.module.MyPackage.service.MyService" init-method="init"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="serviceRegistry"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="ServiceRegistry" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="policyComponent"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="policyComponent" /&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;property name="dirRoot"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;value&amp;gt;${dir.root}&amp;lt;/value&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;BR /&gt; &amp;lt;/bean&amp;gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The class MyService has a method&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&amp;nbsp; /**&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * Returns the list of all country categories. The first time you call this,&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * the list is actually fetched from the repository but cached afterwards, so that&lt;BR /&gt;&amp;nbsp;&amp;nbsp; * subsequent calls are very fast.&lt;BR /&gt;&amp;nbsp;&amp;nbsp; */&lt;BR /&gt;&amp;nbsp; public List&amp;lt;NodeRef&amp;gt; getCachedCountryHierarchy()&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // …&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; NodeRef tag = …;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; List&amp;lt;ChildAssociationRef&amp;gt; childAssocs = nodeService.getChildAssocs(tag); // (*)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // …&lt;BR /&gt;&amp;nbsp; }&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;The important thing here is that this method calls NodeService's getChildAssocs() method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now comes the problem: Some *other* code uses my AMP and calls getCachedCountryHierarchy() from within a &lt;/SPAN&gt;&lt;A href="http://dev.alfresco.com/resource/docs/java/repository/org/alfresco/repo/transaction/TransactionListener.html" rel="nofollow noopener noreferrer"&gt;afterCommit()&lt;/A&gt;&lt;SPAN&gt; listener. If this is the first time (since Alfresco startup) that getCachedCountryHierarchy() gets called, the line (*) is executed, which results in the exception from the original post.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So it seems that I have to make sure that getCachedCountryHierarchy() is called after Alfresco startup. How can I do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to do it in my service's init() method (see configuration above), by just calling getCachedCountryHierarchy() there. But at this point, no Alfresco transaction is set up and I get an authentication error, so I am wondering what the "standard" way is to perform tasks against the repository (queries in my case) after AMP startup. I think it's a general pattern that many AMPs will require, so I thought there's maybe a general way to do it…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Kaspar&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 19 Jan 2008 09:20:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147699#M103096</guid>
      <dc:creator>hbf</dc:creator>
      <dc:date>2008-01-19T09:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to call the node-service when my AMP starts up?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147700#M103097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can you post the full stack trace to show how your code is getting called in the TX after commit. What is this "other" code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Andy&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2008 15:23:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147700#M103097</guid>
      <dc:creator>andy</dc:creator>
      <dc:date>2008-02-12T15:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to call the node-service when my AMP starts up?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147701#M103098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've got a sort of similar problem. I want to make sure that certain folders exist in the workspace, otherwise my module doesn't work correctly. So I'm looking for a way to execute some code after my module has been loaded when Alfresco starts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The bean in my module-context.xml is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;bean id="module.cayman" class="org.alfresco.module.cayman.Main" parent="module.baseComponent" init-method="init"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;property name="nodeService"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;ref bean="NodeService" /&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/property&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/bean&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;(Do I actually need to extend baseComponent?)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;And the cayman.Main class is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;public class Main extends AbstractModuleComponent {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;private NodeService nodeService;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void setNodeService(NodeService nodeService) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;this.nodeService = nodeService;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;public void init() {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println("Init of Cayman module");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;logger.debug("Init of Cayman module");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;StoreRef storeRef = new StoreRef(StoreRef.PROTOCOL_WORKSPACE, "SpacesStore");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;NodeRef ref1 = new NodeRef(storeRef, "/app:company_home/cm:Cayman");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.out.println(nodeService.exists(ref1));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;BR /&gt;}&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Without the nodeService call the init() method gets executed, but with it I get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;17:53:58,241 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed&lt;BR /&gt;org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'module.cayman' defined in file [D:\alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\module\cayman\module-context.xml]: Invocation of init method failed; nested exception is net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext&lt;BR /&gt;Caused by: net.sf.acegisecurity.AuthenticationCredentialsNotFoundException: A valid SecureContext was not provided in the RequestContext&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNotFound(AbstractSecurityInterceptor.java:477)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:355)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;at net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)&lt;BR /&gt;&lt;BR /&gt;(and so on…)&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;See also my other post: &lt;/SPAN&gt;&lt;A href="http://forums.alfresco.com/viewtopic.php?t=11304" rel="nofollow noopener noreferrer"&gt;http://forums.alfresco.com/viewtopic.php?t=11304&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Stijn&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;BTW: what is the correct (simple) way to check if a folder exists in the spacesstore if you know the path? Would the above actually work?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Feb 2008 16:56:27 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-call-the-node-service-when-my-amp-starts-up/m-p/147701#M103098</guid>
      <dc:creator>stijndereede</dc:creator>
      <dc:date>2008-02-28T16:56:27Z</dc:date>
    </item>
  </channel>
</rss>

