Skip Menu |

This queue is for tickets about the jmx4perl CPAN distribution.

Report information
The Basics
Id: 46345
Status: resolved
Priority: 0/
Queue: jmx4perl

People
Owner: roland [...] cpan.org
Requestors: jajohnso [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: MBean retrieval fails due to path-like structure
I'm attaching some files to this ticket. The first is jmx_results.txt. This file shows all the ouput from running this agent URL with the formatted_list option on request: http://{path to agent}/j4p-agent/list/WebSphere/ Based on the output, let's say I want to get the thread pool information for a particular JVM. Here's the MBean for that section: cell=ubuntu64Cell01,mbeanIdentifier=cells/ubuntu64Cell01/nodes/ubuntu64Node01/servers/perfdata/server.xml#ThreadPool_1242503522873,name=ORB.thread.pool,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=ThreadPool,version=6.1.0.23 As you can see, the mbeanIdentifier is listed in a path type format. This completely messes up retrieval. I've also attached the stacktrace called jmx_results-stacktrace.txt. I've tried using quotes, brackets, slashes, everything to make the request take the mbeanIdentifier's path slashes, but nothing is working. I can only access a WebSphere mbeanIdentifier that does not contain a path-like structure and not many of them do. Any ideas?
Subject: jmx_results.txt

Message body is not shown because it is too large.

Subject: jmx_results-stacktrace.txt
{"stacktrace":"java.lang.IllegalArgumentException: Map key cell=ubuntu64Cell01,mbeanIdentifier=cells is unknown for map {J2EEName=j4p-agent,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=J2EEApplication,mbeanIdentifier=cells\/ubuntu64Cell01\/applications\/j4p-agent.ear\/deployments\/j4p-agent\/deployment.xml#ApplicationDeployment_1243085047669,name=j4p-agent,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=J2EEApplication,version=6.1.0.23={op={isStatisticsProvider={args=[], desc= ...\n\tat org.cpan.jmx4perl.converter.MapHandler.handle(Unknown Source)\n\tat org.cpan.jmx4perl.converter.AttributeToJsonConverter.prepareForJson(Unknown Source)\n\tat org.cpan.jmx4perl.converter.MapHandler.handle(Unknown Source)\n\tat org.cpan.jmx4perl.converter.AttributeToJsonConverter.prepareForJson(Unknown Source)\n\tat org.cpan.jmx4perl.converter.AttributeToJsonConverter.convertToJson(Unknown Source)\n\tat org.cpan.jmx4perl.AgentServlet.handle(Unknown Source)\n\tat org.cpan.jmx4perl.AgentServlet.doGet(Unknown Source)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:743)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:856)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1143)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:591)\n\tat com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)\n\tat com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3453)\n\tat com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)\n\tat com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)\n\tat com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)\n\tat com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)\n\tat com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)\n\tat com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)\n\tat com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)\n\tat com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)\n\tat com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)\n\tat com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)\n\tat com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)\n\tat com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)\n\tat com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)\n\tat com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)\n\tat com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)\n\tat com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)\n\tat com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)\n","error":"java.lang.IllegalArgumentException: Map key cell=ubuntu64Cell01,mbeanIdentifier=cells is unknown for map {J2EEName=j4p-agent,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=J2EEApplication,mbeanIdentifier=cells\/ubuntu64Cell01\/applications\/j4p-agent.ear\/deployments\/j4p-agent\/deployment.xml#ApplicationDeployment_1243085047669,name=j4p-agent,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=J2EEApplication,version=6.1.0.23={op={isStatisticsProvider={args=[], desc= ...","status":400}
I just uploaded Version 0.15_1, which should support escaping of slashes properly. You can use the Jmx4Perl Module transparently. More details are described in JMX::Jmx4Perl::Agent::Protocol In addition (as part of the regular evolution of Jmx4Perl), 'aliasing' and server autodection for attributes has been started. Not yet finished, but it will be for the final 0.15 release. It might take some time until the release shows up on search.cpan.org, but you can download it directly from http://cpan.cpantesters.org/authors/id/R/RO/ROLAND/ Could you please check, whether this works for you ? You need to redeploy the war, though, it has been changed.
Sorry, some debug output was left in the latest developer release 0.15_1. The next (0.15_2, tomorrow) will have this removed.
I've got the new module and WAR installed and the problem still exists in the browser. I'm trying some different ways. The http method I sent in originally still doesn't work, but the debug is helpful - it allowed me to try this URL: http://ubuntu64/j4p-agent/list/WebSphere/J2EEName=j4p-agent,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=J2EEApplication,mbeanIdentifier=cells/-/ubuntu64Cell01/-/applications/-/j4p-agent.ear/-/deployments/-/j4p-agent/-/deployment.xml#ApplicationDeployment_1243085047669,name=j4p-agent,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=J2EEApplication,version=6.1.0.23/ Still no joy but at least the error shows the escaped path. I'm attaching the latest stacktrace ... is there a preferred method of escaping? Can you provide a small URL example that I can try? The more I look at it though I think it's the # sign that needs to be permitted to be escaped as well. The entire URL isn't showing up in the stacktrace. And definitly keep the debug available as an option. Thanks! On Mon May 25 11:53:07 2009, ROLAND wrote: Show quoted text
> I just uploaded Version 0.15_1, which should support escaping of slashes > properly. You can use the Jmx4Perl Module transparently. More details > are described in JMX::Jmx4Perl::Agent::Protocol > > In addition (as part of the regular evolution of Jmx4Perl), 'aliasing' > and server autodection for attributes has been started. Not yet > finished, but it will be for the final 0.15 release. > > It might take some time until the release shows up on search.cpan.org, > but you can download it directly from > http://cpan.cpantesters.org/authors/id/R/RO/ROLAND/ > > Could you please check, whether this works for you ? You need to > redeploy the war, though, it has been changed.
{"stacktrace":"java.lang.IllegalArgumentException: Map key J2EEName=j4p-agent,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=J2EEApplication,mbeanIdentifier=cells\/ubuntu64Cell01\/applications\/j4p-agent.ear\/deployments\/j4p-agent\/deployment.xml is unknown for map {J2EEName=j4p-agent,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=J2EEApplication,mbeanIdentifier=cells\/ubuntu64Cell01\/applications\/j4p-agent.ear\/deployments\/j4p-agent\/deployment.xml#ApplicationDeployment_1243085047669,name=j4p-agent,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=J2EEApplication,version=6.1.0.23={op={isStatisticsProvider={args=[], desc= ...\n\tat org.cpan.jmx4perl.converter.MapHandler.handle(Unknown Source)\n\tat org.cpan.jmx4perl.converter.AttributeToJsonConverter.prepareForJson(Unknown Source)\n\tat org.cpan.jmx4perl.converter.MapHandler.handle(Unknown Source)\n\tat org.cpan.jmx4perl.converter.AttributeToJsonConverter.prepareForJson(Unknown Source)\n\tat org.cpan.jmx4perl.converter.AttributeToJsonConverter.convertToJson(Unknown Source)\n\tat org.cpan.jmx4perl.AgentServlet.handle(Unknown Source)\n\tat org.cpan.jmx4perl.AgentServlet.doGet(Unknown Source)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:743)\n\tat javax.servlet.http.HttpServlet.service(HttpServlet.java:856)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1143)\n\tat com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:591)\n\tat com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481)\n\tat com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:90)\n\tat com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:748)\n\tat com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)\n\tat com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)\n\tat com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)\n\tat com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)\n\tat com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)\n\tat com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)\n\tat com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)\n\tat com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)\n\tat com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)\n\tat com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)\n\tat com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)\n\tat com.ibm.io.async.ResultHandler.complete(ResultHandler.java:196)\n\tat com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:751)\n\tat com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:881)\n\tat com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)\n","error":"java.lang.IllegalArgumentException: Map key J2EEName=j4p-agent,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=J2EEApplication,mbeanIdentifier=cells\/ubuntu64Cell01\/applications\/j4p-agent.ear\/deployments\/j4p-agent\/deployment.xml is unknown for map {J2EEName=j4p-agent,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=J2EEApplication,mbeanIdentifier=cells\/ubuntu64Cell01\/applications\/j4p-agent.ear\/deployments\/j4p-agent\/deployment.xml#ApplicationDeployment_1243085047669,name=j4p-agent,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=J2EEApplication,version=6.1.0.23={op={isStatisticsProvider={args=[], desc= ...","status":400}
I just checked the perldoc, looks like I'm escaping properly. But it's the # that's causing me problems. Isn't WAS swell? :P On Mon May 25 12:33:15 2009, jimjohnson wrote: Show quoted text
> I've got the new module and WAR installed and the problem still exists > in the browser. I'm trying some different ways. The http method I > sent > in originally still doesn't work, but the debug is helpful - it > allowed > me to try this URL: > > http://ubuntu64/j4p-agent/list/WebSphere/J2EEName=j4p- >
agent,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=J2EEApplication,mbeanIdentifier=cells/- Show quoted text
> /ubuntu64Cell01/-/applications/-/j4p-agent.ear/-/deployments/-/j4p- > agent/- > /deployment.xml#ApplicationDeployment_1243085047669,name=j4p- >
agent,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=J2EEApplication,version=6.1.0.23/ Show quoted text
> > Still no joy but at least the error shows the escaped path. I'm > attaching the latest stacktrace ... is there a preferred method of > escaping? Can you provide a small URL example that I can try? The > more > I look at it though I think it's the # sign that needs to be permitted > to be escaped as well. The entire URL isn't showing up in the > stacktrace. > > And definitly keep the debug available as an option. Thanks! > > > On Mon May 25 11:53:07 2009, ROLAND wrote:
> > I just uploaded Version 0.15_1, which should support escaping of
> slashes
> > properly. You can use the Jmx4Perl Module transparently. More
> details
> > are described in JMX::Jmx4Perl::Agent::Protocol > > > > In addition (as part of the regular evolution of Jmx4Perl),
> 'aliasing'
> > and server autodection for attributes has been started. Not yet > > finished, but it will be for the final 0.15 release. > > > > It might take some time until the release shows up on
> search.cpan.org,
> > but you can download it directly from > > http://cpan.cpantesters.org/authors/id/R/RO/ROLAND/ > > > > Could you please check, whether this works for you ? You need to > > redeploy the war, though, it has been changed.
>
Well, you are probably right. Since # has a special meaning within URLs, too (it indicates an anchor), it needs to be escaped as well. I'll do this, though probably not before tomorrow evening (MEST ;-). I have the feeling, when we have won these dragon fights (others might call it 'challenges' ;-) against WAS, the jmx4perl REST protocol should be quite robust then. But I'm afraid it will still take some time ...
I just uploaded 0.15_2 The URL should be now URI encoded for the most critical characters (including #), its the default set of L<URI> *except* the slash char. The reason why we need a custom encoding for slashes (this '/-/' thingy) is because at least Tomcat/Jboss can't deal properly with URI encoded slashes in the pathinfo part of the serlvet url. It seems, it decodes too early so it messes up with the 'regular' slashes. The sympton is the following server error --> "HTTP/1.x 400 Invalid URI: noSlash " in the Tomcat logs. Could you please try this for WAS and your URLs ? It worked for me, but again, WAS is a different thing. Hopefully, we can now continue to the next challenge ... ;-)
Still having problems ... but progress is being made. The problem now is that I keep getting "Key properties cannot be empty" and from what I see, the key properties are not empty. Maybe I'm missing something obvious. Here's the mBean I'm looking at: Application=perfServletApp,J2EEApplication=perfServletApp,J2EEName=perfServletApp#perfServletApp.war,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=WebModule,mbeanIdentifier=null,name=perfServletApp.war,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=WebModule,version=6.1.0.23 The attribute I want is javaVersion. I'm attaching the script, the DataDump of the script and the mBean definition to see if there's still an outstanding issue or if I'm not putting things together right. Also, I think the URL issues are fixed for "read" in the script, but not for doing "list" directly in a web browser. But I may not be forming the "read" URL request properly. Still playing around with that. On Mon May 25 16:04:19 2009, ROLAND wrote: Show quoted text
> I just uploaded 0.15_2 > > The URL should be now URI encoded for the most critical characters > (including #), its the default set of L<URI> *except* the slash char. > The reason why we need a custom encoding for slashes (this '/-/' thingy) > is because at least Tomcat/Jboss can't deal properly with URI encoded > slashes in the pathinfo part of the serlvet url. It seems, it decodes > too early so it messes up with the 'regular' slashes. The sympton is the > following server error --> "HTTP/1.x 400 Invalid URI: noSlash > " in the Tomcat logs. > > Could you please try this for WAS and your URLs ? It worked for me, but > again, WAS is a different thing. > > Hopefully, we can now continue to the next challenge ... ;-)
$VAR1 = bless( { 'stacktrace' => 'java.lang.IllegalArgumentException: Invalid object name WebSphere:Application=perfServletApp,J2EEApplication=perfServletApp,J2EEName=perfServletApp#perfServletApp.war,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=WebModule,mbeanIdentifier=null,name=perfServletApp.war,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=WebModule,version=6.1.0.23: Key properties cannot be empty at org.cpan.jmx4perl.JmxRequest.<init>(Unknown Source) at org.cpan.jmx4perl.AgentServlet.handle(Unknown Source) at org.cpan.jmx4perl.AgentServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1143) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:591) at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:481) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3453) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture$1.run(AsyncChannelFuture.java:205) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473) Caused by: javax.management.MalformedObjectNameException: Key properties cannot be empty at javax.management.ObjectName.construct(ObjectName.java:408) at javax.management.ObjectName.<init>(ObjectName.java:1312) ... 22 more ', 'request' => bless( { 'attribute' => 'javaVersion', 'mbean' => 'WebSphere:Application=perfServletApp,J2EEApplication=perfServletApp,J2EEName=perfServletApp#perfServletApp.war,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=WebModule,mbeanIdentifier=null,name=perfServletApp.war,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=WebModule,version=6.1.0.23', 'path' => undef, 'type' => 'read' }, 'JMX::Jmx4Perl::Request' ), 'value' => undef, 'status' => 400, 'error' => 'java.lang.IllegalArgumentException: Invalid object name WebSphere:Application=perfServletApp,J2EEApplication=perfServletApp,J2EEName=perfServletApp#perfServletApp.war,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=WebModule,mbeanIdentifier=null,name=perfServletApp.war,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=WebModule,version=6.1.0.23: Key properties cannot be empty' }, 'JMX::Jmx4Perl::Response' ); Implementation Name:
#!/usr/bin/perl use strict; use JMX::Jmx4Perl; use JMX::Jmx4Perl::Response; use JMX::Jmx4Perl::Request; use JMX::Jmx4Perl::Agent; use Data::Dumper; my $mbean = "WebSphere:Application=perfServletApp,J2EEApplication=perfServletApp,J2EEName=perfServletApp#perfServletApp.war,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=WebModule,mbeanIdentifier=null,name=perfServletApp.war,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=WebModule,version=6.1.0.23"; my $attribute = "javaVersion"; my $jmx = new JMX::Jmx4Perl(url => "http://192.168.1.108/j4p-agent"); my $request = new JMX::Jmx4Perl::Request(READ_ATTRIBUTE,$mbean,$attribute); my $response = $jmx->request($request); print Dumper($response); print "Implementation Name: ",$response->value(),"\n";
Application=perfServletApp,J2EEApplication=perfServletApp,J2EEName=perfServletApp#perfServletApp.war,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=WebModule,mbeanIdentifier=null,name=perfServletApp.war,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=WebModule,version=6.1.0.23: Attributes: objectName java.lang.String [ro], "The object name of the managed object. The objectName attribute is of the type OBJECT_NAME which is a string that complies with the javax.management.ObjectName syntax. The objectName attribute is never null. The value of objectName is unique within the management domain. Management applications use this value to identify managed objects, for example identifying the source of events." javaVersion java.lang.String [ro], "version" classLoaderDepth int [ro], "Number of classloaders in this module's classloading hierarchy" javaVMs [Ljava.lang.String; [ro], "javaVMs" name java.lang.String [ro], "The name of the deployed object." servlets [Ljava.lang.String; [ro], "servlets" eventTypes [Ljava.lang.String; [ro], "A list of the types of events the managed object emits." javaVendor java.lang.String [ro], "vendor" deploymentDescriptor java.lang.String [ro], "The original XML DD." server java.lang.String [ro], "The J2EE server the application or module is deployed on." statisticsProvider boolean [ro], "Indicates if the managed object implements the StatisticsProvider model and supports the generation of performance statistics." eventProvider boolean [ro], "Indicates if the managed object implements the EventProvider model and provides notifications about events that occur on that object." stateManageable boolean [ro], "Indicates if the managed object implements the StateManageable model and supports state management." Operations: [Ljava.lang.String; getServlets() "getter for attribute servlets" [Ljava.lang.String; getJavaVMs() "getter for attribute javaVMs" boolean isStatisticsProvider() "getter for attribute statisticsProvider" java.lang.String getName() "getter for attribute name" int getClassLoaderDepth() "getter for attribute classLoaderDepth" boolean isStateManageable() "getter for attribute stateManageable" java.lang.String getObjectNameStr() "getter for attribute objectName" java.lang.String getJavaVendor() "getter for attribute javaVendor" boolean isEventProvider() "getter for attribute eventProvider" [Ljava.lang.String; getEventTypes() "getter for attribute eventTypes" java.lang.String getServer() "getter for attribute server" java.lang.String getDeploymentDescriptor() "getter for attribute deploymentDescriptor" java.lang.String getJavaVersion() "getter for attribute javaVersion" java.lang.String getClassLoaderInfo(int level,boolean atDepthOnly,boolean showClasses,boolean showCodeSource,boolean showDelegation,boolean showHierarchy,boolean showModules,boolean showDepth) "Information about classloaders for this module"
In fact, it seems we've taken the encoding hurdle. The current error is due to the fact, that WAS can't resolve the object name, which it gives out when asking the MBean meta data (which is used for 'list' mode). This is indeed strange, and we have to digg deeper into WAS, I'm afraid. What version of WAS are using ? I will try to get hands on an appropriate WAS installation here at our company. When you insert the URL manually, dont forget to escape # as '%23' But I will check the 'list' method as well (did this right now only for read so far). so, please stay tuned .... ;-)
6.1.0.23 It looks like I wasn't escaping the # properly when using "list" in the browser. The list requests look OK now. Through all the stacktraces and errors I sent last night I don't see %23 in any of the "read" requests. Maybe it still isn't picking it up? When I hardcode the escape in $mbean it doesn't work there either. Anything else I can send you this morning? I'll play around with this today and see what I can get out of it. Thanks ... On Tue May 26 03:17:55 2009, ROLAND wrote: Show quoted text
> In fact, it seems we've taken the encoding hurdle. The current error is > due to the fact, that WAS can't resolve the object name, which it gives > out when asking the MBean meta data (which is used for 'list' mode). > This is indeed strange, and we have to digg deeper into WAS, I'm afraid. > What version of WAS are using ? I will try to get hands on an > appropriate WAS installation here at our company. > > When you insert the URL manually, dont forget to escape # as '%23' But I > will check the 'list' method as well (did this right now only for read > so far). > > so, please stay tuned .... ;-)
So in the browser, this works fine: http://ubuntu64/j4p-agent/list/WebSphere/Application=perfServletApp,J2EEApplication=perfServletApp,J2EEName=perfServletApp%23perfServletApp.war,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=WebModule,mbeanIdentifier=null,name=perfServletApp.war,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=WebModule,version=6.1.0.23/attr/javaVersion/ This does not work: http://ubuntu64/j4p-agent/read/WebSphere:Application=perfServletApp,J2EEApplication=perfServletApp,J2EEName=perfServletApp%23perfServletApp.war,J2EEServer=perfdata,Server=perfdata,cell=ubuntu64Cell01,j2eeType=WebModule,mbeanIdentifier=null,name=perfServletApp.war,node=ubuntu64Node01,platform=dynamicproxy,process=perfdata,spec=1.0,type=WebModule,version=6.1.0.23/javaVersion/ Same error as I attached last night. Is the read request formed correctly? On Tue May 26 06:22:37 2009, jimjohnson wrote: Show quoted text
> 6.1.0.23 > > It looks like I wasn't escaping the # properly when using "list" in the > browser. The list requests look OK now. Through all the stacktraces > and errors I sent last night I don't see %23 in any of the "read" > requests. Maybe it still isn't picking it up? When I hardcode the > escape in $mbean it doesn't work there either. Anything else I can send > you this morning? I'll play around with this today and see what I can > get out of it. Thanks ... > > > On Tue May 26 03:17:55 2009, ROLAND wrote:
> > In fact, it seems we've taken the encoding hurdle. The current error is > > due to the fact, that WAS can't resolve the object name, which it gives > > out when asking the MBean meta data (which is used for 'list' mode). > > This is indeed strange, and we have to digg deeper into WAS, I'm afraid. > > What version of WAS are using ? I will try to get hands on an > > appropriate WAS installation here at our company. > > > > When you insert the URL manually, dont forget to escape # as '%23' But I > > will check the 'list' method as well (did this right now only for read > > so far). > > > > so, please stay tuned .... ;-)
>
That's interesting. In fact 'list' and 'read' use different ways to resolve an MBean's attribute. "list" reads in the whole list as a data structure into the memory (within the servlet), before it follows the path provided by traversing this structure itself. "read" instead really looks up the MBean and its attribute in the normal JMX way. It's during this lookup where WAS rejects the object name, though it looks good, even within the exception thrown. I.e. the key properties list is *not* empty. The URL you've sent looks perfectly valid, so I need to go deeper into WAS. Probably, I can access a WAS installation this evening (or tomorrow), so I will have a closer look then. In the meantime I will add additional debugging for the servlet as well as for the perl modules and make a new developer release.
Shame on me, I just found a silly bug (introduced yesterday) which causes this specific error. I will upload a fixed version 0.15_3 within the next hour. Good luck for the next hurdle ;-)
On Tue May 26 07:31:19 2009, ROLAND wrote: Show quoted text
> Shame on me, I just found a silly bug (introduced yesterday) which > causes this specific error. > > I will upload a fixed version 0.15_3 within the next hour. > > Good luck for the next hurdle ;-)
Awesome! Can't wait to try it out ...
I uploaded 0.15_3. Also, I added some debugging in the servlet (should appear on stdout or in some logging files) which will be disabled in the final 0.15 release.
Thanks Roland, works great! The sysout looks good and the data is coming through just fine through web browser and the script too. If I run into any other issues I'll let you know. - Jim On Tue May 26 07:59:14 2009, ROLAND wrote: Show quoted text
> I uploaded 0.15_3. Also, I added some debugging in the servlet (should > appear on stdout or in some logging files) which will be disabled in the > final 0.15 release.
Latest devel version: 0.15_3 resolves this and other related issues
Thanks a lot for your support and patience. If you have any other issue or some feature request, please let me know.