Menu

#23 Command Line Parsing

open
nobody
None
5
2010-11-04
2010-11-04
y2kendall
No

I'm trying to use the command line to query an MBean. My MBean has slashes in the name: LISTENKOFAX,process=IT2_server1,platform=proxy,node=JFS_IT2_ERICAPP_NO1,version=6.1.0.25,type=ListenerPort,mbeanIdentifier=cells/JFS_IT2_ERICAPP/nodes/JFS_IT2_ERICAPP_NO1/servers/IT2_server1/server.xml#ListenerPort_1250888342550,cell=JFS_IT2_ERICAPP,spec=1.0

When I try to query this MBean, it cuts off at the first slash, so then it gives an error that the Instance is not found. I know you can use a ~ for spaces, but what about for a slash? Please help!!

Discussion

  • Rakesh Kalra

    Rakesh Kalra - 2010-11-05

    Have you tried putting double quotes around the MBean name?

     
  • y2kendall

    y2kendall - 2010-11-05

    Yes, I've tried double quotes, single quote, tilda, backslash. I even tried using * as a wildcard since JMX accepts *. But JManage doesn't accept * and JManage seems to stop parsing once it see's the /.

     
  • y2kendall

    y2kendall - 2010-11-05

    I see that instead of a space, you use a ~. Could this be build to use ^ where there is a / and then the code replaces the ^'s with the / when it passes it to JMX? Would this work? And could someone assist?

     
  • y2kendall

    y2kendall - 2010-11-09

    I've turned on verbose logging and it seems like the initial input is being parsed correctly. However when it passes the MBean name to the jmx call, it is being truncated. I can't seem to find the code where this is happening. It works fine in the Web Gui, so there must be some difference between the Web and the Command line. If someone could help point me to the code where this is happening, I could change and rebuild. Any help would be greatly appreciated.

     

Log in to post a comment.