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;








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?










share|improve this question





















  • 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

















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?










share|improve this question





















  • 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













0












0








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?










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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












  • 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












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
);



);













draft saved

draft discarded


















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.



















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?