JProfiler 7.0.1 反射导致 IllegalAccessException
我在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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.