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

NPE when attempting to expose JaxWs Port Proxy via mbean exporter [SPR-7011] #11676

Closed
spring-projects-issues opened this issue Mar 19, 2010 · 1 comment
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Karl Palsson opened SPR-7011 and commented

Not critically important, but if you try and use the MBean exporter (org.springframework.jmx.export.MBeanExporter) to export a web services client (JaxWsPortProxyFactoryBean) then you get an NPE

MBeanExporter.adaptMBeanIfPossible() gets a null back from AopUtils.getTargetClass(), (probably right?)
then JmxUtils.getMXBeanInterface() tries to find the superclass of a null class.

Probably the getMXBeanInterface() should be made null safe?


Affects: 3.0.1

Referenced from: commits 296aa96

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

AopUtils.getTargetClass(...) is actually supposed to always return a non-null Class. I've made this null-proof along with related pieces of code in JmxUtils.

So the MBean export should work in your case as well now. This fix will be available in tonight's 3.0.2 snapshot already; give it an early try if you got the chance!

Juergen

@spring-projects-issues spring-projects-issues added type: bug A general bug in: core Issues in core modules (aop, beans, core, context, expression) labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0.2 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants