RFR: JDK-8180709: java -javaagent:agent.jar with run-time that does not contain java.instrument prints confusing error
gary.adams at oracle.com
gary.adams at oracle.com
Mon Dec 18 21:14:05 UTC 2017
I can just the error message.
What would you like it to say?
"Module java.instrument may be missing"
On 12/18/17 4:09 PM, serguei.spitsyn at oracle.com wrote:
> Hi Gary,
>
> I have the same concern and like Chris's suggestion.
>
> The JMX case must be simpler as there is no need to load the agent
> library early at startup.
> So that it is possible to identify the module jdk.management.agent is
> absent in the image.
> I think, it happens in the java.lang.Module.Resolver.
>
> The instrument library is loaded early at startup when the Module
> system is not
> up yet, so we don't know if the module java.instrument is present or not.
> The instrument library can be not found because of other reasons.
>
> Other than that the fix looks okay to me.
>
> Thanks,
> Serguei
>
>
> On 12/18/17 11:39, Chris Plummer wrote:
>> Hi Gary,
>>
>> Overall looks good. There's one minor change you might wanted to
>> consider. It's possible the library failed to load for reasons other
>> than java.instrument not being included. I see the error output
>> already includes the error message from the failed dll_open() call,
>> so why not just suggest that it *may* be due to java.instrument
>> missing rather than implying that is known to be the reason why.
>>
>> thanks,
>>
>> Chris
>>
>> On 12/18/17 6:38 AM, Gary Adams wrote:
>>> Here's a simple fix to include additional information when the
>>> instrument library is
>>> missing from the jre and the command line requests -javaagent.
>>>
>>> Issue: https://bugs.openjdk.java.net/browse/JDK-8180709
>>> Webrev: http://cr.openjdk.java.net/~gadams/8180709/webrev.00/
>>>
>>>
>>
>>
>
More information about the serviceability-dev
mailing list