-
1. Re: mail.class.name Delegation
bephinney Aug 22, 2007 5:34 PM (in response to kwokhung)I am having similar problems.
Environment:
MS Exchange relay
JBPM 3.2.1
SQLServer
Tomcat
required property
mail.smtp.auth = true
I need to extend org.jbpm.mail.Mail in order to include an Authenticator when getting the Session.
I have set two jbpm.cfg.xml properties:
- resource.mail.properties
- mail.class.name
and have included a jbpm.mail.properties file at the root of the classpath
My properties file appears to be loading but my custom mail delegation class is not used.
org.jbpm.JbpmException: couldn't send email
org.jbpm.mail.Mail.send(Mail.java:150)
org.jbpm.mail.Mail.send(Mail.java:113)
org.jbpm.mail.Mail.execute(Mail.java:63)
org.jbpm.graph.def.Action.execute(Action.java:122)
org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
org.jbpm.graph.def.Node.enter(Node.java:302)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
...
and
root cause
javax.mail.AuthenticationFailedException
javax.mail.Service.connect(Service.java:306)
javax.mail.Service.connect(Service.java:156)
javax.mail.Service.connect(Service.java:105)
javax.mail.Transport.send0(Transport.java:168)
javax.mail.Transport.send(Transport.java:98)
org.jbpm.mail.Mail.send(Mail.java:148)
org.jbpm.mail.Mail.send(Mail.java:113)
org.jbpm.mail.Mail.execute(Mail.java:63)
org.jbpm.graph.def.Action.execute(Action.java:122)
org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:255)
org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:220)
org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:190)
org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:174)
org.jbpm.graph.def.Node.enter(Node.java:302)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:157)
org.jbpm.graph.def.Node$$EnhancerByCGLIB$$affe36f9.enter(<generated>)
org.jbpm.graph.def.Transition.take(Transition.java:151)
org.jbpm.graph.def.Node.leave(Node.java:393)
org.jbpm.graph.node.StartState.leave(StartState.java:70)
...
Additional troubleshooting (hacking) . . .
I have also modified (println statement) JpdlXmlReader and MailAction and put them ahead of the jar in the class loading order and it appears that they do not get used. -
2. Re: mail.class.name Delegation
g.botquin Aug 27, 2007 7:45 AM (in response to kwokhung)Same problem...
But I found out that when deploying a new process definition containing a MailNode that the related record in the jbpm-delegation table, it is still 'assigned' to the org.jbpm.mail.Mail class instead of this configured in jbpm configuration file. So, has that something to do with the problem. Could it possible that there is bug in the deploying process instead of the delegation process???
Regards -
3. Re: mail.class.name Delegation
ngtdave Jun 5, 2009 2:49 PM (in response to kwokhung)Yeah, the delegation is set in the DB at deploy time. So if you change the configuration, you'll want to redeploy your process definitions. (Or I guess you could update the db.)