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.
在我的domain.xml
,由于我的Session
对象已映射到min.email.jndi.lookup.binding
,因此每个profile
包含的annotation-property-replacement
标记(我正在使用default
jboss配置文件)需要从false
更改为true
min.email.jndi.lookup.binding
通过Resource
注释进行min.email.jndi.lookup.binding
。
<annotation-property-replacement>true</annotation-property-replacement>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.