[Installation, Configuration & Deployment] - JBOSS SMTP+TLS
by mikala
PLEASE HELP ME
I try to to connect to smtp mail server with TLS. I have JBOSS 4.0.1Sp1. I repleced mail.jar from server/default/lib with the latest version 1.4.(this version support SMTP+TLS)
I have the sample code which is working outside the JBOSS but not in JBOSS:
String port = "25";
java.util.Properties props = new java.util.Properties();
props.setProperty("mail.debug", "true");
props.setProperty("mail.smtps.socketFactory.port", port);
props.setProperty("mail.smtps.socketFactory.fallback", "false");
props.setProperty("mail.smtps.auth", "true");
props.put("mail.smtps.host", "hermenegilda.intranet");
props.put("mail.smtp.host", "hermenegilda.intranet");
props.put("mail.smtp.port", 25);
props.put("mail.smtp.auth", "true");
props.setProperty("mail.smtp.starttls.enable", "true");
java.security.Security.setProperty("ssl.SocketFactory.provider","com.zetokatowice.talgos.common.util.mail.DummySSLSocketFactory");
try {
Session session = Session.getInstance(props, new Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication("ts", "ts");
}
});
MimeMessage msg = new MimeMessage(session);
msg.setText("test");
msg.setSubject("test");
msg.setFrom(new InternetAddress("ts(a)hermenegilda.intranet"));
msg.setRecipient(Message.RecipientType.TO, new InternetAddress("kalanskim(a)zeto.intranet"));
Transport tr = session.getTransport("smtp");
tr.connect();
tr.sendMessage(msg, msg.getAllRecipients());
tr.close();
} catch (Exception e) {
e.printStackTrace();
}
When I run this code outside the JBOSS, TLS connection is open using my DummySSLSocketFactory but when i try to run it on JBOSS connection is opend using default factory.
How to tell JBOSS to use my DummySSLSocketFactory ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981752#3981752
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981752
19 years, 6 months
[Beginners Corner] - HELP - after installing JBoss 4.0.5 getting error
by savoymp
It appears that the issue is that Eclipse will rebuild and redeploy the EAR to JBoss while at the same time opening up IE and trying to load the JSP. JBoss eventually will see the new EAR and it has to go through a process of unloading the current EAR from memory and then reloading the new EAR. The error you see is happening when JBoss unloads the current EAR from memory as far as I can tell(?).
I submitted this question to the installation, configuration forum but got no response. Then I read I was to suppose to submit here first since I'm a newbie.
I just installed JBoss on my local machine but when trying to "run on server" a JSP page from within Eclipse 3.2 IDE I am getting the following error:
| HTTP Status 500 -
|
| type Exception report
| message
| description The server encountered an internal error () that prevented it from fulfilling this request.
| exception
| java.lang.NullPointerException
| org.jboss.mx.loading.RepositoryClassLoader.findClass(RepositoryClassLoader.java:620)
| java.lang.ClassLoader.loadClass(Unknown Source)
| org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:464)
| org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:405)
| java.lang.ClassLoader.loadClass(Unknown Source)
| java.lang.ClassLoader.loadClassInternal(Unknown Source)
| org.acegisecurity.ui.ntlm.NtlmProcessingFilter.onPreAuthentication(NtlmProcessingFilter.java:344)
| org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:200)
| org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
| org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
| org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
| org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:191)
|
| org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
| org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
| org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:90)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981746#3981746
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981746
19 years, 6 months