Error looking up ${email.jndi.lookup.binding} in JNDI

Posted on

Working with JBoss eap 6.4.12

Getting error:

Error looking up ${email.jndi.lookup.binding} in JNDI

Mapping this JNDI name in my java class:

@Resource(mappedName = "${email.jndi.lookup.binding}")
     private Session session;

I define this property in my build properties (removing \ after : in my build properties definition doesn't make a difference):

email.jndi.lookup.binding=java:/jboss/mail/Default

In my JBoss console:
/jboss/mail/Default

This is happened before to me on another project, in which changing the annotation property replacement property to true worked. But not this time.

Responses