<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
twiddle localhost jboss 6.0
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/dbhausen">David Bettenhausen</a> in <i>Beginner's Corner</i> - <a href="http://community.jboss.org/message/573200#573200">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;"> </div><div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">/var/jboss6/bin/twiddle.sh get "jboss.system:type=ServerInfo" </div><div> </div><p>I have an ant script that deploys my ear from eclipse to my remote server. This script works when I have jboss 5 running and fails when I have jboss 6   (jboss-6.0.0.20101110-CR1) running. The only change I make to the script is to change the jboss home directory.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></p><p><p style="padding: 0pt; margin: 0pt;"><p style="padding: 0pt; margin: 0pt;"><p style="padding: 0pt; margin: 0pt;">/var/jboss6/bin/twiddle.sh -q<strong> -s localhost</strong> invoke "jboss.system:service=MainDeployer" deploy "file:///home/websrc/ThirdEAR.ear"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></p><p style="padding: 0pt; margin: 0pt;">I execute this with an ant but I also tried it from the command line. Works fine with 5.1 but with 6.0 it fails with</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;"><p style="padding: 0pt; margin: 0pt;">  [sshexec] 11:37:47,800 ERROR [Twiddle] Exec failed</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] org.jboss.util.NestedRuntimeException: Service URL must start with service:jmx:; - nested throwable: (java.net.MalformedURLException: Service URL must start with service:jmx:)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:208)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:64)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at org.jboss.console.twiddle.command.MBeanServerCommand.queryMBeans(MBeanServerCommand.java:71)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at org.jboss.console.twiddle.command.InvokeCommand.execute(InvokeCommand.java:284)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:357)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] Caused by: java.net.MalformedURLException: Service URL must start with service:jmx:</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:143)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:308)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:318)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle.access$400(Twiddle.java:60)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:204)</p><p style="padding: 0pt; margin: 0pt;">  [sshexec] <span style="white-space: pre;"> </span>... 4 more</p></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;">As a test I tried this simpler command on both 5.1 and 6.0</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;"><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;">Either of these two command work when I have jboss 5.1 started.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;">/var/jboss5/bin/twiddle.sh get "jboss.system:type=ServerInfo"</p><p style="padding: 0pt; margin: 0pt;">/var/jboss5/bin/twiddle.sh <strong>-s localhost</strong> get "jboss.system:type=ServerInfo" </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;">This command works when jboss 6 is started: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;">/var/jboss6/bin/twiddle.sh get "jboss.system:type=ServerInfo" </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;">But this one with the <strong>-s localhost</strong> option:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;">/var/jboss6/bin/twiddle.sh -<strong>s localhost</strong> get "jboss.system:type=ServerInfo" </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;">fails with:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="padding: 0pt; margin: 0pt;">11:27:58,215 ERROR [Twiddle] Exec failed</p><p style="padding: 0pt; margin: 0pt;">org.jboss.util.NestedRuntimeException: Service URL must start with service:jmx:; - nested throwable: (java.net.MalformedURLException: Service URL must start with service:jmx:)</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:208)</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>at org.jboss.console.twiddle.command.MBeanServerCommand.getMBeanServer(MBeanServerCommand.java:64)</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>at org.jboss.console.twiddle.command.GetCommand.execute(GetCommand.java:149)</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle.main(Twiddle.java:357)</p><p style="padding: 0pt; margin: 0pt;">Caused by: java.net.MalformedURLException: Service URL must start with service:jmx:</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>at javax.management.remote.JMXServiceURL.<init>(JMXServiceURL.java:143)</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle.createMBeanServerConnection(Twiddle.java:308)</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle.connect(Twiddle.java:318)</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle.access$400(Twiddle.java:60)</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>at org.jboss.console.twiddle.Twiddle$1.getServer(Twiddle.java:204)</p><p style="padding: 0pt; margin: 0pt;"><span style="white-space: pre;"> </span>... 3 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></p><p style="padding: 0pt; margin: 0pt;">Obviously this is not a bug but something I am not understanding. If one of you could toss me a clue that would be great. Hope you had a nice Thanksgiving. Thanks.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><div> </div></p><div> </div><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/573200#573200">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>