Hi. Have you posted to the user forums too?
Mark.
On 28 Aug 2008, at 06:10, Neha Pandey wrote:
Hi ,
Its very urgent.
I want to send an email to the user after the successful action
pipeline is completed. I have used NotifyEmail for this but this is
not working. The SMTP host is not picked up from the jboss-
properties.xml . My SMTP Server is 172.25.8.13 and it can accept
null username and password.I have set SMTP host in both
jbossesb.sar/jbossesb-properties and jbossesb-properties in my
application folder.
The error is
Code:
2008-08-27 16:18:42,546 INFO [STDOUT] ConsoleNotifier 2008/08/27
04:18:42.546<<CountryDetais><Country
Code="us"><Name>United States
of America</Name><Rate>8.33</Rate><ISD>71</ISD>
</Country><Country
Code="in"><Name>India</Name><Rate>0</Rate>
<ISD>91</ISD></Country><Country
Code="au"><Name>Australia</
Name><Rate>7.69</Rate><ISD>21</ISD></Country></CountryDetais>>
2008-08-27 16:18:42,562 WARN [org.jboss.soa.esb.helpers.Email]
'org.jboss.soa.esb.mail.smtp.auth' s
et to an empty value.
2008-08-27 16:18:42,562 INFO [org.jboss.soa.esb.helpers.Email]
Initialising mail server sesson. Pro
perties: {mail.smtp.port=25, mail.smtp.auth=true,
mail.smtp.host=localhost}
2008-08-27 16:18:43,671 ERROR
[org.jboss.soa.esb.notification.NotificationList] Can't instantiate ta
rget <target class="NotifyEmail"
from="Neha.Pandey(a)lntinfotech.com"
sendTo="Neha.Pandey(a)lntinfotech.com" subject="Hello">
</target>
org.jboss.soa.esb.notification.NotificationException:
javax.mail.MessagingException: Exception readi
ng response;
nested exception is:
java.net.SocketException: Connection reset
at
org
.jboss
.soa.esb.notification.NotifyEmail.sendNotification(NotifyEmail.java:
127)
at
org
.jboss
.soa
.esb.notification.NotificationList.notifyAll(NotificationList.java:
164)
at org.jboss.soa.esb.actions.Notifier.notifyOK(Notifier.java:
93)
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
.soa
.esb
.listeners
.message.ActionProcessorMethodInfo.processSuccess(ActionProcessorMeth
odInfo.java:165)
at
org
.jboss
.soa
.esb
.listeners
.message.OverriddenActionLifecycleProcessor.processSuccess(Overridden
ActionLifecycleProcessor.java:108)
at
org
.jboss
.soa
.esb
.listeners
.message.ActionProcessingPipeline.notifySuccess(ActionProcessingPipel
ine.java:610)
at
org
.jboss
.soa
.esb
.listeners
.message.ActionProcessingPipeline.process(ActionProcessingPipeline.ja
va:384)
at org.jboss.soa.esb.listeners.message.MessageAwareListener
$TransactionalRunner.run(MessageAwareLis
tener.java:530)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Caused by: javax.mail.MessagingException: Exception reading response;
nested exception is:
java.net.SocketException: Connection reset
at
com
.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:
1611)
at
com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1369)
at
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:
412)
at javax.mail.Service.connect(Service.java:310)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at javax.mail.Transport.send0(Transport.java:188)
at javax.mail.Transport.send(Transport.java:118)
at org.jboss.soa.esb.helpers.Email.sendMessage(Email.java:181)
at
org
.jboss
.soa
.esb.notification.NotifyEmail.sendEmailNotification(NotifyEmail.java:
151)
at
org
.jboss
.soa.esb.notification.NotifyEmail.sendNotification(NotifyEmail.java:
115)
... 14 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at
com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:110)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:
218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:
235)
at
com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:88)
at
com
.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:
1589)
... 24 more
I have set the properties in Jboss-properties.xml file
Code:
<properties name="transports" depends="core">
<property name="org.jboss.soa.esb.mail.smtp.host"
value="172.25.8.13"/>
<property name="org.jboss.soa.esb.mail.smtp.user"
value=""/>
<property name="org.jboss.soa.esb.mail.smtp.password"
value=""/>
<property name="org.jboss.soa.esb.mail.smtp.port"
value="25"/>
</properties>
My Jbossesb.xml is
Code:
<service category="QuickstartTransformCSV" name="SimpleListener"
description="Hello World">
<listeners>
<jms-listener name="CSVJMS-Gateway"
busidref="quickstartCSVGwChannel" maxThreads="1"
is-gateway="true"/>
<jms-listener name="CSVquickstart"
busidref="quickstartCSVEsbChannel" maxThreads="1" />
</listeners>
<actions mep="OneWay">
<action
class="org.jboss.soa.esb.actions.Notifier"
name="notificationAction">
<property
name="notification-details">
<NotificationList type="OK">
<target
class="NotifyConsole"/>
<target class="NotifyQueues">
<messageProp
name="quickstart" value="Calculator_Response"/>
<queue jndiName="queue/
quickstart_log_Queue"/>
</target>
<target class="NotifyEmail"
from="Neha.Pandey(a)lntinfotech.com
" sendTo="Neha.Pandey(a)lntinfotech.com"
subject="Hello">
</target>
</NotificationList>
</property>
<property name="okMethod" value="notifyOK"/>
<!--property name="exceptionMethod"
value="notifyError"/-->
</action>
<action name="print-before"
class="org.jboss.soa.esb.actions.SystemPrintln">
<property
name="message" value="[transform_CSV2Smooks_Intermediate_format]
Message before CVS to XML transformation" />
</action>
<!--
Transform 1: CSV to XML...
-->
<action name="transform-from-
csv" class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
<property name="resource-config" value="/
smooks-res.xml" />
<property name="from-type"
value="text/csv:country-list" />
<property name="to-type"
value="text/xml:smooks-country-xml" />
</action>
<action name="print-after-
csv-tranform" class="org.jboss.soa.esb.actions.SystemPrintln">
<property
name="message" value="[transform_CSV2Smooks_Intermediate_format]
Message after CVS to XML transformation" />
</action>
<!--
Transform 2: XML to XML...
-->
<action name="transform-smooksXml-to-
canonicalXml"
class="org.jboss.soa.esb.actions.converters.SmooksTransformer">
<property name="resource-config" value="/
smooks-res.xml" />
<property name="from-type"
value="text/xml:smooks-country-xml" />
<property name="to-type"
value="text/xml:canonical-country-xml" />
</action>
<action name="print-after-
xml-transform" class="org.jboss.soa.esb.actions.SystemPrintln">
<property name="message"
value=">>>> Message after Smooks intermediate xml -> target xml :
" />
</action>
<!-- The next action is for Continuous
Integration testing -->
<action name="testStore"
class="org.jboss.soa.esb.actions.TestMessageStore"/>
</actions>
</service>
How should i go about this?What is the problem?
Thanks & Regards,
Neha Pandey
Center of Excellence - SOA Group
L &T Infotech Limited
Gate no. - 5, Technology Center ,
4th Floor - West side
Powai.
Mumbai 400 072.
The information contained in this mail is classified as
( ) L&T Infotech Proprietary
( ) L&T Infotech Confidential
( ) L&T Infotech Internal Use
( ) L&T Infotech General Business
Larsen & Toubro Infotech Ltd.
www.Lntinfotech.com
This Document is classified as:
L&T Infotech Proprietary L&T Infotech Confidential L&T Infotech
Internal Use Only L&T Infotech General Business
This Email may contain confidential or privileged information for
the intended recipient (s) If you are not the intended recipient,
please do not use or disseminate the information, notify the sender
and delete it from your system.
______________________________________________________________________
_______________________________________________
esb-users mailing list
esb-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/esb-users
---
Mark Little
mlittle(a)redhat.com
JBoss, a Division of Red Hat
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA), Matt
Parsons (USA) and Brendan Lane (Ireland).