Liberty Profile Jython automation – TypeError – javax.management.remote.JMXServiceURL() – 3rd arg can’t be coerced to int

转载自: http://www.themiddlewareshop.com/2016/03/24/liberty-profile-jython-automation-typeerror-javax-management-remote-jmxserviceurl-3rd-arg-cant-be-coerced-to-int/

When running a Jython script to control the state of an Application Deployed to a Standalone Liberty Profile server, we get the following error: TypeError: javax.management.remote.JMXServiceURL(): 3rd arg can't be coerced to int

The reason for this is the line of code in the Jython script that create a connection to the Liberty Server’s JMX interface (WebSphere:service=com.ibm.websphere.application.ApplicationMBean,name=*) is a string not an int i.e. the port number was passed as string not int

The code was changed from

to

 

posted @ 2016-09-17 00:44  lily_z  阅读(733)  评论(0编辑  收藏  举报