{"id":1210,"date":"2013-05-31T10:18:57","date_gmt":"2013-05-31T15:18:57","guid":{"rendered":"http:\/\/alejandroayala.solmedia.ec\/?p=1210"},"modified":"2013-05-31T10:29:17","modified_gmt":"2013-05-31T15:29:17","slug":"error-al-consumir-web-service-netbeans-y-glassfish-cannot-start-jmx-connector","status":"publish","type":"post","link":"https:\/\/alejandroayala.solmedia.ec\/?p=1210","title":{"rendered":"Error al consumir Web Service, Netbeans y Glassfish: \u00abCannot start JMX connector\u00bb"},"content":{"rendered":"<p>Al tratar de correr un peque\u00f1o ejemplo web service con <a href=\"https:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\" target=\"_blank\">REST<\/a> para refrescar los conocimientos, me top\u00e9 con el problema de que no pod\u00eda conectar para consumir el servicio, usando <em>Netbeans<\/em> y <em>Glasfish<\/em> el <strong>server.log<\/strong> dec\u00eda lo siguiente:<\/p>\n<p><!--more--><\/p>\n<p>[text]<br \/>\n[#|2013-05-30T11:58:16.486-0500|WARNING|glassfish3.1.2|javax.enterprise.<br \/>\nsystem.jmx.org.glassfish.admin.mbeanserver|_ThreadID=18;<br \/>\n_ThreadName=Thread-2;|JMX007: Cannot start JMX connector<br \/>\nJmxConnector config: { name = system, Protocol = rmi_jrmp,<br \/>\nAddress = 0.0.0.0, Port = 8686, AcceptAll = false,<br \/>\nAuthRealmName = admin-realm,<\/p>\n<p>[\/text]<\/p>\n<p>Claramente se puede ver que el Conector JMX no puede iniciarse por que la direccion a la que est\u00e1 echo binding <strong>(Address = 0.0.0.0) no responde a la petici\u00f3n.<\/strong><\/p>\n<p>Para solucionar el problema hice lo siguiente:<\/p>\n<p><strong>Ingresar al Administrador de Consola, ir a:<\/strong><br \/>\nConfiguraciones &gt; server-config &gt; Servicio de Administracion(AdminService)<\/p>\n<p><strong>En la p\u00e1gina Editar Conector JMX(Edit JMX Connector) cambiar:<\/strong><\/p>\n<p>Direcci\u00f3n: 0.0.0.0<\/p>\n<p><strong>por:<\/strong><\/p>\n<p>Direcci\u00f3n: 127.0.0.1<\/p>\n<p><strong>Guardar los cambios y reiniciar el servidor.<\/strong><\/p>\n<p>Ahora para visularizar el consumo del servicio ir a:<\/p>\n<p>http:\/\/localhost:8080\/<strong>Context Path<\/strong>\/webresources\/<strong>path<\/strong><\/p>\n<p><strong>Donde:<\/strong><\/p>\n<p><strong>Context Path:<\/strong> Definido en el glassfish-web.xml<\/p>\n<p>[xml]&lt;context-root&gt;\/Context Path&lt;\/context-root&gt;[\/xml]<\/p>\n<p><strong>path:<\/strong> Definido en clase de recurso JAX-RS<\/p>\n<p>[java]<br \/>\n@Path(&quot;path&quot;)<br \/>\npublic class WSResource {<br \/>\n}<\/p>\n<p>[\/java]<\/p>\n<p>El asistente tambi\u00e9n me cre\u00f3 esta clase que completa URI del web service:<\/p>\n<p>[java]<br \/>\n@javax.ws.rs.ApplicationPath(&quot;webresources&quot;)<br \/>\npublic class ApplicationConfig extends Application {<\/p>\n<p>}<br \/>\n[\/java]<\/p>\n<p>Espero sea de utilidad. Hasta Ponto<\/p>\n<p><strong>Fuente:<\/strong> <a href=\"http:\/\/gtpdev.com\/devnotes\/?p=90\" target=\"_blank\">http:\/\/gtpdev.com\/devnotes\/?p=90<\/a><\/p>\n\n<div class=\"twitter-share\"><a href=\"https:\/\/twitter.com\/intent\/tweet?via=a1ejo_ayala\" class=\"twitter-share-button\" data-size=\"large\">Twittear<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Al tratar de correr un peque\u00f1o ejemplo web service con REST para refrescar los conocimientos, me top\u00e9 con el problema de que no pod\u00eda conectar para consumir el servicio, usando Netbeans y Glasfish el server.log dec\u00eda lo siguiente:<\/p>\n","protected":false},"author":1,"featured_media":1211,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false},"categories":[4],"tags":[221,308,312,506,116,311,62,309,507,310],"_links":{"self":[{"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=\/wp\/v2\/posts\/1210"}],"collection":[{"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1210"}],"version-history":[{"count":6,"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=\/wp\/v2\/posts\/1210\/revisions"}],"predecessor-version":[{"id":1217,"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=\/wp\/v2\/posts\/1210\/revisions\/1217"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=\/wp\/v2\/media\/1211"}],"wp:attachment":[{"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1210"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1210"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alejandroayala.solmedia.ec\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1210"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}