I am deploying locally using gradle.
Getting new missing/unsatisfied dependency on my jndi lookup name:
JBAS014775: New missing/unsatisfied dependencies: service jboss.naming.context.java.comp.min.comp-alert-manager.EmailAlertHandler.env."${min.email.jndi.lookup.binding}" (missing) dependents: [service jboss.naming.context.java.comp.min.comp-alert-manager.EmailAlertHandler.env."com.comp.alert.EmailAlertHandler".session]
where min.email.jndi.lookup.binding is used in EmailAlertHandler.java:
@Resource(mappedName = "${min.email.jndi.lookup.binding}")
private Session session;
local.build.properties:
min.email.jndi.lookup.binding=java:/jboss/mail/Default
jboss.profile=default
jboss.server.groups=other-server-group
jboss.servers=localhost/server-three
mail subsystem in domain.xml:
<subsystem xmlns="urn:jboss:domain:mail:1.2">
<mail-session name="default" jndi-name="java:jboss/mail/Default">
<smtp-server outbound-socket-binding-ref="mail-smtp"/>
</mail-session>
</subsystem>
outbound-socket-binding in domain.xml:
<outbound-socket-binding name="mail-smtp">
<remote-destination host="smtp.comp.com" port="25"/>
</outbound-socket-binding>
my jboss console is also displaying the correct jndi name
I believe the issue is with my local JBoss EAP 6.4.12 though. A coworker is able to deploy locally without this error. Could be something in my host.xml or domain.xml. What I notice for my coworker is that the server group has a full-ha profile instead of the default for his jboss6. So I did try changing mine to that and adding the full-ha profile xml block to my domain.xml but that did not work.
in my domain.xml
, the annotation-property-replacement
tag that each profile
contains (I was using the default
jboss profile) needed to be changed from false
to true
since my Session
object is being mapped to min.email.jndi.lookup.binding
via the Resource
annotation.
<annotation-property-replacement>true</annotation-property-replacement>