Absent Member.
Absent Member.
1657 views

Enabling "Code Coverage Analysis" on a Java Web Application running under Linux. Error on startup: "Could not find agent library sctmcc on the library path..."

I am trying to enable Code Coverage Analysis, using the Java Code Analysis Agent, for my Java web application running under Jetty, on a Linux environment, which is 64 bit. The version of Java I am using is 1.6, and is also 64-bit.

The error I am getting when starting up Jetty, with code coverage analysis enabled, is:

Error occurred during initialization of VM
Could not find agent library sctmcc on the library path, with error: libsctmcc.so: cannot open shared object file: No such file or directory (Possible cause: architecture word width mismatch)

The working directory for my installation of Jetty is:

/opt/jetty/

As per instructions I found here, I put "libsctmcc.so" (and also "libstcmcc64.so") in /opt/jetty (i.e. the working directory for Jetty)

In my Jetty startup script, I included the following JVM switch:

-agentlib:sctmcc=19129,coveragetype="line",coveragepath={"/home/central1/app/APP-INF/lib/com.central1.app.jar"},name="My Java App"

I noticed the error message changes, when 'libstcmcc64.so" isn't in /opt/jetty. Specifically, the part "(Possible cause: architecture word width mismatch)", does NOT get outputted. That indicates to me that the library is indeed being found, contrary to what the error message is suggesting.

Environment Details:

Linux Kernel:

Linux quy 3.6.11-gentoo-r1 #1 SMP Mon Mar 4 19:04:56 PST 2013 x86_64 Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz GenuineIntel GNU/Linux

Java Version:

Java(TM) SE Runtime Environment (build 1.6.0_41-b02)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)

Jetty Version:

7.6.8.v20121106

0 Likes
1 Reply
Micro Focus Expert
Micro Focus Expert

Hi Quy,

This sort of issue would involve proper investigation by the support team so you should open a support incident so that we can properly investigate it.

Thanks

Michael

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.