Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine exception message when ProjectGenerationContext fails to refresh #973

Open
snicoll opened this issue Aug 6, 2019 · 0 comments
Open

Comments

@snicoll
Copy link
Contributor

snicoll commented Aug 6, 2019

Depending on the contributors on the classpath, refresh of ProjectGenerationContext could fail because a required dependency is not registered. Right now we throw the low-level exception and could use a better handling of it.

Example:

Exception in thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultStarterContributor' defined in class path resource [io/spring/initializr/generator/spring/build/BuildProjectGenerationConfiguration.class]: Unsatisfied dependency expressed through method 'defaultStarterContributor' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'io.spring.initializr.metadata.InitializrMetadata' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:509)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant