05-20-2010 01:18 AM
public class TXT2PDFActionExecuter extends ActionExecuterAbstractBase{
…
private NodeService nodeService;
public void setNodeService(NodeService nodService)
{
this.nodeService = nodService;
}
….
QName PROP_QNAME_MY_PROPERTY = QName.createQName("custom.model", "title");
System.out.println("QNAME>" + PROP_QNAME_MY_PROPERTY.toString());
System.out.println("actionedUponNodeRef>" + actionedUponNodeRef.toString());
System.out.println("getin title node>" + this.nodeService.toString());
NodeRef titleValue = (NodeRef)this.nodeService.getProperty(actionedUponNodeRef, PROP_QNAME_MY_PROPERTY);
….
actionedUponNodeRef>workspace://SpacesStore/44266631-7e4e-4df6-8b44-96e8538aafb9
[b]java.lang.NullPointerException[/b]
at com.atolcd.repo.action.executer.TXT2PDFActionExecuter.executeImpl(TXT2PDFActionExecuter.java:159)
at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)
at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:726)
at org.alfresco.repo.action.executer.CompositeActionExecuter.executeImpl(CompositeActionExecuter.java:66)
at org.alfresco.repo.action.executer.ActionExecuterAbstractBase.execute(ActionExecuterAbstractBase.java:133)
at org.alfresco.repo.action.ActionServiceImpl.directActionExecution(ActionServiceImpl.java:726)
at org.alfresco.repo.action.ActionServiceImpl.executeActionImpl(ActionServiceImpl.java:658)
at org.alfresco.repo.action.ActionServiceImpl.executeAction(ActionServiceImpl.java:526)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.alfresco.repo.security.permissions.impl.AlwaysProceedMethodInterceptor.invoke(AlwaysProceedMethodInterceptor.java:34)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:43)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.alfresco.repo.audit.AuditComponentImpl.audit(AuditComponentImpl.java:279)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:228)
at org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:195)
at org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:140)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy39.executeAction(Unknown Source)
05-20-2010 08:58 AM
05-20-2010 09:03 AM
05-21-2010 12:55 AM
Make sure you inject the nodeService in the spring-config files. And please give me some karma pointsEric thaks for info as you notice I had to put nodeService into module-contex.xml![]()
/Erik
<bean id="txt2pdf" class="com.atolcd.repo.action.executer.TXT2PDFActionExecuter" parent="action-executer">
<property name="contentService">
<ref bean="contentService" />
</property>
<property name="nodeService">
<ref bean="nodeService" />
</property>
<property name="fileFolderService">
<ref bean="fileFolderService" />
</property>
</bean>
and now it works perfect05-21-2010 12:58 AM
What would you expect to see from "this.nodeService.toString()"?
That's a service so at best you will see some gobbledegook spring proxy reference.
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.