[jboss-user] [Installation, Configuration & DEPLOYMENT] - IMAP via TLS in JBoss 4.2.2.GA

luckybird do-not-reply at jboss.com
Mon Jan 5 09:19:37 EST 2009


Hi all,
I'm just trying to connect to an IMAP mailserver from JBoss. But all I get is the following exception:


  | 15:07:10,484 ERROR [STDERR] javax.mail.MessagingException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target;
  |   nested exception is:
  |         javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  | 15:07:10,499 ERROR [STDERR]     at com.sun.mail.imap.IMAPStore.protocolConnect(IMAPStore.java:479)
  | 15:07:10,499 ERROR [STDERR]     at javax.mail.Service.connect(Service.java:297)
  | 15:07:10,499 ERROR [STDERR]     at javax.mail.Service.connect(Service.java:156)
  | 15:07:10,499 ERROR [STDERR]     at javax.mail.Service.connect(Service.java:105)

My mail-service.xml looks like following:


  | 	<mbean code="org.jboss.mail.MailService" name="MSTM:service=OrderSMSService">
  | 		<attribute name="JNDIName">java:/ORDERSMS
  | 		</attribute>
  | 		<attribute name="User">me</attribute>
  | 		<attribute name="Password">dontknow</attribute>
  | 		<attribute name="Configuration">
  | 			<configuration>
  | 				<property name="mail.transport.protocol" value="imap" />
  | 				<property name="mail.user" value="me" />
  | 				<property name="mail.password" value="dontknow" />
  | 
  | 				<property name="mail.host" value="my.favourite.mailserver.com" />
  | 
  | 				<property name="mail.smtp.host" value="my.favourite.mailserver.com" />
  | 
  | 				<property name="mail.imap.starttls.enable" value="true" />
  | 				
  | 				<property name="mail.debug" value="true" />
  | 			</configuration>
  | 		</attribute>
  | 	</mbean>
  | 

To access the mailbox I'm using the following code:

        Store store = mailSession.getStore("imaps");
  |         store.connect();
  | 
How can I tell JBoss to connect to the IMAP server?

TIA,
Ralf.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4199547#4199547

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4199547



More information about the jboss-user mailing list