Re: [rvm-research] using a java agent

Johannes Sinsel <[email protected]> Sun, 10 Mar 2019 15:23:17 +0100
Newsgroups gmane.comp.java.jikes.rvm.devel
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============2635834653719268788==
Content-Type: multipart/alternative;
 boundary="------------E91029AFFB5FD1CD3AFEFB3C"
Content-Language: en-US

This is a multi-part message in MIME format.
--------------E91029AFFB5FD1CD3AFEFB3C
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

Hey,

I wanted to add, the same problem (error-message) appears if I execute a 
class-file, for example:

    ./dist/prototype-opt_x86_64-linux/rvm
    -javaagent:agent.jar=frames2000 HelloWorld

The reverse order (class - agent) works.

Kind regards,
Johannes

On 04.03.19 11:15, Johannes Sinsel wrote:
>
> Hey,
>
> thanks a lot, it did work.
>
> Kind regards,
> Johannes Sinsel
>
> On 02.03.19 22:14, Erik Brangs wrote:
>> Hi,
>>
>> On 28.02.19 14:36, Johannes Sinsel wrote:
>>> Hey there,
>>>
>>> I have problems with the classloader using a java agent. On a single 
>>> class, everything works fine, but on a jar, I get the following 
>>> exception:
>>>
>>> Failed to run the agent's premain: fullpath.Agent not found in 
>>> SystemAppCL
>>> java.lang.ClassNotFoundException: fullpath.Agent not found in 
>>> SystemAppCL
>>>     at java.net.URLClassLoader.findClass(URLClassLoader.java:531)
>>>     at java.lang.ClassLoader.loadClass(ClassLoader.java:341)
>>>     at java.lang.ClassLoader.loadClass(ClassLoader.java:293)
>>>
>>>
>>> after executing:
>>>
>>> ./dist/prototype-opt_x86_64-linux/rvm 
>>> -javaagent:agent.jar=frames2000 -jar dacapo-2006-10.jar lusearch
>>>
>>> in the terminal (same exception with every other .jar file).
>>>
>>> If anyone got an idea, it will be very helpful.
>>
>> I think that's a bug.
>>
>> Does the attached patch fix the problem for you?
>>
>>
>> Kind regards,
>>
>> Erik Brangs
>>
>>
>> _______________________________________________
>> Jikesrvm-researchers mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers
>
>
> _______________________________________________
> Jikesrvm-researchers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

--------------E91029AFFB5FD1CD3AFEFB3C
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hey,</p>
    <p>I wanted to add, the same problem (error-message) appears if I
      execute a class-file, for example:</p>
    <blockquote>
      <p>./dist/prototype-opt_x86_64-linux/rvm
        -javaagent:agent.jar=frames2000 HelloWorld</p>
    </blockquote>
    <p>The reverse order (class - agent) works.</p>
    <p>Kind regards,<br>
      Johannes<br>
    </p>
    <div class="moz-cite-prefix">On 04.03.19 11:15, Johannes Sinsel
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p>Hey,</p>
      <p>thanks a lot, it did work.</p>
      <p>Kind regards,<br>
        Johannes Sinsel<br>
      </p>
      <div class="moz-cite-prefix">On 02.03.19 22:14, Erik Brangs wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:[email protected]">Hi, <br>
        <br>
        On 28.02.19 14:36, Johannes Sinsel wrote: <br>
        <blockquote type="cite">Hey there, <br>
          <br>
          I have problems with the classloader using a java agent. On a
          single class, everything works fine, but on a jar, I get the
          following exception: <br>
          <br>
          Failed to run the agent's premain: fullpath.Agent not found in
          SystemAppCL <br>
          java.lang.ClassNotFoundException: fullpath.Agent not found in
          SystemAppCL <br>
              at
          java.net.URLClassLoader.findClass(URLClassLoader.java:531) <br>
              at java.lang.ClassLoader.loadClass(ClassLoader.java:341) <br>
              at java.lang.ClassLoader.loadClass(ClassLoader.java:293) <br>
          <br>
          <br>
          after executing: <br>
          <br>
          ./dist/prototype-opt_x86_64-linux/rvm
          -javaagent:agent.jar=frames2000 -jar dacapo-2006-10.jar
          lusearch <br>
          <br>
          in the terminal (same exception with every other .jar file). <br>
          <br>
          If anyone got an idea, it will be very helpful. <br>
        </blockquote>
        <br>
        I think that's a bug. <br>
        <br>
        Does the attached patch fix the problem for you? <br>
        <br>
        <br>
        Kind regards, <br>
        <br>
        Erik Brangs <br>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <br>
        <fieldset class="mimeAttachmentHeader"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
Jikesrvm-researchers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]" moz-do-not-send="true">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers" moz-do-not-send="true">https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers</a>
</pre>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Jikesrvm-researchers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers">https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers</a>
</pre>
    </blockquote>
  </body>
</html>

--------------E91029AFFB5FD1CD3AFEFB3C--


--===============2635834653719268788==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============2635834653719268788==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Jikesrvm-researchers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jikesrvm-researchers

--===============2635834653719268788==--