org.springframework.beans.factory.UnsatisfiedDependencyException

Error creating bean with name 'org.springframework.orm.jpa.SharedEntityManagerCreator#2': Unsatisfied dependency expressed through method 'createSharedEntityManager' parameter 0: Could not convert argument value of type [com.sun.proxy.$Proxy138] to required type [javax.persistence.EntityManagerFactory]: Failed to convert value of type [com.sun.proxy.$Proxy138 implementing javax.jms.QueueConnectionFactory,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy] to required type [javax.persistence.EntityManagerFactory]; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.sun.proxy.$Proxy138 implementing javax.jms.QueueConnectionFactory,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy] to required type [javax.persistence.EntityManagerFactory]: no matching editors or conversion strategy found

Samebug tips2

Springboot auto-configuration is disabled when you try to use WebMvcConfigurerAdapter and @EnableWebMvc. If WebConfig is not of the essence, remove it and use SpringBoot auto-configuration.

If you want to keep using @EnableWebMvc annotation, you have to add the code on the first answer of this page: https://goo.gl/JoHTKU to your code

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web1306

  • via Spring JIRA by Abhishek Gupta, 9 months ago
    Error creating bean with name 'org.springframework.orm.jpa.SharedEntityManagerCreator#2': Unsatisfied dependency expressed through method 'createSharedEntityManager' parameter 0: Could not convert argument value of type [com.sun.proxy.$Proxy138] to
  • ,org.springframework.aop.framework.Advised' to required type 'com.xyz.LookupMethodBeanClass'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.sun.proxy.$Proxy94 implementing net.sf.cglib.proxy.Factory,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised] to required type [com.xyz.LookupMethodBeanClass]: no matching editors or conversion strategy found
  • via Stack Overflow by Unknown author, 1 year ago
    'org.springframework.messaging.simp.user.DefaultUserDestinationResolver' to required type 'org.springframework.messaging.SubscribableChannel'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.messaging.simp.user.DefaultUserDestinationResolver] to required type [org.springframework.messaging.SubscribableChannel]: no matching editors or conversion strategy found
  • Stack trace

    • org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.orm.jpa.SharedEntityManagerCreator#2': Unsatisfied dependency expressed through method 'createSharedEntityManager' parameter 0: Could not convert argument value of type [com.sun.proxy.$Proxy138] to required type [javax.persistence.EntityManagerFactory]: Failed to convert value of type [com.sun.proxy.$Proxy138 implementing javax.jms.QueueConnectionFactory,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy] to required type [javax.persistence.EntityManagerFactory]; nested exception is java.lang.IllegalStateException: Cannot convert value of type [com.sun.proxy.$Proxy138 implementing javax.jms.QueueConnectionFactory,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy] to required type [javax.persistence.EntityManagerFactory]: no matching editors or conversion strategy found at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:723) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:207) at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1214) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1120) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1049) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1019) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741) at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1143) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541) at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 8 months ago
    Unknown user
    Once, 10 months ago
    Unknown user
    Once, 11 months ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    42 more bugmates