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

WebSocketMessageBrokerConfigurer not found #25150

Closed
adnansenyurt opened this issue Feb 9, 2024 · 2 comments
Closed

WebSocketMessageBrokerConfigurer not found #25150

adnansenyurt opened this issue Feb 9, 2024 · 2 comments

Comments

@adnansenyurt
Copy link

Overview of the issue

Application is generated with default JHipster parameters and webscoket option. Running it gives the following compilation error:


...

[INFO] Compiling 75 source files with javac [debug target 17] to target/classes
[INFO] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketSecurityConfiguration.java: /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketSecurityConfiguration.java uses or overrides a deprecated API.
[INFO] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketSecurityConfiguration.java: Recompile with -Xlint:deprecation for details.
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] system modules path not set in conjunction with -source 17
[WARNING] unknown enum constant javax.annotation.meta.When.MAYBE
reason: class file for javax.annotation.meta.When not found
[INFO] 2 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketSecurityConfiguration.java:[10,8] cannot access org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer
class file for org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer not found
[ERROR] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketConfiguration.java:[9,49] package org.springframework.messaging.simp.config does not exist
[ERROR] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketConfiguration.java:[12,38] package org.springframework.web.socket does not exist
[ERROR] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketConfiguration.java:[14,45] package org.springframework.web.socket.server does not exist
[ERROR] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketConfiguration.java:[15,53] package org.springframework.web.socket.server.support does not exist
[ERROR] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketConfiguration.java:[20,48] cannot find symbol
symbol: class WebSocketMessageBrokerConfigurer
[ERROR] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketConfiguration.java:[19,2] cannot find symbol
symbol: class EnableWebSocketMessageBroker
[ERROR] /Users/adnansenyurt/Projects/jh/trials/websockets/src/main/java/com/adnans/websockets/config/WebsocketConfiguration.java:[31,40] cannot find symbol
symbol: class MessageBrokerRegistry
location: class com.adnans.websockets.config.WebsocketConfiguration

...

Motivation for or Use Case

I need a WebSockets client and server implementation

Reproduce the error
  • Create a new JHipster application with WebSockets option selected
  • compile it with ./mvnw
Related issues
Suggest a Fix
JHipster Version(s)

JHipster v8.1.0

JHipster configuration

{
"generator-jhipster": {
"applicationType": "monolith",
"authenticationType": "jwt",
"baseName": "websockets",
"buildTool": "maven",
"cacheProvider": "ehcache",
"clientFramework": "angular",
"clientTestFrameworks": [],
"clientTheme": "none",
"creationTimestamp": 1707463973650,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"devServerPort": 4200,
"enableGradleEnterprise": null,
"enableHibernateCache": true,
"enableSwaggerCodegen": false,
"enableTranslation": false,
"entities": [],
"feignClient": false,
"gradleEnterpriseHost": null,
"jhipsterVersion": "8.1.0",
"jwtSecretKey": "MWRiZjY1NmVlNzJhNzM1MTM0YjgzZWQxYzM5Yjc5YWFhMjBlMDBjNmRhYmM0ZTQzZWI2YmRkZTcyNTA3M2Q0ZWY5ZGUxMGQ3OTZjZGUxY2M0ZjNlZDBmOGZlMTJmNGRmYThiYmZhYjVhNDU4NWMxZTU3MzY2NWI0MTAzNDkyMjg=",
"messageBroker": false,
"microfrontend": null,
"microfrontends": [],
"nativeLanguage": "en",
"packageName": "com.adnans.websockets",
"prodDatabaseType": "postgresql",
"reactive": false,
"searchEngine": false,
"serverPort": null,
"serverSideOptions": [],
"serviceDiscoveryType": false,
"testFrameworks": [],
"websocket": false,
"withAdminUi": true
}
}

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System

MacOs, Chrome

  • [ x ] Checking this box is mandatory (this is just to show you read everything)
@qmonmert
Copy link
Contributor

qmonmert commented Feb 9, 2024

Not reproduced on the main branch

@mshima
Copy link
Member

mshima commented Feb 16, 2024

The sample doesn’t even have websocket enabled: "websocket": false,
Closing.

@mshima mshima closed this as completed Feb 16, 2024
@deepu105 deepu105 added this to the 8.2.0 milestone Mar 20, 2024
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

4 participants