[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8046778 Better error messages when starting JMX agent via attach or jcmd
From:       Staffan Larsen <staffan.larsen () oracle ! com>
Date:       2014-06-18 7:00:23
Message-ID: 453C2A1C-370E-4683-B18B-F61B02491358 () oracle ! com
[Download RAW message or body]


On 18 jun 2014, at 04:11, David Holmes <david.holmes@oracle.com> wrote:

> On 18/06/2014 4:40 AM, Staffan Larsen wrote:
> > This change is still looking for a reviewer.
> 
> Looks okay. Though in general the error handling in that code still seems somewhat \
> lacking - there are places where exception chaining should be being used.

Thanks. Agree that it isn’t perfect.

/Staffan

> 
> David
> 
> > Thanks,
> > /Staffan
> > 
> > On 13 jun 2014, at 13:03, Staffan Larsen <staffan.larsen@oracle.com> wrote:
> > 
> > > 
> > > When starting the JMX agent via jcmd, the error messages you get are very \
> > > cryptic: 
> > > $ build/macosx-x86_64-normal-server-release/jdk/bin/jcmd Sleeper \
> > > ManagementAgent.start 9979:
> > > java.lang.RuntimeException: Invalid option specified
> > > 
> > > $ build/macosx-x86_64-normal-server-release/jdk/bin/jcmd Sleeper \
> > > ManagementAgent.start config.file=apa 10024:
> > > java.lang.RuntimeException: Config file not found
> > > 
> > > $ build/macosx-x86_64-normal-server-release/jdk/bin/jcmd Sleeper \
> > > ManagementAgent.start jmxremote.port=5000 9979:
> > > sun.management.AgentConfigurationError
> > > 
> > > 
> > > This is just because errors are note propagated correctly to the jcmd. With \
> > > some small changes the above can look like this: 
> > > $ build/macosx-x86_64-normal-server-release/jdk/bin/jcmd Sleeper \
> > > ManagementAgent.start 89673:
> > > java.lang.RuntimeException: Invalid com.sun.management.jmxremote.port number: \
> > > No port specified 
> > > $ build/macosx-x86_64-normal-server-release/jdk/bin/jcmd Sleeper \
> > > ManagementAgent.start config.file=apa 89673:
> > > java.lang.RuntimeException: Config file not found: apa
> > > 
> > > $ build/macosx-x86_64-normal-server-release/jdk/bin/jcmd Sleeper \
> > > ManagementAgent.start jmxremote.port=5000 89673:
> > > java.lang.RuntimeException: Password file not found: \
> > > /Users/staffan/mercurial/jdk9-hs-rt/build/macosx-x86_64-normal-server-release/jdk/lib/management/jmxremote.password
> > >  
> > > webrev: http://cr.openjdk.java.net/~sla/8046778/webrev.00/
> > > bug: https://bugs.openjdk.java.net/browse/JDK-8046778
> > > 
> > > Thanks,
> > > /Staffan
> > > 
> > 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic