[SME-Approved] BW 5.12 send mail activity fails with "java.net.SocketException: Permission denied: connect".

[SME-Approved] BW 5.12 send mail activity fails with "java.net.SocketException: Permission denied: connect".

book

Article ID: KB0092813

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Description:

Send mail activity from BW 5.12 fails with the followng exception:

BW-MAIL-100019 Job-4000 Error in [UnitTesting/SendEmailNotification.process/PrimaryServer] 
Error sending mail message. Cause: javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.MessagingException: Could not connect to SMTP host: webmail.xyz.com, port: 25;
nested exception is:
java.net.SocketException: Permission denied: connect

Symptoms:
javax.mail.MessagingException: Could not connect to SMTP host: webmail.xyz.com, port: 25;
nested exception is:
java.net.SocketException: Permission denied: connect

Cause:
TIBCO BusinessWorks 5.12 uses JRE 1.7.x. IPv6 is used by default on Windows starting with JDK 7. This is the reason for the java.net.SocketException. Setting java.property.java.net.preferIPv4Stack=true enables support for IPv4 on Java 7 and resolves the issue.

Resolution

Add java.property.java.net.preferIPv4Stack=true to the designer.tra for Design time and in the deployed application tra file for runtime.

Issue/Introduction

[SME-Approved] BW 5.12 send mail activity fails with "java.net.SocketException: Permission denied: connect".

Additional Information

http://jonathangiles.net/blog/?p=1126
http://www.java.net/node/703177