2012-07-19 83 views

回答

64

此錯誤文本與Session.getDefaultInstance(props, authenticator)的調用相關聯,其中默認實例已具有不同的驗證器集。

如果您在代碼中調用Session.getInstance(props, authenticator)而不是Session.getDefaultInstance(props, authenticator),它應該會更好。

6

我有相同的錯誤,當我在Webdriver中啓動2個測試。在secound測試中,我得到了「java.lang.SecurityException:訪問默認會話被拒絕」。

當我在每個測試使用的方法Session.getInstance代替作爲Session.getDefaultInstance,錯誤消失。

相關問題