public class EnviarCorreoDialog extends BaseDialogBean{
private String correo;
protected String finishImpl(FacesContext context, String outcome) throws Exception
{
// get the space the action will apply to
NodeRef nodeRef = this.browseBean.getActionSpace().getNodeRef();
MailAttachActionExecuter maExecuter = new MailAttachActionExecuter();
maExecuter.enviarEmail(nodeRef,this.correo);
getNodeService().deleteNode(nodeRef);
return outcome;
}
<a:actionLink id="some-id" value="My Webscript Action" image="/images/icons/view_properties.gif"
actionListener="#{MailAttachActionExecuter.enviarEmail}"
tooltip="Show my webscript in a dialog">
<f:param name="correo" value="xxx@xxx.es"/>
<f:param name="nodeRef" value="#{NavigationBean.currentNode.nodeRef}"/>
</a:actionLink>
org.springframework.mail.MailPreparationException: Could not prepare mail; nest
d exception is org.alfresco.error.AlfrescoRuntimeException: Transaction must be
active and synchronization is required: Thread[http-8080-1,5,main]
Caused by: org.alfresco.error.AlfrescoRuntimeException: Transaction must be acti
ve and synchronization is required: Thread[http-8080-1,5,main]
at org.alfresco.repo.transaction.AlfrescoTransactionSupport.registerSyn
hronizations(AlfrescoTransactionSupport.java:432)
at org.alfresco.repo.transaction.AlfrescoTransactionSupport.getSynchron
zation(AlfrescoTransactionSupport.java:416)
at org.alfresco.repo.transaction.AlfrescoTransactionSupport.getResource
AlfrescoTransactionSupport.java:209)
at org.alfresco.repo.domain.hibernate.DirtySessionMethodInterceptor.get
lushData(DirtySessionMethodInterceptor.java:213)
at org.alfresco.repo.domain.hibernate.DirtySessionMethodInterceptor.inv
ke(DirtySessionMethodInterceptor.java:354)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynam
cAopProxy.java:204)
at $Proxy2.getNodePair(Unknown Source)
at org.alfresco.repo.node.db.DbNodeServiceImpl.getNodePairNotNull(DbNod
ServiceImpl.java:153)
at org.alfresco.repo.node.db.DbNodeServiceImpl.hasAspect(DbNodeServiceI
pl.java:712)
at sun.reflect.GeneratedMethodAccessor250.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflect
on(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJ
inpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
ReflectiveMethodInvocation.java:149)
at org.alfresco.repo.transaction.SingleEntryTransactionResourceIntercep
or.invokeInternal(SingleEntryTransactionResourceInterceptor.java:154)
at org.alfresco.repo.transaction.SingleEntryTransactionResourceIntercep
or.invoke(SingleEntryTransactionResourceInterceptor.java:138)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynam
cAopProxy.java:204)
at $Proxy3.hasAspect(Unknown Source)
at sun.reflect.GeneratedMethodAccessor250.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflect
on(AopUtils.java:304)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJ
inpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
ReflectiveMethodInvocation.java:149)
at org.alfresco.repo.tenant.MultiTNodeServiceInterceptor.invoke(MultiTN
deServiceInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynam
cAopProxy.java:204)
at $Proxy3.hasAspect(Unknown Source)
at sun.reflect.GeneratedMethodAccessor250.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.alfresco.repo.service.StoreRedirectorProxyFactory$RedirectorInvo
ationHandler.invoke(StoreRedirectorProxyFactory.java:221)
at $Proxy4.hasAspect(Unknown Source)
at org.alfresco.repo.node.MLPropertyInterceptor.getPivotNodeRef(MLPrope
tyInterceptor.java:324)
at org.alfresco.repo.node.MLPropertyInterceptor.invoke(MLPropertyInterc
ptor.java:164)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeR
fPropertyMethodInterceptor.java:203)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
ReflectiveMethodInvocation.java:171)
at org.alfresco.repo.node.NodeRefPropertyMethodInterceptor.invoke(NodeR
fPropertyMethodInterceptor.java:203)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynam
cAopProxy.java:204)
at $Proxy3.getProperty(Unknown Source)
at org.alfresco.repo.content.RoutingContentService.getReader(RoutingCon
entService.java:317)
at org.alfresco.repo.content.RoutingContentService.getReader(RoutingCon
entService.java:310)
at es.sic.executer.MailAttachActionExecuter$1$1.getContentType(MailAtta
hActionExecuter.java:317)
at javax.activation.DataHandler.getContentType(DataHandler.java:189)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:110
)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:863
at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:2
9)
at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:111
)
at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:1927)
at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1908)
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMail
enderImpl.java:387)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSe
derImpl.java:332)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSe
derImpl.java:347)
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSe
derImpl.java:336)
at es.sic.executer.MailAttachActionExecuter.enviarEmail(MailAttachActio
Executer.java:344)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcce
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.jav
:132)
at javax.faces.component.UICommand.broadcast(UICommand.java:89)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:
7)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:
71)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(Invok
ApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImp
.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.jav
:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App
icationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application
ilterChain.java:206)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(Authentic
tionFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(App
icationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(Application
ilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapper
alve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContext
alve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.
ava:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.
ava:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVa
ve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.ja
a:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.jav
:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proc
ss(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:4
7)
at java.lang.Thread.run(Thread.java:619)
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.