I have a Weblogic mail session configured on it with (got from weblogic config screen and JNDI tree):
Name: default
JNDI Name: mail/Session
Binding Name: mail.Session
Class: javax.mail.Session
Hash Code: 2112656059
toString Results: javax.mail.Session@7dec92bb
with my only server as target and no security policies configured.
Doing a lookup:
final Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://127.0.0.1:7001");
Session session = (Session) context.lookup("mail/Session");
I just get a null reference without any exception. However I'm able to list the JNDI tree remotely and it brings me the right objects:
weblogic
__WL_GlobalJavaApp
_WL_internal_CWI76otjHMIOhcsss1r1f0O7mVbaDE4riYjUFgmDAl9lkzlfET4ZBvPiKD1gPI7x
mail
ejb
javax
java:global
mejbmejb_jarMejb_EO
And inside the mail node, I can find the Session but without a bound object on it:
boundObj= null
className= null
fullName= null
isRel= true
name= "Session" (id=26)
I've already tried to provide security access configuring and using Context.SECURITY_PRINCIPAL / Context.SECURITY_CREDENTIALS, besides providing full path (java:/comp/env/mail/Session which throws NameNotFoundException), but nothing has changed.
Does someone has any idea what can be happening?
Any idea would be very helpful...
Thank you all.