01-17-2010 04:25 PM
20:53:38,217 User:admin ERROR [scripts.export.OrderPrint] Could not create a print order
org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'webscript.com.cadq.alfresco.common.repository.export.stream-temp-file' defined in file [C:\Users\nils.weinander\Program\Alfresco-3.1\tomcat\shared\classes\alfresco\extension\cadq-projektnavet-alfresco-context.xml]: Could not resolve parent bean definition 'webscript'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'webscript' is defined
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'webscript' is defined
<bean id="webscript.com.cadq.alfresco.common.repository.export.stream-temp-file"
class="com.cadq.alfresco.common.repo.web.scripts.export.StreamTemporaryFile"
parent="webscript">
<property name="contentService" ref="ContentService" />
<property name="mimetypeService" ref="MimetypeService" />
<property name="nodeService" ref="NodeService" />
<property name="permissionService" ref="PermissionService" />
</bean>
new ClassPathXmlApplicationContext("alfresco/webscript-framework-application-context.xml")
01-18-2010 02:39 AM
public synchronized static ConfigurableApplicationContext getApplicationContext(String[] configLocations)
{
if (configLocations == null)
{
throw new IllegalArgumentException("configLocations argument is mandatory.");
}
if (usedConfiguration != null && Arrays.deepEquals(configLocations, usedConfiguration))
{
// The configuration was used to create the current context
return instance;
}
// The config has changed so close the current context (if any)
closeApplicationContext();
instance = new ClassPathXmlApplicationContext(configLocations);
usedConfiguration = configLocations;
return instance;
}
An Alfresco repository can be embedded in a JVM only one time, this means that you can't have two Alfresco embedded repository in the same application (same JVM).
instance = new ClassPathXmlApplicationContext(configLocations);
This instruction is a Spring instruction and allows you to create a new Application Context, that's why this solution can't work for your goal.
public NodeService setNodeService(NodeService nodeService){
this.nodeService = nodeService;
}
Then when Alfresco starts for the first time, Spring for you starts to wire all the resources. 01-18-2010 02:58 AM
Resource xslt = ctx.getResource(xslFile);
InputStream xsltStream = this.getClass().getClassLoader().getResourceAsStream(xslFile);
ApplicationContext ctx = new ClassPathXmlApplicationContext("alfresco/webscript-framework-application-context.xml");
Resource xslt = ctx.getResource(xslFile);
InputStream xsltStream = xslt.getInputStream();
01-18-2010 03:57 AM
<property name="xslFile" value="classpath:alfresco/extension/printOrder.xsl" />
Resource xslFile;
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.