Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408
sphola Jul 13, 2019 4:01 AMHi Everyone
i am facing the below error:
11:41:25,001 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "healthy-heart-score-batch.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"healthy-heart-score-batch.ear\".WeldStartService" => "Failed to start service Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type JMSMessageProcessService with qualifiers @Default at injection point [BackedAnnotatedField] @Inject private com.company.service.healthyheartscore.processor.HealthyHeartScoreBatchProcessor.messageProvider at com.company.service.healthyheartscore.processor.HealthyHeartScoreBatchProcessor.messageProvider(HealthyHeartScoreBatchProcessor.java:0) WELD-001474: Class com.company.service.healthyheartscore.utils.JMSMessageProcessService is on the classpath, but was ignored because a class it references was not found: [unknown]. "}} @
Trying to deploy this application on WildFly 16.
Here is the class.
JMSMessageProcessService.java
@Defaultpublic class JMSMessageProcessService { private static final Logger LOGGER = LoggerFactory .getLogger(JMSMessageProcessService.class); private QueueConnectionFactory getConnectionFactory(String conFactJNDIName) { Context ctx = null; QueueConnectionFactory conFactory = null; try { ctx = new InitialContext(); conFactory = (QueueConnectionFactory) ctx.lookup(conFactJNDIName); } catch (NamingException e) { LOGGER.error("NamingException: {}", e); } return conFactory; } public void pushMessageInTopic(String topicConnectionFactory, String topic, String message, Properties messageSelectors) throws Exception { javax.jms.TopicConnection connection = null; TopicSession session = null; Topic destinationTopic = null; TopicPublisher requestProducer = null; TextMessage requestMessage = null; try { connection = getTopicConnectionFactory(topicConnectionFactory).createTopicConnection(); session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); destinationTopic = getTopic(topic); requestProducer = session.createPublisher(destinationTopic); LOGGER.debug("requestProducer created"); requestMessage = session.createTextMessage(); LOGGER.debug("requestMessage created"); if (null != messageSelectors && !messageSelectors.isEmpty()) { for (Map.Entry<object, object> e : messageSelectors.entrySet()) { String key = (String) e.getKey(); String value = (String) e.getValue(); requestMessage.setObjectProperty(key, value); } } requestMessage.setText(message); requestProducer.publish(requestMessage); LOGGER.debug("Sent request"); LOGGER.debug("Request Message Text: {}", requestMessage.getText()); } catch (JMSException e) { LOGGER.error("Create Topic Message: JMSException {}", e); throw e; } catch (Exception e) { LOGGER.error("Create Topic Message: Exception {}", e); throw e; } finally { try { if (session != null) { session.close(); } if (connection != null) { connection.close(); } } catch (JMSException e) { LOGGER.error("JMSException occured while closing session {}", e); throw e; } } } }
i am injecting it here
HealthyHeartScoreBatchProcessor.java
@Statelesspublic class HealthyHeartScoreBatchProcessor { private static final Logger LOGGER = LoggerFactory .getLogger(HealthyHeartScoreBatchProcessor.class); @Inject private HealthyHeartScoreUtils healthyHeartScoreUtils; @Inject private AgeUtils ageUtils; @Inject private JMSMessageProcessService messageProvider; @Inject private HealthyHeartScoreDAO healthyHeartScoreDao; @Inject private HealthyHeartScoreOdmWrapper healthyHeartScoreOdmWrapper;
bean.xml is empty
i would really appriciate some help.