<!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="https://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;">
Can't connect remote to jboss as 6.1.0
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/micros">Anton Yanchev</a> in <i>Beginner's Corner</i> - <a href="https://community.jboss.org/message/755955#755955">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi Folks,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have installed jboss-6.1.0. Final</p><p>windows 2003 Server 32Bit</p><p>java 1.7</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I'm using SilkPerformer to add predifined data source and connect to Jboss server remotely and take a data.</p><p>from previous versions Jboss 4.0 and Jboss 5.0 has a xml file where a set configuration fields</p><p>that is xml file </p><p><?xml version="1.0" encoding="ISO-8859-1"?></p><p><AgentConfiguration Name="JBoss 6.x" DataSourceType="Base Configuration JBoss 6.x"></p><p>  <Host>lnz-jboss6</Host></p><p>  <Port>1090</Port></p><p>  <Protocol>jnp</Protocol></p><p>  <!--0 .. JSR160/RMI--></p><p>  <!--1 .. JSR160/IIOP--></p><p>  <!--2 .. JNDI--></p><p>  <!--3 .. JSR160/CORBALOC--></p><p>  <!--4 .. JSR160/RMIIIOP--></p><p>  <!--5 .. JSR160/PLAINRMI--></p><p>  <ConnectionMode>2</ConnectionMode></p><p>  <MEJBName>jmx/rmi/RMIAdaptor</MEJBName></p><p>  <UrlPostfix /></p><p>  <ContextFactory>org.jnp.interfaces.NamingContextFactory</ContextFactory></p><p>  <DefaultUser /></p><p>  <DefaultPassword /></p><p>  <TypePropertyString>j2eeType</TypePropertyString></p><p>  <IsJsr77>true</IsJsr77></p><p>  <JvmInfo></p><p>    <JvmHomePath RecommendedVendor="SUN" RecommendedMajorVersion="2" /></p><p>    <Classpath ClasspathRootDir="C:\jboss-6.1.0.Final"></p><p>      <Entry>.\common\lib\jboss-management.jar</Entry></p><p>      <Entry>.\client\jbossall-client.jar</Entry></p><p>            <Entry>.\lib\dom4j.jar</Entry></p><p>    </Classpath></p><p>    <AdditionalClasspath /></p><p>    <VmParameters /></p><p>  </JvmInfo></p><p></AgentConfiguration></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>That is my run.conf.bat file where i setup setings for enable remote conection</p><p>rem ### -*- batch file -*- ######################################################</p><p>rem #                                                                          ##</p><p>rem #  JBoss Bootstrap Script Configuration                                    ##</p><p>rem #                                                                          ##</p><p>rem #############################################################################</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span>rem # $Id: run.conf.bat 88820 2009-05-13 15:25:44Z </span><a class="jive-link-email-small" href="mailto:dimitris@jboss.org" target="_blank">dimitris@jboss.org</a><span> $</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem #</p><p>rem # This batch file is executed by run.bat to initialize the environment </p><p>rem # variables that run.bat uses. It is recommended to use this file to</p><p>rem # configure these variables, rather than modifying run.bat itself. </p><p>rem #</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>if not "x%JAVA_OPTS%" == "x" goto JAVA_OPTS_SET</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem #</p><p>rem # Specify the JBoss Profiler configuration file to load.</p><p>rem #</p><p>rem # Default is to not load a JBoss Profiler configuration file.</p><p>rem #</p><p>rem set "PROFILER=%JBOSS_HOME%\bin\jboss-profiler.properties"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem #</p><p>rem # Specify the location of the Java home directory (it is recommended that</p><p>rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as</p><p>rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below).</p><p>rem #</p><p>rem set "JAVA_HOME=C:\opt\jdk1.6.0_13"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem #</p><p>rem # Specify the exact Java VM executable to use - only used if JAVA_HOME is</p><p>rem # not set. Default is "java".</p><p>rem #</p><p>rem set "JAVA=C:\opt\jdk1.6.0_13\bin\java"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem #</p><p>rem # Specify options to pass to the Java VM. Note, there are some additional</p><p>rem # options that are always passed by run.bat.</p><p>rem #</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem # JVM memory allocation pool parameters - modify as appropriate.</p><p>set "JAVA_OPTS=-Xms128M -Xmx512M -XX:MaxPermSize=256M"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem # Reduce the RMI GCs to once per hour for Sun JVMs.</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem # Warn when resolving remote XML DTDs or schemas.</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem # Sample JPDA settings for remote socket debugging</p><p>rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>rem # Sample JPDA settings for shared memory debugging </p><p>rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote"</p><p>rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9999"</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.authenticate=true"</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.ssl=false"</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=lnz-jboss6"</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file="c:\jmxremote\jmxremote.password""</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file="c:\jmxremote\jmxremote.access""</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p># Use the JBoss MBeanServerBuilder</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Djboss.platform.mbeanserver"</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>#Use the jboss logmanager</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>set JBOSS_CLASSPATH="C:\jboss-6.1.0.Final\lib\jboss-logmanager.jar"</p><p>rem set JBOSS_CLASSPATH="C:\jboss-6.1.0.Final\client\jbossall-client.jar"</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory"</p><p>set "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces"</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>:JAVA_OPTS_SET</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span>when i execute run.bat om boot.log doesn't have any error and when i open </span><a class="jive-link-external-small" href="http://" target="_blank">http://</a><span><host>:8080 it open correctlty jboss</span></p><p>also when i login throuhg jconsole service:jmx:rmi:///jndi/rmi://<host>:1090/jmxconnector it connect </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>but when i have tried to connect remotely it shows this error log </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>com.segue.monitoring.jmx.common.exception.RtException: Unable to connect</p><p>          at com.segue.monitoring.jmx.common.gui.swt.JMXSWTRunner.connect(JMXSWTRunner.java:312)</p><p>Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: </p><p>          java.rmi.RemoteException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory</p><p>javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]</p><p>          at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)</p><p>          at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)</p><p>          at javax.naming.InitialContext.init(Unknown Source)</p><p>          at javax.naming.InitialContext.<init>(Unknown Source)</p><p>          at com.segue.monitoring.jmx.common.runtime.DataSourceBase.createContext(DataSourceBase.java:41)</p><p>          at com.segue.monitoring.jmx.jboss.datasource.JBossDataSource.bootstrap(Unknown Source)</p><p>          at com.segue.monitoring.jmx.common.runtime.RemoteDataSourceBase.bootstrap(RemoteDataSourceBase.java:180)</p><p>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</p><p>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</p><p>          at java.lang.reflect.Method.invoke(Unknown Source)</p><p>          at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)</p><p>          at sun.rmi.transport.Transport$1.run(Unknown Source)</p><p>          at java.security.AccessController.doPrivileged(Native Method)</p><p>          at sun.rmi.transport.Transport.serviceCall(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)</p><p>          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)</p><p>          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</p><p>          at java.lang.Thread.run(Unknown Source)</p><p>Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory</p><p>          at java.net.URLClassLoader$1.run(Unknown Source)</p><p>          at java.security.AccessController.doPrivileged(Native Method)</p><p>          at java.net.URLClassLoader.findClass(Unknown Source)</p><p>          at java.lang.ClassLoader.loadClass(Unknown Source)</p><p>          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)</p><p>          at java.lang.ClassLoader.loadClass(Unknown Source)</p><p>          at java.lang.Class.forName0(Native Method)</p><p>          at java.lang.Class.forName(Unknown Source)</p><p>          at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)</p><p>          ... 21 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>          at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)</p><p>          at sun.rmi.transport.Transport$1.run(Unknown Source)</p><p>          at java.security.AccessController.doPrivileged(Native Method)</p><p>          at sun.rmi.transport.Transport.serviceCall(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)</p><p>          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)</p><p>          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</p><p>          at java.lang.Thread.run(Unknown Source)</p><p>          at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)</p><p>          at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)</p><p>          at sun.rmi.server.UnicastRef.invoke(Unknown Source)</p><p>          at com.segue.monitoring.jmx.jboss.datasource.RemoteDataSource_Stub.bootstrap(Unknown Source)</p><p>          at com.segue.monitoring.jmx.common.client.RemoteDataSourceClient.bootstrap(RemoteDataSourceClient.java:265)</p><p>          at com.segue.monitoring.jmx.common.gui.swt.JMXSWTRunner.connect(JMXSWTRunner.java:301)</p><p>Caused by: java.rmi.RemoteException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory</p><p>javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]</p><p>          at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)</p><p>          at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)</p><p>          at javax.naming.InitialContext.init(Unknown Source)</p><p>          at javax.naming.InitialContext.<init>(Unknown Source)</p><p>          at com.segue.monitoring.jmx.common.runtime.DataSourceBase.createContext(DataSourceBase.java:41)</p><p>          at com.segue.monitoring.jmx.jboss.datasource.JBossDataSource.bootstrap(Unknown Source)</p><p>          at com.segue.monitoring.jmx.common.runtime.RemoteDataSourceBase.bootstrap(RemoteDataSourceBase.java:180)</p><p>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</p><p>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</p><p>          at java.lang.reflect.Method.invoke(Unknown Source)</p><p>          at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)</p><p>          at sun.rmi.transport.Transport$1.run(Unknown Source)</p><p>          at java.security.AccessController.doPrivileged(Native Method)</p><p>          at sun.rmi.transport.Transport.serviceCall(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)</p><p>          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)</p><p>          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</p><p>          at java.lang.Thread.run(Unknown Source)</p><p>Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory</p><p>          at java.net.URLClassLoader$1.run(Unknown Source)</p><p>          at java.security.AccessController.doPrivileged(Native Method)</p><p>          at java.net.URLClassLoader.findClass(Unknown Source)</p><p>          at java.lang.ClassLoader.loadClass(Unknown Source)</p><p>          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)</p><p>          at java.lang.ClassLoader.loadClass(Unknown Source)</p><p>          at java.lang.Class.forName0(Native Method)</p><p>          at java.lang.Class.forName(Unknown Source)</p><p>          at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)</p><p>          ... 21 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>          at com.segue.monitoring.jmx.common.runtime.RemoteDataSourceBase.bootstrap(RemoteDataSourceBase.java:189)</p><p>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</p><p>          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</p><p>          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</p><p>          at java.lang.reflect.Method.invoke(Unknown Source)</p><p>          at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)</p><p>          at sun.rmi.transport.Transport$1.run(Unknown Source)</p><p>          at java.security.AccessController.doPrivileged(Native Method)</p><p>          at sun.rmi.transport.Transport.serviceCall(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)</p><p>          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)</p><p>          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)</p><p>          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</p><p>          at java.lang.Thread.run(Unknown Source)</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/755955#755955">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in Beginner's Corner at <a href="https://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>