On Tuesday, May 14, 2013 4:57:59 PM UTC-4, Marc R. Hoffmann wrote:
> Hi, this problem typically occurs if you add the JaCoCo Java agent options twice to the command line. It also happens if you combine the Java agent with offline instrumentation. Best regards, -marc On 14.05.13 19:31,
kanc...@gmail.com wrote: > > Hi , > > I'm trying to set up jacoco agent on weblogic in Unix. So I have exported the Jacocoagent.jar at run time as a java_options when I run the startup.sh in weblogic.This is standalone jacoco set up I'm trying to with following Java_Options to test some webapplication which is hosted on weblogic > > -javaagent:/prd/products/jacoco/latest/jacocoagent.jar=output=tcpserver,port=8010,includes=com.jpmorgan.*,address=* > > I'm failing with the following issue. > > I have sucessfully configured the jacococ agent in weblogic/windows and generated reports. > I use the same jar file in the unix system too. > Weblogic uses JRockit java version rather Jdk. > Please helpt to get rid of this issue. > > > java.lang.instrument.IllegalClassFormatException: Error while instrumenting class com/sun/jmx/remote/internal/PRef. > at org.jacoco.agent.rt.internal_8fe5d47.CoverageTransformer.transform(CoverageTransformer.java:91) > at sun.instrument.TransformerManager.transform(TransformerManager.java:169) > at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365) > at java.lang.ClassLoader.defineClass1(Native Method) > at java.lang.ClassLoader.defineClass(ClassLoader.java:621) > at javax.management.remote.rmi.NoCallStackClassLoader.findClass(NoCallStackClassLoader.java:108) > at java.lang.ClassLoader.loadClass(ClassLoader.java:307) > at java.lang.ClassLoader.loadClass(ClassLoader.java:252) > at javax.management.remote.rmi.RMIConnector$1.run(RMIConnector.java:2065) > at javax.management.remote.rmi.RMIConnector.<clinit>(RMIConnector.java:2086) > at javax.management.remote.rmi.RMIConnectorServer.objectToBind(RMIConnectorServer.java:728) > at javax.management.remote.rmi.RMIConnectorServer.start(RMIConnectorServer.java:392) > at sun.management.jmxremote.ConnectorBootstrap.exportMBeanServer(ConnectorBootstrap.java:716) > at sun.management.jmxremote.ConnectorBootstrap.initialize(ConnectorBootstrap.java:396) > at sun.management.Agent.startAgent(Agent.java:127) > at sun.management.Agent.startAgent(Agent.java:239) > at bea.jrockit.management.server.Main.start0(Main.java:297) > at bea.jrockit.management.server.Main.access$000(Main.java:51) > at bea.jrockit.management.server.Main$2.run(Main.java:387) > at bea.jrockit.management.server.Main.start(Main.java:385) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at jrockit.management.AgentStarter.startAgent(AgentStarter.java:135) > Caused by: java.lang.IllegalStateException: Class com/sun/jmx/remote/internal/PRef is already instrumented. >
Thanks Marc.It helped and resolved.