Error creating bean while trying Gradle bootRun
Opened this issue · 4 comments
Deleted user commented
This is the stacktrace of my error. Is it related to the fact that I'm currently inside a proxied intranet?
PS C:\Users\mbresciani\Desktop\Spring\Guides\Using WebSocket to build an interactive web application> & 'C:\Program File
s (x86)\gradle-2.0\bin\gradle.bat' bootRun --stacktrace
:compileJava UP-TO-DATE
:processResources
:classes
:findMainClass
:bootRun
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.1.5.RELEASE)
2014-08-28 13:58:35.259 INFO 5876 --- [ main] hello.Application : Starting Application
on L-IT-05839 with PID 5876 (started by MBresciani in C:\Users\mbresciani\Desktop\Spring\Guides\Using WebSocket to buil
d an interactive web application)
2014-08-28 13:58:35.296 INFO 5876 --- [ main] ationConfigEmbeddedWebApplicationContext : Refreshing org.sprin
gframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@4963f7a1: startup date [Thu Aug 28 13:58:
35 CEST 2014]; root of context hierarchy
2014-08-28 13:58:35.936 INFO 5876 --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean defi
nition for bean 'beanNameViewResolver': replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; auto
wireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.boot.autoconfi
gure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration; factoryMethodName=beanNameViewResolver; initMethodN
ame=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfigure/web/Error
MvcAutoConfiguration$WhitelabelErrorViewConfiguration.class]] with [Root bean: class [null]; scope=; abstract=false; laz
yInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframewo
rk.boot.autoconfigure.web.WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter; factoryMethodName=beanNameViewResolver
; initMethodName=null; destroyMethodName=(inferred); defined in class path resource [org/springframework/boot/autoconfig
ure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]]
2014-08-28 13:58:36.794 INFO 5876 --- [ main] .t.TomcatEmbeddedServletContainerFactory : Server initialized w
ith port: 8080
2014-08-28 13:58:36.996 INFO 5876 --- [ main] o.apache.catalina.core.StandardService : Starting service Tom
cat
2014-08-28 13:58:36.997 INFO 5876 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Eng
ine: Apache Tomcat/7.0.54
2014-08-28 13:58:37.084 INFO 5876 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring
embedded WebApplicationContext
2014-08-28 13:58:37.084 INFO 5876 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationC
ontext: initialization completed in 1791 ms
2014-08-28 13:58:37.543 INFO 5876 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'di
spatcherServlet' to [/]
2014-08-28 13:58:37.546 INFO 5876 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'hid
denHttpMethodFilter' to: [/*]
2014-08-28 13:58:37.749 INFO 5876 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing Executo
rService 'clientInboundChannelExecutor'
2014-08-28 13:58:37.758 INFO 5876 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing Executo
rService 'clientOutboundChannelExecutor'
2014-08-28 13:58:37.776 INFO 5876 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing Executo
rService 'messageBrokerSockJsTaskScheduler'
2014-08-28 13:58:37.779 INFO 5876 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down Execut
orService 'clientOutboundChannelExecutor'
2014-08-28 13:58:37.779 INFO 5876 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down Execut
orService 'clientInboundChannelExecutor'
2014-08-28 13:58:37.782 INFO 5876 --- [ main] o.apache.catalina.core.StandardService : Stopping service Tom
cat
2014-08-28 13:58:37.794 INFO 5876 --- [ main] .b.l.ClasspathLoggingApplicationListener : Application failed t
o start with classpath: [file:/C:/Users/mbresciani/Desktop/Spring/Guides/Using%20WebSocket%20to%20build%20an%20interacti
ve%20web%20application/src/main/resources/, file:/C:/Users/mbresciani/Desktop/Spring/Guides/Using%20WebSocket%20to%20bui
ld%20an%20interactive%20web%20application/build/classes/main/, file:/C:/Users/mbresciani/Desktop/Spring/Guides/Using%20W
ebSocket%20to%20build%20an%20interactive%20web%20application/build/resources/main/, file:/C:/Users/mbresciani/.m2/reposi
tory/org/springframework/boot/spring-boot-starter-websocket/1.1.5.RELEASE/spring-boot-starter-websocket-1.1.5.RELEASE.ja
r, file:/C:/Users/mbresciani/.m2/repository/org/springframework/spring-messaging/4.0.6.RELEASE/spring-messaging-4.0.6.RE
LEASE.jar, file:/C:/Users/mbresciani/.m2/repository/org/springframework/boot/spring-boot-starter/1.1.5.RELEASE/spring-bo
ot-starter-1.1.5.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/org/springframework/boot/spring-boot-starter-web/
1.1.5.RELEASE/spring-boot-starter-web-1.1.5.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/org/springframework/sp
ring-core/4.0.6.RELEASE/spring-core-4.0.6.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/org/springframework/spri
ng-websocket/4.0.6.RELEASE/spring-websocket-4.0.6.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/org/apache/tomca
t/embed/tomcat-embed-websocket/7.0.54/tomcat-embed-websocket-7.0.54.jar, file:/C:/Users/mbresciani/.m2/repository/org/sp
ringframework/spring-beans/4.0.6.RELEASE/spring-beans-4.0.6.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/org/sp
ringframework/spring-context/4.0.6.RELEASE/spring-context-4.0.6.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/or
g/springframework/boot/spring-boot/1.1.5.RELEASE/spring-boot-1.1.5.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository
/org/springframework/boot/spring-boot-autoconfigure/1.1.5.RELEASE/spring-boot-autoconfigure-1.1.5.RELEASE.jar, file:/C:/
Users/mb r
esciani/.m2/repository/org/springframework/boot/spring-boot-starter-logging/1.1.5.RELEASE/spring-boot-starter-logging-1.
1.5.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/org/yaml/snakeyaml/1.13/snakeyaml-1.13.jar, file:/C:/Users/mbr
esciani/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/1.1.5.RELEASE/spring-boot-starter-tomcat-1.1.
5.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.3.3/jackson-databi
nd-2.3.3.jar, file:/C:/Users/mbresciani/.m2/repository/org/hibernate/hibernate-validator/5.0.3.Final/hibernate-validator
-5.0.3.Final.jar, file:/C:/Users/mbresciani/.m2/repository/org/springframework/spring-web/4.0.6.RELEASE/spring-web-4.0.6
.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/org/springframework/spring-webmvc/4.0.6.RELEASE/spring-webmvc-4.0
.6.RELEASE.jar, file:/C:/Users/mbresciani/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar
, file:/C:/Users/mbresciani/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/7.0.54/tomcat-embed-core-7.0.54.jar
, file:/C:/Users/mbresciani/.m2/repository/org/springframework/spring-aop/4.0.6.RELEASE/spring-aop-4.0.6.RELEASE.jar, fi
le:/C:/Users/mbresciani/.m2/repository/org/springframework/spring-expression/4.0.6.RELEASE/spring-expression-4.0.6.RELEA
SE.jar, file:/C:/Users/mbresciani/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.7/jcl-over-slf4j-1.7.7.jar, file:/C:/Users
/mbresciani/.m2/repository/org/slf4j/jul-to-slf4j/1.7.7/jul-to-slf4j-1.7.7.jar, file:/C:/Users/mbresciani/.m2/repository
/org/slf4j/log4j-over-slf4j/1.7.7/log4j-over-slf4j-1.7.7.jar, file:/C:/Users/mbresciani/.m2/repository/ch/qos/logback/lo
gback-classic/1.1.2/logback-classic-1.1.2.jar, file:/C:/Users/mbresciani/.m2/repository/org/apache/tomcat/embed/tomcat-e
mbed-el/7.0.54/tomcat-embed-el-7.0.54.jar, file:/C:/Users/mbresciani/.m2/repository/org/apache/tomcat/embed/tomcat-embed
-logging-juli/7.0.54/tomcat-embed-logging-juli-7.0.54.jar, file:/C:/Users/mbresciani/.gradle/caches/modules-2/files-2.1/
com.fas t
erxml.jackson.core/jackson-annotations/2.3.0/f5e853a20b60758922453d56f9ae1e64af5cb3da/jackson-annotations-2.3.0.jar, fil
e:/C:/Users/mbresciani/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.3.3/jackson-core-2.3.3.jar, file:/C:/Use
rs/mbresciani/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar, file:/C:/Users/
mbresciani/.m2/repository/org/jboss/logging/jboss-logging/3.1.1.GA/jboss-logging-3.1.1.GA.jar, file:/C:/Users/mbresciani
/.m2/repository/com/fasterxml/classmate/1.0.0/classmate-1.0.0.jar, file:/C:/Users/mbresciani/.m2/repository/aopalliance/
aopalliance/1.0/aopalliance-1.0.jar, file:/C:/Users/mbresciani/.m2/repository/org/slf4j/slf4j-api/1.7.7/slf4j-api-1.7.7.
jar, file:/C:/Users/mbresciani/.m2/repository/ch/qos/logback/logback-core/1.1.2/logback-core-1.1.2.jar]
2014-08-28 13:58:37.795 INFO 5876 --- [ main] utoConfigurationReportLoggingInitializer :
Error starting ApplicationContext. To display the auto-configuration report enabled debug logging (start with --debug)
Exception in thread "main" 2014-08-28 13:58:37.804 ERROR 5876 --- [ main] o.s.boot.SpringApplication
: Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stompWebSocketHandlerMapping' de
fined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfigura
tion.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreExce
ption: Factory method [public org.springframework.web.servlet.HandlerMapping org.springframework.web.socket.config.annot
ation.WebSocketMessageBrokerConfigurationSupport.stompWebSocketHandlerMapping()] threw exception; nested exception is or
g.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageBrokerSockJsTaskScheduler'
defined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfigu
ration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.util.concurrent.S
cheduledThreadPoolExecutor.setRemoveOnCancelPolicy(Z)V
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'stompWebSocketHandlerMapping' de
fined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfigura
tion.class]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreExce
ption: Factory method [public org.springframework.web.servlet.HandlerMapping org.springframework.web.socket.config.annot
ation.WebSocketMessageBrokerConfigurationSupport.stompWebSocketHandlerMapping()] threw exception; nested exception is or
g.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageBrokerSockJsTaskScheduler'
defined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfigu
ration.class]: Invocation of
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:
597)
init method failed; nested exception is java.lang.NoSuchMethodError: java.util.concurrent.ScheduledThreadPoolExecutor.s
etRemoveOnCancelPolicy(Z)V
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(Ab
stractAutowireCapableBeanFactory.java:1094)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolv
er.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutow
ireCapableBeanFactory.java:989)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(Ab
stractAutowireCapableBeanFactory.java:1094)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
ableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapab
leBeanFactory.java:989)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
ableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegis
try.java:228)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegis
try.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.ja at org.springfra
mework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListable
BeanFactory.java:703)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListable
BeanFactory.java:703)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplic
ationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplic
ationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext
.java:120)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext
.java:120)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
at org.springframework.boot.SpringApplication.run(SpringApp at org.springframework.boot.SpringApplication.ru
n(SpringApplication.java:941)
n.java:952)
at hello.Application.main(Application.java:12)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.we
b.servlet.HandlerMapping org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport.sto
mpWebSocketHandlerMapping()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationExceptio
n: Error creating bean with name 'messageBrokerSockJsTaskScheduler' defined in class path resource [org/springframework/
web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfiguration.class]: Invocation of init method failed; nes
ted exception is java.lang.NoSuchMethodError: java.util.concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(Z
)V
at hello.Application.main(Application.java:12)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public org.springframework.we
b.servlet.HandlerMapping org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport.sto
mpWebSocketHandlerMapping()] threw exception; nested exception is org.springframework.beans.factory.BeanCreationExceptio
n: Error creating bean with name 'messageBrokerSockJsTaskScheduler' defined in class path resource [org/springframework/
web/socket/config/annotation/DelegatingWebSocketMessageBrokerConfiguration.class]: Invocation of init method failed; nes
ted exception is java.lang.NoSuchMethodError: java.util.concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(Z
)V
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy
.java:188)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy
.java:188)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolv
er.java:586)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolv
er.java:586)
... 17 more
... 17 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageBrokerSockJsTa
skScheduler' defined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketMessage
BrokerConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.util
.concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(Z)V C
aused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageBrokerSockJsTas
kScheduler' defined in class path resource [org/springframework/web/socket/config/annotation/DelegatingWebSocketMessageB
rokerConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.util.
concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(Z)V
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireC
apableBeanFactory.java:1553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireC
apableBeanFactory.java:1553)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
ableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCap
ableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:475)
at org.springframework.beans.factory.supptractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegis
try.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapab
leBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.ja at org.s
pringframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.
java:324)
at org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpr
ingCGLIB$$76f0ab75.messageBrokerSockJsTaskScheduler(<generated>)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegis
try.java:228)
at org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport.stompWebSocketHan
dlerMapping(WebSocketMessageBrokerConfigurationSupport.java:49)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpr
ingCGLIB$$76f0ab75.CGLIB$stompWebSocketHandlerMapping$7(<generated>)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpr
ingCGLIB$$76f0ab75$$FastClassBySpringCGLIB$$cef8b633.invoke(<generated>)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(Configurati
onClassEnhancer.java:324)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpr
ingCGLIB$$76f0ab75.messageBrokerSockJsTaskScheduler(<generated>)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassE
nhancer.java:312)
at org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpr
ingCGLIB$$76f0ab75.stompWebSocketHandlerMapping(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport.stompWebSocketHan
dlerMapping(WebSocketMessageBrokerConfigurationSupport.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpr
ingCGLIB$$76f0ab75.CGLIB$stompWebSocketHandlerMapping$7(<generated>)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpr
ingCGLIB$$76f0ab75$$FastClassBySpringCGLIB$$cef8b633.invoke(<generated>)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantia at org.springframework.c
glib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(Configurati
onClassEnhancer.java:312)
leInstantiationStrategy.java:166)
at org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration$$EnhancerBySpr
ingCGLIB$$76f0ab75.stompWebSocketHandlerMapping(<generated>)
... 18 common frames omitted
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Caused by: java.lang.NoSuchMethodError: java.util.concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(Z)V
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j at org.springframework.schedulin
g.concurrent.ThreadPoolTaskScheduler.initializeExecutor(ThreadPoolTaskScheduler.java:108)
at org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.initialize(ExecutorConfigurationSuppor
t.java:170)
at org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.afterPropertiesSet(ExecutorConfigurati
onSupport.java:157)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowi
reCapableBeanFactory.java:1612)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireC
apableBeanFactory.java:1549)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy
.java:166)
... 37 common frames omitted
... 18 more
Caused by: java.lang.NoSuchMethodError: java.util.concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy(Z)V
at org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler.initializeExecutor(ThreadPoolTaskScheduler.
java:108)
at org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.initialize(ExecutorConfigurationSuppor
t.java:170)
at org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.afterPropertiesSet(ExecutorConfigurati
onSupport.java:157)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowi
reCapableBeanFactory.java:1612)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireC
apableBeanFactory.java:1549)
... 37 more
:bootRun FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command 'C:\Program Files\Java\jdk1.6.0_21\bin\java.exe'' finished with non-zero exit value 1
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':bootRun'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.
java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46
)
at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskEx
ecuter.java:35)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:64)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExec
uter.java:42)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.j
ava:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.j
ava:43)
at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:296)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecut
or.java:79)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecut
or.java:63)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:
51)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:23)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:148)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:105)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:85)
at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter
.java:81)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:33)
at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:24)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:39)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:29)
at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:23
7)
at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:21
0)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:206)
at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
at org.gradle.launcher.Main.doAction(Main.java:33)
at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:54)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:35)
at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.6.0_21\bin\java.exe''
finished with non-zero exit value 1
at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:365
)
at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31)
at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:60)
at org.springframework.boot.gradle.run.BootRunTask.exec(BootRunTask.java:56)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(Anno
tationProcessingTaskFactory.java:218)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(Annota
tionProcessingTaskFactory.java:211)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(Annota
tionProcessingTaskFactory.java:200)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:570)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:553)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.j
ava:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.
java:61)
... 44 more
BUILD FAILED
Total time: 9.336 secs
rstoyanchev commented
Are you on JDK 1.6? You need to be on Java 1.7, it's also required for Tomcat's WebSocket support.
Deleted user commented
I noticed the version only after your comment. Actually, java -version
shows
PS C:\Users\mbresciani\Desktop\Spring\Guides\Building a Hypermedia-Driven RESTful Web Service> java -version
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)
I'll check Gradle to verify which version it uses. Probably I simply forgot to update JAVA_HOME.
Deleted user commented
Got it! It was just my old JAVA_HOME not updated, so Gradle used Java 6... sorry for the trouble.