AnsweredAssumed Answered

Having problems creating a new kind of Webscript

Question asked by oluwasegzy on Jul 13, 2011
Latest reply on Jul 13, 2011 by oluwasegzy
I am trying to create custom tag in my webscript description file the would represent an extension to the description URI.

I am using the example java code in the Alfresco Professional

Chapter 11; Creating a new Kind of Web Script

NodeWebScript.java and NodeWebScriptExtension.java

after deploying my java classes and the nodewebscript-context.xml below shown

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN 2.0//EN' 'http://www.springframework.org/dtd/spring-beans-2.0.dtd'>
<beans>
<bean id="webscript.org.example.nodewebscript"
class="org.example.NodeWebScript" parent="webscript" scope="prototype">
<property name="repository" ref="repositoryHelper"/>
</bean>
<bean id="webscriptdesc.org.example.nodewebscript"
class="org.example.NodeWebScriptExtension"/>
</beans>

Alfresco Application does not start but throws the following exception

Exception


   
15:01:18,661  ERROR [management.subsystems.ChildApplicationContextFactory$ChildApplicationContext] Exception thrown from ApplicationListener handling ContextClosedEvent
org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'googledocs': Singleton bean creation not allowed while the singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
   at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:209)
   at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:287)
   at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
   at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1008)
   at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:132)
   at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:86)
   at org.alfresco.repo.management.SafeApplicationEventMulticaster.multicastEvent(SafeApplicationEventMulticaster.java:87)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:294)
   at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:296)
   at org.springframewor


I dont seems to understand where this exception is coming from

Outcomes