Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Sending emails

Avatar

Level 8
Level 8
As you might now I receive emails to kick off the process. When my process is finished I then must send an email back to the user. To this I am using the Email - send with document service in Foundation. I set this up with a gmail account and the gmail-smtp server (if this matters).



The problem is that when the process arrives at the point where it must send the email I get an error in the server log.



The log states that it cannot locate the classloaders for com.adobe.idp.dsc.email.MessageFormatEnum



More precisely this error:



SEVERE: JobManager:createJob:error sending message:java.lang.RuntimeException: java.lang.ClassNotFoundException: No ClassLoaders found for: com.adobe.idp.dsc.email.MessageFormatEnum



With my knowledge to Java it seems that some path is not set correctly, but I (to my knowledge at least) have set all the necesary paths correctly.



What could you recommend for me to try?



Sincerely



Kim Christensen

Dafolo A/S

Denmark
10 Replies

Avatar

Level 10
Can you tell us how you specify the "Send With Document" parameters?



Do you add attachments? Are they of type document? What about the other properties. It looks like that one of the parameter is not the right type.



Maybe it's that gmail smtp server. I've never used it.



Jasmin

Avatar

Level 8
Level 8
Yes, I have attaching an xdp-form (xfaform) to the mail. I guess this caused the error.



To see whether I could get anything through to the end user I have tested the "send with document" without any attachment. This does not give me any error in the server log, however I do not receive any email at the specified email-address. I have also tried to use the SendEmailService service in Foundation (also without success) however I don't know the exact difference between this service and the "Send with document" service.



I hope that you understand what I am asking.



By the way it might be on time that I try to explain what my large process is supposed to do. It should be able to receive emails (with a some kind of application form) from users and this form should then be processed by a number of people in the organization. After processing the form and answer should be supplied to the end user by an email back. There are some extra twists in process, however this is the main lines in the process.



Thanks in advance



Sincerely



Kim Christensen

Dafolo A/S

Denmark

Avatar

Level 10
I would use the "Send With Document" operation of the Email service.



Have you configured the Connection settings for it?



Jasmin

Avatar

Level 8
Level 8
OK, this was also my first choice. However I might use it wrongly in my process.



In the server log nothing seems to be logged about this step in my process. No errors are generated and I cannot find this step in the "Process Instance" in the AdminUI. It is just like it is not executed. The trace of the process instance stops at the step just before the "send with document" service showing as "completed".



To me this seems somewhat weird...



Sincerely

Kim Christensen

Dafolo A/S

Denmark

Avatar

Level 10
Have you configured the Connection settings for it?



Jasmin

Avatar

Level 9
Hi Kim

Could you please revise exactly what you are seeing when.

It seems that sometimes you're getting an exception on the step, sometimes the step is not executing, sometimes you're getting an error in the log file, other times not. Could you please clarify.



Also, what version of Java are you using on the server?



Howard

http://www.avoka.com

Avatar

Level 8
Level 8
Hi again all,



I got it to work now. I had some problems with the smtp server that I was using, but now it works. However I have a problem attaching my form with data to the answer (see other post I have posted). I guess the attachment needs to be a document type, but my input form is of type xfaform and I need to use the xml-schema to traverse with xpath, so I cant just make my inputform a document-type.



Sincerely



Kim Christensen

Dafolo A/S

Denmark

Avatar

Former Community Member
Hi,



I am also experiencing the problem while sending email. following is the exception:



java.lang.RuntimeException: javax.mail.AuthenticationFailedException

at com.adobe.idp.dsc.email.EmailServiceImpl.sendWithMapOfAttachments(EmailServiceImpl.java:697)

at com.adobe.idp.dsc.email.EmailServiceImpl.sendWithDocument(EmailServiceImpl.java:338)

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:585)

at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:181)

at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:134)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)

at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:336)

at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(EjbTransactionCMTAdapterBean.java:212)

at sun.reflect.GeneratedMethodAccessor369.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.invocation.Invocation.performCall(Invocation.java:345)

at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)

at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)

at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)

at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)

at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)

at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)

at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:363)

at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)

at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)

at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)

at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)

at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)

at org.jboss.ejb.Container.invoke(Container.java:873)

at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)

at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)

at $Proxy210.doSupports(Unknown Source)

at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:104)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:72)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:37)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:88)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:113)

at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:102)

at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:88)

at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:210)

at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:57)

at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)

at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:553)

at com.adobe.workflow.engine.ProcessEngineBMTBean.executeAction(ProcessEngineBMTBean.java:1797)

at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncExecuteActionCommand(ProcessEngineBMTBean.java:1754)

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:585)

at org.jboss.invocation.Invocation.performCall(Invocation.java:345)

at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)

at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)

at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)

at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)

at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)

at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158)

at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)

at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)

at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)

at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)

at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)

at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)

at org.jboss.ejb.Container.invoke(Container.java:873)

at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)

at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)

at $Proxy257.asyncExecuteActionCommand(Unknown Source)

at com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControllerBean.java:127)

at com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandControllerBean.java:94)

at sun.reflect.GeneratedMethodAccessor1248.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:585)

at org.jboss.invocation.Invocation.performCall(Invocation.java:345)

at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)

at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)

at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)

at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)

at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)

at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)

at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)

at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)

at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)

at org.jboss.ejb.Container.invoke(Container.java:873)

at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)

at org.jboss.ejb.plugins.jms.JMSContainerInvoker

Avatar

Former Community Member
It looks like your server is trying to authenticate with the server before it sends the email. Check your email configuration user name and password and be certain that they exist as a user account on your email server.

Avatar

Level 9
Waqas

My best way of debugging mail authentication problems is to download Mozilla's Thunderbird mail client, run it on the same server box as Jboss, and debug your mail settings that way.



Kim, to turn an xfaForm into a document, you need to either use Form Data Integration or LC Forms components. FDI is much easier to use, but only works with PDF, not XDP.



Howard

http://www.avoka.com