Closed GoogleCodeExporter closed 9 years ago
I've seen several reports of this kind lately. It could be a Javassist issue
actually and in that case we'll have to wait until the next version of
Javassist to be released and hope that they've fixed it. It would be of great
interest for us if you could try to run the code in PowerMock 1.3.9 with
Javassist 3.13 and see if it makes any difference? It could also be a problem
that MongoDB instantiates classes using reflection with a different
classloader. You could try to make use of the @PowerMockIgnore annotation to
see if you can get around it. For example try using
@PowerMockIgnore("javax.management.MBeanServer").
Original comment by johan.ha...@gmail.com
on 12 Sep 2010 at 2:51
should some one familiar with powermock and Javassist fix it? We all bocked at
this issue.
Thank you very much.
Original comment by yishi...@gmail.com
on 8 Oct 2010 at 3:09
Hmm I think I was a bit fast blaming Javassist. I think it must be an error in
the MockClassloader. Could you try using @PowerMockIgnore("javax.management.*")?
Original comment by johan.ha...@gmail.com
on 8 Oct 2010 at 5:42
I have found the same problem and [@PowerMockIgnore("javax.management.*")]
solves it.
Original comment by Cesar.Al...@gmail.com
on 28 Oct 2010 at 5:42
Thanks a lot for sharing!
Original comment by johan.ha...@gmail.com
on 28 Oct 2010 at 6:40
Original comment by johan.ha...@gmail.com
on 15 Nov 2010 at 7:48
Thanks, my problem is solved with @PowerMockIgnore("javax.management.*")
Original comment by ranjith1...@gmail.com
on 28 Sep 2012 at 4:49
Yeah. I also found that this worked to fix the same issue:
@PowerMockIgnore("javax.management.*").
Although note that in Scala, the syntax is slightly different for all of the
class annotations:
@RunWith(classOf[PowerMockRunner])
@PrepareForTest(Array(classOf[Broker]))
@PowerMockIgnore(Array("javax.management.*"))
Original comment by aram.ope...@gmail.com
on 1 Nov 2012 at 2:11
I have a similar problem. The difference for me is that it is causing an error
in a logback-classic class. The result is that my tests still run and pass, but
errors are reported.
`@PowerMockIgnore("javax.management.*")` with my other test class annotations
fixes it for me too!
I'll attach my error log in case it is helpful for anyone here.
Original comment by StatueOf...@gmail.com
on 14 Jan 2015 at 12:47
Attachments:
Is my error, from https://code.google.com/p/powermock/issues/detail?id=277#c9
A separate issue? Should I make a new ticket for it?
Original comment by StatueOf...@gmail.com
on 14 Jan 2015 at 1:06
Original issue reported on code.google.com by
kevin.ki...@gmail.com
on 3 Sep 2010 at 12:40Attachments: