Highlighted
Absent Member.
Absent Member.
257 views

Attaching Java Diagnostics to a Java 6 JRun instance causes "Could not find agent library"

Hi Guys,
I recently started using HP Diagnostics profiler for Java and it is working great on Weblogic 8 (Java 4) and Weblogic 10 (Java 6).

However - i simply cannot get it to start with a JRun server.

I have edited test_jvm.config as attached.

The error is as follows

"Error occurred during initialization of VM
Could not find agent library on the library path or in the local directory: instrument"

If i perform

"java -javaagent:/export/home/apache/mercury/DiagnosticsAgent/lib/probeagent.jar"

on ANY of my 3 installed JVM's the command succeeds and i can see the profiler starting.

It must be the way JRun forks the JVM process.

According to some posts i found - the error may mean that libinstrument.so is not on the LD_LIBRARY_PATH, but i added it and it made no difference. Also, thats a basic library that should be loaded by default.

No JRun forums contained any information that helped...

ANY help appreciated!
0 Likes
5 Replies
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Attaching Java Diagnostics to a Java 6 JRun instance causes "Could not find agent library"

What is the version of JRun you are using?
What is the version of JRE used by the JRun?
Did you instrument the JRE used by JRun?

Can you send me the startup script of JRun & Startup log file?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Attaching Java Diagnostics to a Java 6 JRun instance causes "Could not find agent library"

What is the version of JRun you are using?

Jrun 4.0 for Coldfusion 8

What is the version of JRE used by the JRun?

JDK 1.6.0_12

Did you instrument the JRE used by JRun?

Yes, using jreinstrument -i and -a

Can you send me the startup script of JRun & Startup log file?

The JVM config is attached to my original post. There is no log file for JRun because the JVM does not even begin to start.
0 Likes
Highlighted
Acclaimed Contributor.
Acclaimed Contributor.

Re: Attaching Java Diagnostics to a Java 6 JRun instance causes "Could not find agent library"

I'm suspecting this error, because of other arguments.

Check the instrumented JRE's classloader is available at Diagnostics\Classes
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Attaching Java Diagnostics to a Java 6 JRun instance causes "Could not find agent library"

Hi Madan,
Because this is a Java 6 JVM, it does not seem to put any classes into Diagnostics/Classes. The ClassLoader.class file only seems to appear when you instrument a Java 4 JVM.

The -Xbootclasspath style only seems to work with Java 4 JVM's.

Any other suggestions?
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: Attaching Java Diagnostics to a Java 6 JRun instance causes "Could not find agent library"

Also, just to note, this is running on Solaris 8/SPARC. It works absolutely fine on my JRun instance in Windows.
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.