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

No VaadinService bound to current thread #304

Open
Switcher05 opened this issue Mar 14, 2017 · 0 comments
Open

No VaadinService bound to current thread #304

Switcher05 opened this issue Mar 14, 2017 · 0 comments

Comments

@Switcher05
Copy link

Long story short I was having this issue when running a simple unit test:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'vaadinServiceFactory': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: No VaadinService bound to current thread Caused by: java.lang.IllegalStateException: No VaadinService bound to current thread at org.vaadin.spring.context.VaadinServiceFactory.getObject(VaadinServiceFactory.java:22) ~[vaadin-spring-ext-core-0.0.7.RELEASE.jar:na] at org.vaadin.spring.context.VaadinServiceFactory.getObject(VaadinServiceFactory.java:14) ~[vaadin-spring-ext-core-0.0.7.RELEASE.jar:na] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] ... 30 common frames omitted

After some research and some testing, if I remove vaadin-spring-addon-eventbus OR vaadin-spring-ext-boot from pom.xml, the test passes.

Another solution I found is vaadin/spring#79 (comment)

Importing the needed dependencies and adding TestExecutionListeners worked.
Used the tutorial to test it out: https://github.com/Switcher05/VaadinSpringBootTest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant