Results 1 to 4 of 4

Thread: Bad credentials with MBeanServerConnectionFactoryBean

  1. #1
    Join Date
    May 2007
    Location
    Craiova, Romania
    Posts
    25

    Default Bad credentials with MBeanServerConnectionFactoryBean

    Hi. Altough I can connect with the same user and password to my jmx server using JCONSOLE, I cannot seem to manage logging in with my client. Here is the code:

    <bean id="jmxServerClient"
    class="org.springframework.jmx.support.MBeanServer ConnectionFactoryBean">
    <property name="serviceUrl"
    value="service:jmx:rmi://localhost/jndi/rmi://localhost:8335/connector" />
    <property name="environment">
    <props>
    <prop key="java.naming.security.principal">xxxxxx</prop>
    <prop key="java.naming.security.credentials">yyyyy</prop>
    </props>
    </property>
    </bean>

    The errro is "Bad credentials" ? What should I do in this case ?

  2. #2
    Join Date
    May 2007
    Location
    Craiova, Romania
    Posts
    25

    Default

    I can't believe it. Nobody knows what is the proper way to connect to a JMX server, using the MBeanServerConnectionFactoryBean in order to supply the necessary credentials ?

  3. #3
    Join Date
    May 2007
    Location
    Craiova, Romania
    Posts
    25

    Red face Here is the server configuration

    <bean id="registry"
    class="org.springframework.remoting.rmi.RmiRegistr yFactoryBean">
    <property name="port" value="8335" />
    </bean>

    <bean id="serverConnector"
    class="org.springframework.jmx.support.ConnectorSe rverFactoryBean">
    <property name="objectName" value="connector:name=rmi" />
    <property name="serviceUrl"
    value="service:jmx:rmi://localhost/jndi/rmi://localhost:8335/connector" />
    <property name="server" ref="jmxServer" />
    <property name="environment">
    <map>
    <entry key="jmx.remote.authenticator"
    value-ref="jmxRemoteAuthenticator" />
    </map>
    </property>
    </bean>

    <bean id="jmxRemoteAuthenticator"
    class="mx4j.tools.remote.PasswordAuthenticator">
    <constructor-arg>
    <bean factory-method="getInputStream"
    factory-bean="jmxRemotePasswords" />
    </constructor-arg>
    </bean>

    <bean id="resourceLoader"
    class="org.springframework.core.io.DefaultResource Loader" />

    <bean id="jmxRemotePasswords" factory-method="getResource"
    factory-bean="resourceLoader">
    <constructor-arg value="classpathasswords.txt" />
    </bean>

  4. #4
    Join Date
    May 2007
    Location
    Craiova, Romania
    Posts
    25

    Exclamation

    How did you manged to connect to the above server, using MBeanServerConnectionFactoryBean and prviding the username and password in order to pass the security check ?
    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •