Could not autowire field: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationExceptionInjection of autowired dependencies failed Caused by: org.springframework.beans.factory.BeanCreationException:Bean Creation exception, Injection of autowired dependency failedInjection of autowired dependencies failed, Could not autowire fieldInjection of autowired dependencies failed.Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appConfig': Injection of autowired dependencies failedError creating bean with name 'employeeController': Injection of autowired dependencies failedorg.springframework.beans.factory.BeanCreationException: Injection of autowired dependencies failed;autowire dependency exception ,Error creating bean, Injection of autowired dependencies failed, Could not autowire field
Given current technology, could TV display screens double as video camera sensors?
Can an Arcane Focus be embedded in one's body?
Proof that arithmetic series diverges
Why is "-ber" the suffix of the last four months of the year?
Expanding powers of expressions of the form ax+b
Are game port joystick button circuits more than plain switches? Is this one just faulty?
Rent contract say that pets are not allowed. Possible repercussions if bringing the pet anyway?
How is linear momentum conserved in case of a freely falling body?
What to look for in a spotting scope?
using resizegather inside tabular: how to remove extra vertical space above and below the equation?
Can an ISO file damage—or infect—the machine it's being burned on?
Semantic difference between regular and irregular 'backen'
Is one hour layover sufficient at Singapore Changi Airport (Indian citizen travelling from US to India)?
Talk interpreter
Gambler coin problem: fair coin and two-headed coin
Retroactively modifying humans for Earth?
Thought experiment and possible contradiction between electromagnetism and special relativity
Where does learning new skills fit into Agile?
Make utility using LINQ
Why is getting a PhD considered "financially irresponsible"?
What happened to the HDEV ISS Experiment? Is it over?
Expressing the act of drawing
Convergence of series of normally distributed random variables
Handling Disruptive Student on the Autism Spectrum
Could not autowire field: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException
Injection of autowired dependencies failed Caused by: org.springframework.beans.factory.BeanCreationException:Bean Creation exception, Injection of autowired dependency failedInjection of autowired dependencies failed, Could not autowire fieldInjection of autowired dependencies failed.Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'appConfig': Injection of autowired dependencies failedError creating bean with name 'employeeController': Injection of autowired dependencies failedorg.springframework.beans.factory.BeanCreationException: Injection of autowired dependencies failed;autowire dependency exception ,Error creating bean, Injection of autowired dependencies failed, Could not autowire field
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
After changing an XSD for a perfectly working webservice i came across this error. I changed a field from long to String and the class was generated in my resources folder by the plugin. After deploying the war file i get the error.
I added @Repository on the repository class and also @Component on the handler but i still get the error
Caused by: org.springframework.beans.factory.BeanCreationException: Could
not autowire field: private abc.def.Handler abc.def.endpoint.handler;
nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HandlerImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private abc.def.repository.ConfigRepository abc.def.handler.impl.HandlerImpl.repository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configRepository': Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
... 95 more
@Endpoint
public class GetEndPoint
/**
* The logger instance.
*/
private static final Logger LOGGER = LoggerFactory.getLogger(GetEndPoint.class);
/**
* The namespace uri property.
*/
private static final String NAMESPACE_URI = "http://aba.def/soap";
/**
* The ServiceHandler instance.
*/
@Autowired
private GetHandler handler;
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getRequest")
public
@ResponsePayload
GetResponse getQuery(@RequestPayload final GetRequest request)
if (request == null)
LOGGER.error("Null request object");
throw new IllegalArgumentException("request = null");
try
return handler.getQuery(request);
catch (final Exception exception)
LOGGER.error(String.format("UNHANDLED EXCEPTION: %s",
exception.getMessage()),
exception);
throw new RuntimeException(exception);
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder =
"id",
"working"
)
@XmlRootElement(name = "getProviderStatementResponse")
public class GetResponse {
@XmlElement(required = true)
protected String id; // changed this to String from long
protected boolean working;
// getters and setters
I need to deploy without error and query the and points. how can i get rid of this error?
java
add a comment |
After changing an XSD for a perfectly working webservice i came across this error. I changed a field from long to String and the class was generated in my resources folder by the plugin. After deploying the war file i get the error.
I added @Repository on the repository class and also @Component on the handler but i still get the error
Caused by: org.springframework.beans.factory.BeanCreationException: Could
not autowire field: private abc.def.Handler abc.def.endpoint.handler;
nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HandlerImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private abc.def.repository.ConfigRepository abc.def.handler.impl.HandlerImpl.repository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configRepository': Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
... 95 more
@Endpoint
public class GetEndPoint
/**
* The logger instance.
*/
private static final Logger LOGGER = LoggerFactory.getLogger(GetEndPoint.class);
/**
* The namespace uri property.
*/
private static final String NAMESPACE_URI = "http://aba.def/soap";
/**
* The ServiceHandler instance.
*/
@Autowired
private GetHandler handler;
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getRequest")
public
@ResponsePayload
GetResponse getQuery(@RequestPayload final GetRequest request)
if (request == null)
LOGGER.error("Null request object");
throw new IllegalArgumentException("request = null");
try
return handler.getQuery(request);
catch (final Exception exception)
LOGGER.error(String.format("UNHANDLED EXCEPTION: %s",
exception.getMessage()),
exception);
throw new RuntimeException(exception);
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder =
"id",
"working"
)
@XmlRootElement(name = "getProviderStatementResponse")
public class GetResponse {
@XmlElement(required = true)
protected String id; // changed this to String from long
protected boolean working;
// getters and setters
I need to deploy without error and query the and points. how can i get rid of this error?
java
1
java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation
: that means you're using incompatible versions of Spring jars.
– JB Nizet
Mar 27 at 20:07
@JB Nizet In my pom i am using spring-data-jpa 1.11.12.RELEASE and Springframework -4.0.6.Release. What should i change to for both to be compatible? I am confused because all i did was to change the XSD.
– Carol
Mar 27 at 20:16
The documentation of your version of spring-data-jpa (docs.spring.io/spring-data/jpa/docs/1.11.12.RELEASE/reference/…) says: require Spring Framework in version 4.3.17.RELEASE or better
– JB Nizet
Mar 27 at 20:57
add a comment |
After changing an XSD for a perfectly working webservice i came across this error. I changed a field from long to String and the class was generated in my resources folder by the plugin. After deploying the war file i get the error.
I added @Repository on the repository class and also @Component on the handler but i still get the error
Caused by: org.springframework.beans.factory.BeanCreationException: Could
not autowire field: private abc.def.Handler abc.def.endpoint.handler;
nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HandlerImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private abc.def.repository.ConfigRepository abc.def.handler.impl.HandlerImpl.repository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configRepository': Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
... 95 more
@Endpoint
public class GetEndPoint
/**
* The logger instance.
*/
private static final Logger LOGGER = LoggerFactory.getLogger(GetEndPoint.class);
/**
* The namespace uri property.
*/
private static final String NAMESPACE_URI = "http://aba.def/soap";
/**
* The ServiceHandler instance.
*/
@Autowired
private GetHandler handler;
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getRequest")
public
@ResponsePayload
GetResponse getQuery(@RequestPayload final GetRequest request)
if (request == null)
LOGGER.error("Null request object");
throw new IllegalArgumentException("request = null");
try
return handler.getQuery(request);
catch (final Exception exception)
LOGGER.error(String.format("UNHANDLED EXCEPTION: %s",
exception.getMessage()),
exception);
throw new RuntimeException(exception);
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder =
"id",
"working"
)
@XmlRootElement(name = "getProviderStatementResponse")
public class GetResponse {
@XmlElement(required = true)
protected String id; // changed this to String from long
protected boolean working;
// getters and setters
I need to deploy without error and query the and points. how can i get rid of this error?
java
After changing an XSD for a perfectly working webservice i came across this error. I changed a field from long to String and the class was generated in my resources folder by the plugin. After deploying the war file i get the error.
I added @Repository on the repository class and also @Component on the handler but i still get the error
Caused by: org.springframework.beans.factory.BeanCreationException: Could
not autowire field: private abc.def.Handler abc.def.endpoint.handler;
nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'HandlerImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private abc.def.repository.ConfigRepository abc.def.handler.impl.HandlerImpl.repository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'configRepository': Cannot resolve reference to bean 'jpaMappingContext' while setting bean property 'mappingContext'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Ljava/lang/annotation/Annotation;
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:508)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:289)
... 95 more
@Endpoint
public class GetEndPoint
/**
* The logger instance.
*/
private static final Logger LOGGER = LoggerFactory.getLogger(GetEndPoint.class);
/**
* The namespace uri property.
*/
private static final String NAMESPACE_URI = "http://aba.def/soap";
/**
* The ServiceHandler instance.
*/
@Autowired
private GetHandler handler;
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "getRequest")
public
@ResponsePayload
GetResponse getQuery(@RequestPayload final GetRequest request)
if (request == null)
LOGGER.error("Null request object");
throw new IllegalArgumentException("request = null");
try
return handler.getQuery(request);
catch (final Exception exception)
LOGGER.error(String.format("UNHANDLED EXCEPTION: %s",
exception.getMessage()),
exception);
throw new RuntimeException(exception);
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder =
"id",
"working"
)
@XmlRootElement(name = "getProviderStatementResponse")
public class GetResponse {
@XmlElement(required = true)
protected String id; // changed this to String from long
protected boolean working;
// getters and setters
I need to deploy without error and query the and points. how can i get rid of this error?
java
java
edited Mar 27 at 20:02
Carol
asked Mar 27 at 19:51
CarolCarol
165 bronze badges
165 bronze badges
1
java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation
: that means you're using incompatible versions of Spring jars.
– JB Nizet
Mar 27 at 20:07
@JB Nizet In my pom i am using spring-data-jpa 1.11.12.RELEASE and Springframework -4.0.6.Release. What should i change to for both to be compatible? I am confused because all i did was to change the XSD.
– Carol
Mar 27 at 20:16
The documentation of your version of spring-data-jpa (docs.spring.io/spring-data/jpa/docs/1.11.12.RELEASE/reference/…) says: require Spring Framework in version 4.3.17.RELEASE or better
– JB Nizet
Mar 27 at 20:57
add a comment |
1
java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation
: that means you're using incompatible versions of Spring jars.
– JB Nizet
Mar 27 at 20:07
@JB Nizet In my pom i am using spring-data-jpa 1.11.12.RELEASE and Springframework -4.0.6.Release. What should i change to for both to be compatible? I am confused because all i did was to change the XSD.
– Carol
Mar 27 at 20:16
The documentation of your version of spring-data-jpa (docs.spring.io/spring-data/jpa/docs/1.11.12.RELEASE/reference/…) says: require Spring Framework in version 4.3.17.RELEASE or better
– JB Nizet
Mar 27 at 20:57
1
1
java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation
: that means you're using incompatible versions of Spring jars.– JB Nizet
Mar 27 at 20:07
java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation
: that means you're using incompatible versions of Spring jars.– JB Nizet
Mar 27 at 20:07
@JB Nizet In my pom i am using spring-data-jpa 1.11.12.RELEASE and Springframework -4.0.6.Release. What should i change to for both to be compatible? I am confused because all i did was to change the XSD.
– Carol
Mar 27 at 20:16
@JB Nizet In my pom i am using spring-data-jpa 1.11.12.RELEASE and Springframework -4.0.6.Release. What should i change to for both to be compatible? I am confused because all i did was to change the XSD.
– Carol
Mar 27 at 20:16
The documentation of your version of spring-data-jpa (docs.spring.io/spring-data/jpa/docs/1.11.12.RELEASE/reference/…) says: require Spring Framework in version 4.3.17.RELEASE or better
– JB Nizet
Mar 27 at 20:57
The documentation of your version of spring-data-jpa (docs.spring.io/spring-data/jpa/docs/1.11.12.RELEASE/reference/…) says: require Spring Framework in version 4.3.17.RELEASE or better
– JB Nizet
Mar 27 at 20:57
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385403%2fcould-not-autowire-field-injection-of-autowired-dependencies-failed-nested-exc%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55385403%2fcould-not-autowire-field-injection-of-autowired-dependencies-failed-nested-exc%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation
: that means you're using incompatible versions of Spring jars.– JB Nizet
Mar 27 at 20:07
@JB Nizet In my pom i am using spring-data-jpa 1.11.12.RELEASE and Springframework -4.0.6.Release. What should i change to for both to be compatible? I am confused because all i did was to change the XSD.
– Carol
Mar 27 at 20:16
The documentation of your version of spring-data-jpa (docs.spring.io/spring-data/jpa/docs/1.11.12.RELEASE/reference/…) says: require Spring Framework in version 4.3.17.RELEASE or better
– JB Nizet
Mar 27 at 20:57