SPP
SPP

Reputation: 11

JProfiler 7.0.1 reflection causing IllegalAccessException

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]

Upvotes: 0

Views: 250

Answers (1)

SPP
SPP

Reputation: 11

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.

Upvotes: 1

Related Questions