Note that there are some explanatory texts on larger screens.

plurals
  1. POProblems changing the default configuration of JBoss Mail service
    primarykey
    data
    text
    <p>Right now i have to make migration of one application.</p> <p><strong>Basic configuration:</strong></p> <ol> <li>JBOSS 5.1.0 GA </li> <li>Seam 2.2.0.GA</li> <li>JBPM 3.2.2 </li> <li>RichFaces 3.3.1.GA</li> <li>Hibernate 3.3.1.GA </li> <li>OS: Debian/Linux</li> </ol> <p>Application has been deployed on JBoss server with its own configuration. On old machine there was postfix (localhost, port 25) for sending messages.</p> <p>On new machine i have different host and port. </p> <p>What i have now in <em>components.xml</em>:</p> <pre><code>&lt;mail:mail-session session-jndi-name="java:/Mail" /&gt; </code></pre> <p>My <em>mail-service.xml</em>:</p> <pre><code>&lt;mbean code="org.jboss.mail.MailService" name="jboss:service=Mail"&gt; &lt;attribute name="JNDIName"&gt;java:/Mail&lt;/attribute&gt; &lt;attribute name="User"&gt;XXX&lt;/attribute&gt; &lt;attribute name="Password"&gt;XXX&lt;/attribute&gt; &lt;attribute name="Configuration"&gt; &lt;!-- A test configuration --&gt; &lt;configuration&gt; &lt;!-- Change to your mail server prototocol --&gt; &lt;property name="mail.store.protocol" value="pop3"/&gt; &lt;property name="mail.transport.protocol" value="smtp"/&gt; &lt;!-- Change to the user who will receive mail --&gt; &lt;property name="mail.user" value="XXX"/&gt; &lt;!-- Change to the mail server --&gt; &lt;property name="mail.pop3.host" value="localhost"/&gt; &lt;!-- Change to the SMTP gateway server --&gt; &lt;property name="mail.smtp.host" value="XXX"/&gt; &lt;property name="mail.smtp.auth" value="true"&gt;&lt;/property&gt; &lt;property name="mail.smtp.ssl.enable" value="false"&gt;&lt;/property&gt; &lt;property name="mail.smtp.port" value="587"/&gt; &lt;property name="mail.smtp.connectiontimeout" value="20000"&gt;&lt;/property&gt; &lt;property name="mail.smtp.timeout" value="20000"&gt;&lt;/property&gt; &lt;!-- The mail server port --&gt; &lt;!-- Change to the address mail will be from --&gt; &lt;property name="mail.from" value="XXX"/&gt; &lt;!-- Enable debugging output from the javamail classes --&gt; &lt;property name="mail.debug" value="true"/&gt; &lt;/configuration&gt; &lt;/attribute&gt; &lt;depends&gt;jboss:service=Naming&lt;/depends&gt; </code></pre> <p></p> <p>I'm intrested only in sending messages.</p> <p>But still:</p> <pre><code>javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25; nested exception is: java.net.ConnectException: Connection refused at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370) at javax.mail.Service.connect(Service.java:275) at javax.mail.Service.connect(Service.java:156) at javax.mail.Service.connect(Service.java:105) at javax.mail.Transport.send0(Transport.java:168) at javax.mail.Transport.send(Transport.java:98) &lt;xxx&gt; Caused by: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:232) at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1250) ... 59 more </code></pre> <p>Of course connection is refused because application is still pointed on localhost:25. I have tried to find with grep other configurations, allocations, etc. mail-service is started (jmx-console info). Still its looked like aplication is not configured properly but using defaults.. Whats wrong? </p> <p>PS: I'm not specialist in JBoss. I don't have root account on this hosting server.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload