Deploy issue in jBoss using Gradle

Hi,

I have built my project with dependencies using Gradle without any exception. I have tried to deploy the war file in my jBoss application server manually, but I have found below mentioned exception. In my project I have used external properties file, but I don’t know is it required to configure in “build.gradle” file. Could you please share me how to solve this also how to deploy the war file in jBoss via Gradle.

Exception:-
13:10:57,684 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/Test-1.0]] (MSC service thread 1-3) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘taskService’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.test.workflow.services.BaseTaskService.setBaseTaskManagement(com.test.workflow.engine.BaseTaskManagement); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘taskManagement’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.test.workflow.engine.BaseTaskManagement.setTaskClientFactory(com.test.workflow.engine.taskhandlers.TaskClientFactory); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘taskClientFactory’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.test.workflow.engine.taskhandlers.TaskClientFactory.setHornetQ(java.lang.String); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1106) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913) [spring-context-3.1.1.RELEASE.jar:]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464) [spring-context-3.1.1.RELEASE.jar:]
@

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284) [spring-web-3.1.1.RELEASE.jar:]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111) [spring-web-3.1.1.RELEASE.jar:]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [:1.7.0_45]
Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.test.workflow.services.BaseTaskService.setBaseTaskManagement(com.test.workflow.engine.BaseTaskManagement); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘taskManagement’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.test.workflow.engine.BaseTaskManagement.setTaskClientFactory(com.test.workflow.engine.taskhandlers.TaskClientFactory); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘taskClientFactory’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.test.workflow.engine.taskhandlers.TaskClientFactory.setHornetQ(java.lang.String); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) [spring-beans-3.1.1.RELEASE.jar:]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:284) [spring-beans-3.1.1.RELEASE.jar:]
… 21 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘taskManagement’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.test.workflow.engine.BaseTaskManagement.setTaskClientFactory(com.test.workflow.engine.taskhandlers.TaskClientFactory); nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘taskClientFactory’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.test.workflow.engine.taskhandlers.TaskClientFactory.setHornetQ(java.lang.String); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [java.lang.String] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:287) [spring-beans-3.1.1.RELEASE.jar:]

Reading the stacktrace helps :wink: I’m not a Spring expert, but it seems you are trying to inject some kind of configuration value that is missing.

This is not Gradle related, so I suggest you ask on a more Spring focused forum and include an example project that shows your problem. Otherwise people there will have trouble helping you, too.