-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
Fail to register MBean with bean name containing invalid character #23608
Comments
The point of this issue that we need somehow quote non-standard names for MBeans. |
We have one more community request for the fix: spring-projects/spring-integration#3051 (comment). Any chances that quoting will make it into the core? Thanks for understanding. |
See the same problem reported in other our project: spring-projects/spring-integration-aws#197 |
A plus-one for this ticket: The out-of-the-box experience with Spring Integration in Boot is to blow up in a surprising manner (I didn't even realize that JMX MBeans were getting added in the first place, since I haven't included Actuator)! This is on a bare-bones Initializr project with tutorial inclusions of |
@artembilan I don't understand (yet) why you think a fix in framework is required. I've tried to reproduce the problem to see if this was an automated export by bean name or something but that doesn't seem to be the case. As for Quoting, this is used for an element of the object name, not the object name itself.
With all that said, even if we tried to clean the key, we'd change it behind the scenes which doesn't sound a good idea. Can we please get some clarification how we ended up in such a situation? |
Hi @snicoll ! Thank you for feedback. So, in Spring Integration we have our own
As you see, we do have all the required parts of an Object Name for MBean and we really quote some elements only.
Where that
However it fails again because that Another one from where that
We probably can rework the logic in Spring Integration in that bean name generation part, but why just not follow quoting recommendations from JMX spec where we encounter invalid characters? In the end, only what I'm asking as a fix here is this for the
Feel free to give more feedback! Thanks |
Thanks @artembilan. Can I get something I can run myself that reproduces this? I think it will be the most efficient as I am not sure I understood all the moving parts. Thanks! |
Right. So, here is pretty simple unit test against just
The stack trace is similar to what was reported before:
According to this doc from Oracle, they recommend to always quote
|
Thanks for the sample @artembilan! |
Issue originally posted spring-projects/spring-integration#3051
Hi all.
I have similar(I think) issues to spring-cloud-stream/#1497 when I try run application to listening mqtt broker.
Simple project with that issue and workaround: https://github.com/Stiuil06/demo-mqtt-listener
Im trying to run this code:
https://docs.spring.io/spring-integration/docs/5.2.0.BUILD-SNAPSHOT/reference/html/mqtt.html#configuring-with-the-java-dsl
Configuring with the Java DSL
for Configuring with Java Configuration everything works.
My stacktrace
My code
My main pom
pom for this module
The text was updated successfully, but these errors were encountered: