Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1168279

Summary: EmailRouter/Emailer shares config
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: tcunning
Component: JBossESBAssignee: tcunning
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: CONTINUINGCC: soa-p-jira
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:43:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description tcunning 2014-11-26 15:11:43 UTC
When used with a lot of threads, EmailRouter is throwing an exception, it looks like from a null SMTP from address.

[1]    2014-11-13 14:59:25,620 ERROR 
[org.jboss.resource.adapter.jms.inflow.JmsServerSession] Unexpected 
error delivering message SolObjectMessage={ 
JMSCorrelationID:1a7d743a-75e5-4719-aed7-825a50192c64,JMSDeliveryMode:2,JMSDestination:Queue 
'queue/eai-email-queue',JMSExpiration:0,JMSMessageID:ID:10.210.12.618fb4149a877083b0:119130,JMSPriority:0,JMSRedelivered,JMSTimestamp:1415890730845,JMSProperties:{sendTo:EAIUATSupport,subject:UOI 
Mismatch from Phoenix [Realtime 
Instrument],from:u00_esb.uk,JMS_Solace_DeliverToOne:false,JMS_Solace_DeadMsgQueueEligible:true,JMS_Solace_ElidingEligible:false,Solace_JMS_Prop_IS_Reply_Message:false},SolPayload:{Binary 
Attachment:len=3747} }
java.lang.NullPointerException
        at javax.mail.internet.InternetAddress.parse(InternetAddress.java:615)
        at javax.mail.internet.InternetAddress.parse(InternetAddress.java:575)
        at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:107)
        at org.jboss.soa.esb.helpers.Email.addMessageAddressing(Email.java:401)
        at org.jboss.soa.esb.helpers.Email.createMailMessage(Email.java:386)
        at org.jboss.soa.esb.helpers.Email.getMailMessage(Email.java:239)
        at org.jboss.soa.esb.helpers.Email.sendMessage(Email.java:229)
        at 
org.jboss.soa.esb.actions.routing.email.Emailer.sendEmail(Emailer.java:184)
        at 
org.jboss.soa.esb.actions.routing.email.Emailer.sendEmail(Emailer.java:141)
        at 
org.jboss.soa.esb.actions.routing.email.EmailRouter.route(EmailRouter.java:78)
        at 
org.jboss.soa.esb.actions.routing.AbstractRouter.process(AbstractRouter.java:80)
        at 
org.jboss.soa.esb.actions.routing.email.EmailRouter.process(EmailRouter.java:70)
        at 
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:667)
        at 
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:614)
        at 
org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:442)
        at 
org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener.process(JcaMessageAwareListener.java:163)
        at 
org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter.onMessage(JcaJMSInflowMessageProcessorAdapter.java:44)


From Martin :

Bottom line is that EmailRouter is only thread safe when used in a 
static fashion (all fields defined in jboss-esb.xml). If used 
dynamically, with the fields populated at runtime based on the message
content, it is necessary to limit the thread count to 1 to avoid 
multi-threading issues.

From Kevin : 

I think the problem is in the EmailRouter/Emailer classes.  The EmailRouter shares the ConfigTree however the process method can also alter it depending on the message contents which is not safe.  The Emailer class should be taking into account the message contents but without altering ConfigTree.

Comment 2 Red Hat Bugzilla 2025-02-10 03:43:40 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.