java mail api : exception thrown saying java.lang.SecurityException: Access to default session denied

前端 未结 2 1722
-上瘾入骨i
-上瘾入骨i 2021-02-12 11:26

when im trying to send a mail using java mail api in my web application , I\'m getting this exception.

java.lang.SecurityException: Access to default session denied

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-12 12:08

    I've got the same error, when I launch 2 tests in Webdriver. In secound test i've got "java.lang.SecurityException: Access to default session denied".

    When I used method Session.getInstance instead Session.getDefaultInstance in every test, errors disappeared.

提交回复
热议问题