You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: