Spring web socket - Cannot locate BeanDefinitionParser for element [message-broker] -


i'm trying add spring-websocket dependency in spring web app.

i have added dependency in pom.xml:

<dependency>     <groupid>org.springframework</groupid>     <artifactid>spring-websocket</artifactid>     <version>4.2.4</version> </dependency> 

and have created xml configuration equivalent @enablewebsocketmessagebroker, indicated here:

http://docs.spring.io/spring/docs/current/spring-framework-reference/html/websocket.html#websocket-stomp-enable

so, have spring-socket-context.xml:

<beans xmlns="http://www.springframework.org/schema/beans"     xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"     xmlns:websocket="http://www.springframework.org/schema/websocket"     xsi:schemalocation="         http://www.springframework.org/schema/beans         http://www.springframework.org/schema/beans/spring-beans.xsd         http://www.springframework.org/schema/websocket         http://www.springframework.org/schema/websocket/spring-websocket.xsd">      <websocket:message-broker application-destination-prefix="/app">         <websocket:stomp-endpoint path="/mypath">             <websocket:sockjs/>         </websocket:stomp-endpoint>         <websocket:simple-broker prefix="/topic, /queue"/>     </websocket:message-broker>  </beans> 

when start web-app, have error:

[error] 2016-07-04 14:52:11,381 [] []  org.springframework.web.context.contextloader initwebapplicationcontext - context initialization failed org.springframework.beans.factory.parsing.beandefinitionparsingexception: configuration problem: cannot locate beandefinitionparser element [message-broker] 

how solve error?

thanks.

i experience same error you.

it turns out need spring-messaging jar in class path in order use websocket:message-broker in xml.

the error message not helpful @ all


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -