[jboss-user] [Beginner's Corner] - Can't connect remote to jboss as 6.1.0

Anton Yanchev do-not-reply at jboss.com
Sat Aug 25 12:07:22 EDT 2012


Anton Yanchev [https://community.jboss.org/people/micros] created the discussion

"Can't connect remote to jboss as 6.1.0"

To view the discussion, visit: https://community.jboss.org/message/755955#755955

--------------------------------------------------------------
Hi Folks,

I have installed jboss-6.1.0. Final
windows 2003 Server 32Bit
java 1.7

I'm using SilkPerformer to add predifined data source and connect to Jboss server remotely and take a data.
from previous versions Jboss 4.0 and Jboss 5.0 has a xml file where a set configuration fields
that is xml file 
<?xml version="1.0" encoding="ISO-8859-1"?>
<AgentConfiguration Name="JBoss 6.x" DataSourceType="Base Configuration JBoss 6.x">
  <Host>lnz-jboss6</Host>
  <Port>1090</Port>
  <Protocol>jnp</Protocol>
  <!--0 .. JSR160/RMI-->
  <!--1 .. JSR160/IIOP-->
  <!--2 .. JNDI-->
  <!--3 .. JSR160/CORBALOC-->
  <!--4 .. JSR160/RMIIIOP-->
  <!--5 .. JSR160/PLAINRMI-->
  <ConnectionMode>2</ConnectionMode>
  <MEJBName>jmx/rmi/RMIAdaptor</MEJBName>
  <UrlPostfix />
  <ContextFactory>org.jnp.interfaces.NamingContextFactory</ContextFactory>
  <DefaultUser />
  <DefaultPassword />
  <TypePropertyString>j2eeType</TypePropertyString>
  <IsJsr77>true</IsJsr77>
  <JvmInfo>
    <JvmHomePath RecommendedVendor="SUN" RecommendedMajorVersion="2" />
    <Classpath ClasspathRootDir="C:\jboss-6.1.0.Final">
      <Entry>.\common\lib\jboss-management.jar</Entry>
      <Entry>.\client\jbossall-client.jar</Entry>
            <Entry>.\lib\dom4j.jar</Entry>
    </Classpath>
    <AdditionalClasspath />
    <VmParameters />
  </JvmInfo>
</AgentConfiguration>


That is my run.conf.bat file where i setup setings for enable remote conection
rem ### -*- batch file -*- ######################################################
rem #                                                                          ##
rem #  JBoss Bootstrap Script Configuration                                    ##
rem #                                                                          ##
rem #############################################################################


rem # $Id: run.conf.bat 88820 2009-05-13 15:25:44Z  mailto:dimitris at jboss.org dimitris at jboss.org $


rem #
rem # This batch file is executed by run.bat to initialize the environment 
rem # variables that run.bat uses. It is recommended to use this file to
rem # configure these variables, rather than modifying run.bat itself. 
rem #


if not "x%JAVA_OPTS%" == "x" goto JAVA_OPTS_SET


rem #
rem # Specify the JBoss Profiler configuration file to load.
rem #
rem # Default is to not load a JBoss Profiler configuration file.
rem #
rem set "PROFILER=%JBOSS_HOME%\bin\jboss-profiler.properties"


rem #
rem # Specify the location of the Java home directory (it is recommended that
rem # this always be set). If set, then "%JAVA_HOME%\bin\java" will be used as
rem # the Java VM executable; otherwise, "%JAVA%" will be used (see below).
rem #
rem set "JAVA_HOME=C:\opt\jdk1.6.0_13"


rem #
rem # Specify the exact Java VM executable to use - only used if JAVA_HOME is
rem # not set. Default is "java".
rem #
rem set "JAVA=C:\opt\jdk1.6.0_13\bin\java"


rem #
rem # Specify options to pass to the Java VM. Note, there are some additional
rem # options that are always passed by run.bat.
rem #


rem # JVM memory allocation pool parameters - modify as appropriate.
set "JAVA_OPTS=-Xms128M -Xmx512M -XX:MaxPermSize=256M"


rem # Reduce the RMI GCs to once per hour for Sun JVMs.
set "JAVA_OPTS=%JAVA_OPTS% -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"


rem # Warn when resolving remote XML DTDs or schemas.
set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true"


rem # Sample JPDA settings for remote socket debugging
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"


rem # Sample JPDA settings for shared memory debugging 
rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"


set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote"
rem set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.port=9999"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.authenticate=true"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.ssl=false"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.rmi.server.hostname=lnz-jboss6"
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.password.file="c:\jmxremote\jmxremote.password""
set "JAVA_OPTS=%JAVA_OPTS% -Dcom.sun.management.jmxremote.access.file="c:\jmxremote\jmxremote.access""


# Use the JBoss MBeanServerBuilder
set "JAVA_OPTS=%JAVA_OPTS% -Djboss.platform.mbeanserver"
set "JAVA_OPTS=%JAVA_OPTS% -Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl"

#Use the jboss logmanager
set "JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl"


set JBOSS_CLASSPATH="C:\jboss-6.1.0.Final\lib\jboss-logmanager.jar"
rem set JBOSS_CLASSPATH="C:\jboss-6.1.0.Final\client\jbossall-client.jar"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory"
set "JAVA_OPTS=%JAVA_OPTS% -Djava.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces"

:JAVA_OPTS_SET

when i execute run.bat om boot.log doesn't have any error and when i open  http:// http://<host>:8080 it open correctlty jboss
also when i login throuhg jconsole service:jmx:rmi:///jndi/rmi://<host>:1090/jmxconnector it connect 

but when i have tried to connect remotely it shows this error log 


com.segue.monitoring.jmx.common.exception.RtException: Unable to connect
          at com.segue.monitoring.jmx.common.gui.swt.JMXSWTRunner.connect(JMXSWTRunner.java:312)
Caused by: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
          java.rmi.RemoteException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
          at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
          at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
          at javax.naming.InitialContext.init(Unknown Source)
          at javax.naming.InitialContext.<init>(Unknown Source)
          at com.segue.monitoring.jmx.common.runtime.DataSourceBase.createContext(DataSourceBase.java:41)
          at com.segue.monitoring.jmx.jboss.datasource.JBossDataSource.bootstrap(Unknown Source)
          at com.segue.monitoring.jmx.common.runtime.RemoteDataSourceBase.bootstrap(RemoteDataSourceBase.java:180)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
          at sun.rmi.transport.Transport$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
          ... 21 more


          at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
          at sun.rmi.transport.Transport$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
          at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
          at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
          at sun.rmi.server.UnicastRef.invoke(Unknown Source)
          at com.segue.monitoring.jmx.jboss.datasource.RemoteDataSource_Stub.bootstrap(Unknown Source)
          at com.segue.monitoring.jmx.common.client.RemoteDataSourceClient.bootstrap(RemoteDataSourceClient.java:265)
          at com.segue.monitoring.jmx.common.gui.swt.JMXSWTRunner.connect(JMXSWTRunner.java:301)
Caused by: java.rmi.RemoteException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
          at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
          at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
          at javax.naming.InitialContext.init(Unknown Source)
          at javax.naming.InitialContext.<init>(Unknown Source)
          at com.segue.monitoring.jmx.common.runtime.DataSourceBase.createContext(DataSourceBase.java:41)
          at com.segue.monitoring.jmx.jboss.datasource.JBossDataSource.bootstrap(Unknown Source)
          at com.segue.monitoring.jmx.common.runtime.RemoteDataSourceBase.bootstrap(RemoteDataSourceBase.java:180)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
          at sun.rmi.transport.Transport$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
          at java.net.URLClassLoader$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at java.net.URLClassLoader.findClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
          at java.lang.ClassLoader.loadClass(Unknown Source)
          at java.lang.Class.forName0(Native Method)
          at java.lang.Class.forName(Unknown Source)
          at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source)
          ... 21 more


          at com.segue.monitoring.jmx.common.runtime.RemoteDataSourceBase.bootstrap(RemoteDataSourceBase.java:189)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
          at sun.rmi.transport.Transport$1.run(Unknown Source)
          at java.security.AccessController.doPrivileged(Native Method)
          at sun.rmi.transport.Transport.serviceCall(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
          at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
          at java.lang.Thread.run(Unknown Source)
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/755955#755955]

Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120825/bc60ad8e/attachment-0001.html 


More information about the jboss-user mailing list