-
1. Re: Error sending email in jbpm-4.2
rebody May 26, 2010 9:53 PM (in response to cmjhingeniero)Hi Carlos,
I googled on net. And somebody said that it could be caused by wrong version of email. I suggest you try the mail.jar included in jBPM distribution.
-
2. Re: Error sending email in jbpm-4.2
cmjhingeniero May 26, 2010 9:54 PM (in response to rebody)Hi HuiSheng
thanks for responding in the classpath if you are activation.jar and mail.jar
-
3. Re: Error sending email in jbpm-4.2
cmjhingeniero May 27, 2010 11:10 AM (in response to cmjhingeniero)I could not solve the problem, so I consulted the web is in the configuration of tomcat. If anyone can help me I appreciate it. I tried sending email from a normal java method and I get the following error:
javax.mail.NoSuchProviderException: smtpSource Code Java:
public void send(){
MimeMultipart multipart = new MimeMultipart();
Properties properties = new Properties();
properties.put("mail.smtp.host", "10.1.1.20");
Session session = Session.getDefaultInstance(properties, null);
session.setDebug(true);
try {
MimeMessage msg = new MimeMessage(session);
msg.setFrom(new InternetAddress("carlosj@audifarma.com.co"));
msg.setRecipients(Message.RecipientType.TO, "cmjhingeniero@yahoo.es");
msg.setSubject("PROBANDO");
msg.setSentDate(new Date());
MimeBodyPart mbp = new MimeBodyPart();
mbp.setText("PROBANDO");
multipart.addBodyPart(mbp);
msg.setContent(multipart);
Transport t = session.getTransport("smtp");
t.connect();
Transport.send(msg);
t.close();
System.out.println("===>Correo Enviado...");
}
catch (Exception mex){
System.out.println("===>Error MailSender.send() = "+mex);
}
}Thanks
-
4. Re: Error sending email in jbpm-4.2
swiderski.maciej May 27, 2010 11:44 AM (in response to cmjhingeniero)First of all please add :
mail.debug set to true to mail properties:
Properties properties = new Properties(); properties.put("mail.smtp.host", "10.1.1.20"); properties.put("mail.debug", "true");
that should print quite some information. Please attach the log file to the discussion.
What version of mail.jar are you using?
-
5. Re: Error sending email in jbpm-4.2
cmjhingeniero May 27, 2010 2:09 PM (in response to swiderski.maciej)Thanks for responding. The mail.jar I'm using is the one who brings jbpm-4.2 package. Associate the image with the error found
I appreciate any information that you can give me
-
ErrorEmail.JPG 253.6 KB
-
ErrorEmail2.JPG 131.1 KB
-
-
6. Re: Error sending email in jbpm-4.2
swiderski.maciej May 27, 2010 2:21 PM (in response to cmjhingeniero)Could you describe a bit your environment setup?
It seems like some class loader issues. Please make sure that jbpm and mail libraries are loaded by the same class loader.
-
7. Re: Error sending email in jbpm-4.2
cmjhingeniero Jun 1, 2010 9:22 AM (in response to swiderski.maciej)I installed the jbpm-4.2 package and install it on tomcat with demo.setup.tomcat I check in the lib folder of apache-tomcat libraries were the activation.jar and mail.jar Also in the lib folder of src-4.2 jbpm is the activation.jar and mail.jar libraries
Thanks for your help
-
8. Re: Error sending email in jbpm-4.2
cmjhingeniero Jun 2, 2010 12:31 PM (in response to cmjhingeniero)I updated the version of mail.jar to Tomcat 1.4.3 I have reinstalled with reinstall.tomcat.and.jbpm but the error persists. I have found in a different forum following the error I get:
Forum Response:
"Undoubtedly this is a configuration error in your production Tomcat server.
If you're Including mail.jar in your web application Tomcat Then Most Likely
Also has a version of mail.jar that's somehow Causing the problem. Possibly there's a problem with the Tomcat ClassLoader That makes Used in
Unable to look it up the file That resource providers configure the protocol "I do not know what to check in the apache-tomcat.6.0.20
I have four days and I could not find the solution thank any helpThanks
-
ErrorEmail3.JPG 266.7 KB
-
-
9. Re: Error sending email in jbpm-4.2
mwohlf Jun 2, 2010 1:21 PM (in response to cmjhingeniero)did you try removing the mail.jar & activation.jar from the tomcat/lib directory and just keep the ones in your application's lib directory?
and maybe you should give tomcat 6.0.26 a try