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
Incompatibility with Spring 6 - ClassNotFoundException: org.springframework.util.SocketUtils #826
Comments
Can you give me the full stacktrace please? Does this error only occur when port = 0 or always? |
It is happening for Can we replace SocketUtils with TestSocketUtils, refer spring-projects/spring-framework#29132. |
|
Also relevant for #759 |
The good news is that if you don't use |
What if we just copy the code from |
Any updates? I'm eager to help, but I'm not sure which solution would be best. On one hand, we could let the operating system choose the ephemeral port for us, but on the other hand, it's quite useful, especially during testing, when I know the port before the server is started. Therefore, I believe that @dsyer's proposed approach is the best. |
In combination with https://github.com/yidongnan/grpc-spring-boot-starter/issues/873 it looks like we have to change the way we assign the port. |
Starting the server first would mean a behaviour and/or API change - the least disruptive way would be to not try to return the actual physical port from #873 is essentially the main reason Spring withdrew its |
I'd prefer to copy the SocketUtils file first so that there are no compatibility issues at the moment, and then consider how to fix the issue in #873 later. |
SocketUtils class has been removed from Spring 6 (spring-projects/spring-framework#28054) which is still used in net.devh.boot.grpc.server.config.GrpcServerProperties class.
Is there any plan to replace SocketUtils?
Originally posted by @chaitanya87 in https://github.com/yidongnan/grpc-spring-boot-starter/issues/778#issuecomment-1396811385
The text was updated successfully, but these errors were encountered: