<?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 ACS and Aspect Oriented Programming (AOP) in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/acs-and-aspect-oriented-programming-aop/m-p/137827#M36975</link>
    <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;We are trying to use AOP , both for some of our beans and also for some out of the box alfresco beans. We cannot seem to make the configuration work.&lt;/P&gt;&lt;P&gt;We use alfresco enterprise&lt;/P&gt;&lt;P&gt;Alfresco share version: 6.2.2.6&lt;/P&gt;&lt;P&gt;Alfresco platform version: 6.2.2.19&lt;/P&gt;&lt;P&gt;We have tried two methods:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First method&lt;/STRONG&gt;&lt;BR /&gt;We tried extending the StaticMethodMatcherPointcut class and following this guide: &lt;A href="https://www.websparrow.org/spring/spring-aop-pointcut-example-using-xml-configuration" target="_self" rel="nofollow noopener noreferrer"&gt;https://www.websparrow.org/spring/spring-aop-pointcut-example-using-xml-configuration&lt;/A&gt;&lt;/P&gt;&lt;P&gt;We noticed two things, if the bean that we want to use AOP on is injected in another class with the @Autowired annotation the acs fails to start with the following error:&lt;/P&gt;&lt;P&gt;Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.incentro.diva.services.DivaService' available: expected single matching bean but found 2: diva.service.proxy,diva.service.diva&lt;/P&gt;&lt;P&gt;So it seems that for some reason it perceives the aop configuration as recreating the bean.&lt;/P&gt;&lt;P&gt;If it is not autowired the acs starts up, but the AOP functionality is not getting triggered when it should.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Second method&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We tried a different approach by using the aop:config tag and following this guide: &lt;A href="https://howtodoinjava.com/spring-aop/spring-aop-aspectj-example-tutorial-using-annotation-config/" target="_self" rel="nofollow noopener noreferrer"&gt;https://howtodoinjava.com/spring-aop/spring-aop-aspectj-example-tutorial-using-annotation-config/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In this case an exception for out of the box beans that were not involved in the configuration started failing. I cannot attach files so this is the stacktrace:&lt;/P&gt;&lt;PRE&gt; 2021-11-03 10:55:19,107  WARN  [context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'annotatedBehaviourBeanPostProcessor' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'policyComponent' while setting bean property 'policyComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyComponent' defined in class path resource [alfresco/policy-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryService' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
 2021-11-03 10:55:19,117  ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'annotatedBehaviourBeanPostProcessor' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'policyComponent' while setting bean property 'policyComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyComponent' defined in class path resource [alfresco/policy-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryService' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:314)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1674)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1426)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:240)
	at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:721)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:534)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
	at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
	at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:129)
	at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:150)
	at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:140)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:717)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1859)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyComponent' defined in class path resource [alfresco/policy-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryService' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:314)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
    at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:662)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:188)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1340)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1186)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:303)
    ... 33 more
 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryService' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:303)
    ... 45 more
 Caused by: org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
    at org.alfresco.repo.transaction.CheckTransactionAdvice.invoke(CheckTransactionAdvice.java:51)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
    at com.sun.proxy.$Proxy30.isSingleton(Unknown Source)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:97)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:349)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:124)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1674)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1426)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
    ... 51 more
 03-Nov-2021 10:55:19.125 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
 03-Nov-2021 10:55:19.134 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/alfresco] startup failed due to previous errors
 03-Nov-2021 10:55:19.186 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [alfresco] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
 03-Nov-2021 10:55:19.188 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@d37164a]) and a value of type [org.alfresco.util.CachingDateFormat] (value [yyyy-MM-dd]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.&lt;/PRE&gt;&lt;P&gt;Is there a reason that AOP fails like this? Is there a way to make it work?&lt;/P&gt;&lt;P&gt;P.S. I did not include the configuration and code in order not to bloat the ticket and because it is really similar to the guides for which i provided the links. If you want me to provide the configuration that led to these issues let me know.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Nov 2021 11:50:52 GMT</pubDate>
    <dc:creator>Dimitris</dc:creator>
    <dc:date>2021-11-25T11:50:52Z</dc:date>
    <item>
      <title>ACS and Aspect Oriented Programming (AOP)</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/acs-and-aspect-oriented-programming-aop/m-p/137827#M36975</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;We are trying to use AOP , both for some of our beans and also for some out of the box alfresco beans. We cannot seem to make the configuration work.&lt;/P&gt;&lt;P&gt;We use alfresco enterprise&lt;/P&gt;&lt;P&gt;Alfresco share version: 6.2.2.6&lt;/P&gt;&lt;P&gt;Alfresco platform version: 6.2.2.19&lt;/P&gt;&lt;P&gt;We have tried two methods:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;First method&lt;/STRONG&gt;&lt;BR /&gt;We tried extending the StaticMethodMatcherPointcut class and following this guide: &lt;A href="https://www.websparrow.org/spring/spring-aop-pointcut-example-using-xml-configuration" target="_self" rel="nofollow noopener noreferrer"&gt;https://www.websparrow.org/spring/spring-aop-pointcut-example-using-xml-configuration&lt;/A&gt;&lt;/P&gt;&lt;P&gt;We noticed two things, if the bean that we want to use AOP on is injected in another class with the @Autowired annotation the acs fails to start with the following error:&lt;/P&gt;&lt;P&gt;Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'com.incentro.diva.services.DivaService' available: expected single matching bean but found 2: diva.service.proxy,diva.service.diva&lt;/P&gt;&lt;P&gt;So it seems that for some reason it perceives the aop configuration as recreating the bean.&lt;/P&gt;&lt;P&gt;If it is not autowired the acs starts up, but the AOP functionality is not getting triggered when it should.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Second method&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;We tried a different approach by using the aop:config tag and following this guide: &lt;A href="https://howtodoinjava.com/spring-aop/spring-aop-aspectj-example-tutorial-using-annotation-config/" target="_self" rel="nofollow noopener noreferrer"&gt;https://howtodoinjava.com/spring-aop/spring-aop-aspectj-example-tutorial-using-annotation-config/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In this case an exception for out of the box beans that were not involved in the configuration started failing. I cannot attach files so this is the stacktrace:&lt;/P&gt;&lt;PRE&gt; 2021-11-03 10:55:19,107  WARN  [context.support.XmlWebApplicationContext] [localhost-startStop-1] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'annotatedBehaviourBeanPostProcessor' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'policyComponent' while setting bean property 'policyComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyComponent' defined in class path resource [alfresco/policy-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryService' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
 2021-11-03 10:55:19,117  ERROR [web.context.ContextLoader] [localhost-startStop-1] Context initialization failed
 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'annotatedBehaviourBeanPostProcessor' defined in class path resource [alfresco/core-services-context.xml]: Cannot resolve reference to bean 'policyComponent' while setting bean property 'policyComponent'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyComponent' defined in class path resource [alfresco/policy-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryService' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:314)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1674)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1426)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:240)
	at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:721)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:534)
	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)
	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)
	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)
	at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:70)
	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
	at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:129)
	at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:150)
	at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:140)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:717)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1125)
	at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1859)
	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'policyComponent' defined in class path resource [alfresco/policy-context.xml]: Cannot resolve reference to bean 'dictionaryService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryService' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:314)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:110)
    at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:662)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:188)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1340)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1186)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:303)
    ... 33 more
 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dictionaryService' defined in class path resource [alfresco/core-services-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:303)
    ... 45 more
 Caused by: org.alfresco.error.AlfrescoRuntimeException: 10030000 A transaction has not be started for method 'isSingleton' on org.springframework.beans.factory.FactoryBean
    at org.alfresco.repo.transaction.CheckTransactionAdvice.invoke(CheckTransactionAdvice.java:51)
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
    at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
    at com.sun.proxy.$Proxy30.isSingleton(Unknown Source)
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:97)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:349)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:124)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1674)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1426)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)
    ... 51 more
 03-Nov-2021 10:55:19.125 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
 03-Nov-2021 10:55:19.134 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.startInternal Context [/alfresco] startup failed due to previous errors
 03-Nov-2021 10:55:19.186 WARNING [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [alfresco] registered the JDBC driver [org.postgresql.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
 03-Nov-2021 10:55:19.188 SEVERE [localhost-startStop-1] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [alfresco] created a ThreadLocal with key of type [java.lang.ThreadLocal.SuppliedThreadLocal] (value [java.lang.ThreadLocal$SuppliedThreadLocal@d37164a]) and a value of type [org.alfresco.util.CachingDateFormat] (value [yyyy-MM-dd]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.&lt;/PRE&gt;&lt;P&gt;Is there a reason that AOP fails like this? Is there a way to make it work?&lt;/P&gt;&lt;P&gt;P.S. I did not include the configuration and code in order not to bloat the ticket and because it is really similar to the guides for which i provided the links. If you want me to provide the configuration that led to these issues let me know.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Nov 2021 11:50:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/acs-and-aspect-oriented-programming-aop/m-p/137827#M36975</guid>
      <dc:creator>Dimitris</dc:creator>
      <dc:date>2021-11-25T11:50:52Z</dc:date>
    </item>
  </channel>
</rss>

