ApplicationContext ctx ;
ClassPathXmlApplicationContext instance;
String[] CONFIG_LOCATIONS = new String[] { "classpath:alfresco/application-context.xml" };
instance = new ClassPathXmlApplicationContext(CONFIG_LOCATIONS);
ctx=instance;
final ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
org.springframework.beans.factory.BeanDefinitionStoreException: Error registring bean with name 'webscript.org.alfresco.audit.get' defined in file [….module-context.xml]: Could not resolve parent bean definition 'webscript' ; nested exception is org.springframework.beans.facory.NoSuchBeanDefinitionException: No bean named 'webscript' is defined
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Bean pour la classe pour executer les requetes Hibernate –>
<bean id="beanWsAuditDAO" class="org.alfresco.module.auditscript.WsAuditDAO">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
<!–
<property name="contentStore">
<ref bean="auditFileContentStore"/>
</property>
–>
</bean>
<!– Bean pour le DeclarativeWebScript avec injection de la classe requetes Hibernate –>
<bean id="webscript.org.alfresco.audit.simple.get" class="org.alfresco.module.auditscript.WebScript" parent="webscript">
<property name="wsAuditDAO">
<ref bean="beanWsAuditDAO"/>
</property>
</bean>
</beans>
ClassPathResource cpr=new ClassPathResource("tomcat/webapps/alfresco/WEB-INF/classes/alfresco/public-services-context.xml");
bf = new XmlBeanFactory(cpr);
ServiceRegistry serviceRegistry = (ServiceRegistry) bf.getBean(ServiceRegistry.SERVICE_REGISTRY);
String path = System.getProperty("user.dir" );
Resource cpr = new FileSystemResource(path+"\\tomcat\\webapps\\alfresco\\WEB-INF\\classes\\alfresco\\application-context.xml");
<bean id="beanWsAuditDAO" class="org.alfresco.module.auditscript.WsAuditDAO">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
<property name="serviceRegistry">
<ref bean="ServiceRegistry"/>
</property>
</bean>
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.