10 Replies Latest reply on Feb 8, 2008 9:17 PM by HowardTreisman

    Sending emails

    kc@dafolo.dk Level 1
      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
        • 1. Re: Sending emails
          Jasmin Charbonneau Level 4
          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
          • 2. Re: Sending emails
            kc@dafolo.dk Level 1
            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
            • 3. Re: Sending emails
              Jasmin Charbonneau Level 4
              I would use the "Send With Document" operation of the Email service.

              Have you configured the Connection settings for it?

              Jasmin
              • 4. Re: Sending emails
                kc@dafolo.dk Level 1
                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
                • 5. Re: Sending emails
                  Jasmin Charbonneau Level 4
                  Have you configured the Connection settings for it?

                  Jasmin
                  • 6. Re: Sending emails
                    HowardTreisman Level 1
                    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
                    • 7. Re: Sending emails
                      kc@dafolo.dk Level 1
                      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
                      • 8. Re: Sending emails
                        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:6 97)
                        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.jav a:181)
                        at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor. java:134)
                        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
                        at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(Transa ctionInterceptor.java:74)
                        at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTr ansactionCMTAdapterBean.java:336)
                        at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(Ej bTransactionCMTAdapterBean.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(StatelessSessionConta iner.java:214)
                        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
                        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.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(EjbTransactionProvi der.java:104)
                        at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInt erceptor.java:72)
                        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
                        at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateIntercep tor.java:37)
                        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.java:44)
                        at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterc eptor.java:88)
                        at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptor ChainImpl.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(AbstractMessage Receiver.java:88)
                        at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:21 0)
                        at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.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:17 97)
                        at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncExecuteActionCommand(ProcessEngineBMT Bean.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(StatelessSessionConta iner.java:214)
                        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.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:1 58)
                        at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
                        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.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(ProcessCommandControll erBean.java:127)
                        at com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandController Bean.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.j ava:475)
                        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)
                        at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc eptor.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
                        • 9. Re: Sending emails
                          Level 1
                          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.
                          • 10. Re: Sending emails
                            HowardTreisman Level 1
                            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