JProfiler 7.0.1 反射导致 IllegalAccessException

发布于 2024-12-27 20:38:48 字数 1809 浏览 1 评论 0原文

我在 Tomcat Web 应用程序中使用 VMware jar 来收集 VM 信息。当从 IDEA 10.5 内部启动 JProfiler 时,一切都运行良好,直到我调用 VMware jar,然后我得到一个 IllegalAccessException

有没有办法阻止 JProfiler 查看 jar ?我在 com.vmware.vim25 上尝试了排除过滤器,但没有效果。

这是堆栈跟踪:

java.lang.IllegalAccessException: Class com.vmware.vim25.ws.XmlGen can not access a member of class java.lang.Object with modifiers "static transient"
    at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
    at java.lang.reflect.Field.doSecurityCheck(Field.java:960)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:896)
    at java.lang.reflect.Field.get(Field.java:358)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:696)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:633)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:707)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:633)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:584)
    at com.vmware.vim25.ws.WSClient.createSoapMessage(WSClient.java:219)
    at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:170)
    at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:124)
    at com.vmware.vim25.ws.VimStub.retrieveProperties(VimStub.java:77)
    at com.vmware.vim25.mo.PropertyCollector.retrieveProperties(PropertyCollector.java:107)
    at com.vmware.vim25.mo.ManagedObject.retrieveObjectProperties(ManagedObject.java:155)
    at com.vmware.vim25.mo.ManagedObject.getCurrentProperty(ManagedObject.java:179)
    at com.vmware.vim25.mo.ManagedObject.getManagedObjects(ManagedObject.java:221)
    at com.vmware.vim25.mo.ManagedObject.getManagedObjects(ManagedObject.java:268)
    at com.vmware.vim25.mo.ManagedObject.getVms(ManagedObject.java:298)
    at com.vmware.vim25.mo.Datastore.getVms(Datastore.java:81)

[snip]

I'm using a VMware jar in my Tomcat webapp to gather VM information. When launching JProfiler from inside IDEA 10.5 everything runs fine until I call into the VMware jar whereupon I get an IllegalAccessException.

Is there a way to prevent JProfiler from looking into the jar? I tried an exclusion filter on com.vmware.vim25 but that had no effect.

Here's the stack trace:

java.lang.IllegalAccessException: Class com.vmware.vim25.ws.XmlGen can not access a member of class java.lang.Object with modifiers "static transient"
    at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
    at java.lang.reflect.Field.doSecurityCheck(Field.java:960)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:896)
    at java.lang.reflect.Field.get(Field.java:358)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:696)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:633)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:707)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:633)
    at com.vmware.vim25.ws.XmlGen.toXML(XmlGen.java:584)
    at com.vmware.vim25.ws.WSClient.createSoapMessage(WSClient.java:219)
    at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:170)
    at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:124)
    at com.vmware.vim25.ws.VimStub.retrieveProperties(VimStub.java:77)
    at com.vmware.vim25.mo.PropertyCollector.retrieveProperties(PropertyCollector.java:107)
    at com.vmware.vim25.mo.ManagedObject.retrieveObjectProperties(ManagedObject.java:155)
    at com.vmware.vim25.mo.ManagedObject.getCurrentProperty(ManagedObject.java:179)
    at com.vmware.vim25.mo.ManagedObject.getManagedObjects(ManagedObject.java:221)
    at com.vmware.vim25.mo.ManagedObject.getManagedObjects(ManagedObject.java:268)
    at com.vmware.vim25.mo.ManagedObject.getVms(ManagedObject.java:298)
    at com.vmware.vim25.mo.Datastore.getVms(Datastore.java:81)

[snip]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只有一腔孤勇 2025-01-03 20:38:48

JProfiler 人员回复我并建议尝试 7.1 的预发布版本,因为他们改变了产品在该领域的工作方式。这个新版本确实解决了这个问题,所以我现在可以继续前进。

The JProfiler people got back to me and suggested trying a pre-release version of 7.1 as they've changed the way the product works in this area. This new version does indeed solve this problem so I'm now able to move forward.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文