Hi,
I have a webapp setup to send an email notification using javamail. The
code works in both Tomcat and JBoss, but in Geronimo I am getting a
SecurityException. Here is a subset of the stacktrace:
java.lang.SecurityException
at javax.mail.Session.getDefaultInstance(Session.java:137)
at
com.esa.gaf.server.mail.MailServiceImpl.createSession(MailServiceImpl.java:121)
at
com.esa.gaf.server.mail.MailServiceImpl.sendMail(MailServiceImpl.java:61)
at
com.esa.web.recruiting.app.server.service.RecruitingServiceImpl.notify(RecruitingServiceImpl.java:267)
at
com.esa.web.recruiting.app.server.service.RecruitingServiceImpl.addRecruit(RecruitingServiceImpl.java:246)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
FWIW, I initially had the war built to include the necessary javamail
dependencies. I suspect, since Geronimo includes a Javamail car, that I
don't need to include these, but am finding little guidance in the
documentation or through googling to point me in the right direction.
The mail server is configured correctly and I am using a valid user to
send the email from. Is there something special I need to do in order
to get this to work correctly?
Thanks,
John