Skip to content

Application does not start due to two bean instances of org.springframework.plugin.core.PluginRegistry #966

Description

@rainer198

I am trying to upgrade my application from spring-hateoas-0.24.0 to 1.0.0.M1. However, it does not start because of the following exception:

org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.plugin.core.PluginRegistry<org.springframework.hateoas.server.LinkRelationProvider, java.lang.Class<?>>' available: expected single matching bean but found 2: entityLinksPluginRegistry,relProviderPluginRegistry
at org.springframework.beans.factory.config.DependencyDescriptor.resolveNotUnique(DependencyDescriptor.java:221)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1222)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164)
at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857)
at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
  • I have applied the migration script and beside some problems with the IanaLinkRelations I succeeded in making the project compile
  • Not using Spring Boot, I have an @Configuration class annotated with @EnableHypermediaSupport(type = { HypermediaType.HAL }). This is the only spring-hateoas related configuration I have. (I used to have a HalObjectMapperConfigurer which I deactivated when trying to make it runnable again, did not help)
  • spring-plugin-2.0.0.M1 is also on the classpath, so the solution mentioned in issue 731 does not really help here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions