Uploaded image for project: 'Java Mission Control'
  1. Java Mission Control
  2. JMC-6811

Wildfly rjmx connection fails with NoClassDefFoundError on JDK 11 but not 8

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Rejected
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Mission Control Client
    • Labels:
      None

      Description

      The Wildfly RJMX connector fails for JMC 7 on OpenJDK 11 (but not on OpenJDK 8) with:

      org.openjdk.jmc.rjmx.ConnectionException caused by javax.security.sasl.SaslException: org/ietf/jgss/GSSManager [Caused by java.lang.NoClassDefFoundError: org/ietf/jgss/GSSManager]
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:441)
      	at org.openjdk.jmc.rjmx.internal.ServerHandle.doConnect(ServerHandle.java:116)
      	at org.openjdk.jmc.rjmx.internal.ServerHandle.connect(ServerHandle.java:100)
      	at org.openjdk.jmc.browser.wizards.ConnectionWizardPage$ConnectionTester.run(ConnectionWizardPage.java:792)
      	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
      Caused by: javax.security.sasl.SaslException: org/ietf/jgss/GSSManager [Caused by java.lang.NoClassDefFoundError: org/ietf/jgss/GSSManager]
      	at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:425)
      	at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:244)
      	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
      	at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
      	at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
      	at ...asynchronous invocation...(Unknown Source)
      	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:599)
      	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:561)
      	at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:549)
      	at org.jboss.remotingjmx.RemotingConnector.internalRemotingConnect(RemotingConnector.java:268)
      	at org.jboss.remotingjmx.RemotingConnector.internalConnect(RemotingConnector.java:156)
      	at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:103)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.connectJmxConnector(RJMXConnection.java:487)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.establishConnection(RJMXConnection.java:464)
      	at org.openjdk.jmc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:434)
      	... 4 more
      Caused by: java.lang.NoClassDefFoundError: org/ietf/jgss/GSSManager
      	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
      	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
      	at java.base/java.lang.Class.getConstructor0(Class.java:3342)
      	at java.base/java.lang.Class.getConstructor(Class.java:2151)
      	at java.base/java.security.Provider.newInstanceUtil(Provider.java:153)
      	at java.base/java.security.Provider$Service.newInstance(Provider.java:1818)
      	at org.wildfly.security.WildFlyElytronBaseProvider$ProviderService.newInstance(WildFlyElytronBaseProvider.java:218)
      	at org.wildfly.security.sasl.util.SecurityProviderSaslClientFactory.createSaslClient(SecurityProviderSaslClientFactory.java:94)
      	at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
      	at org.wildfly.security.sasl.util.ProtocolSaslClientFactory.createSaslClient(ProtocolSaslClientFactory.java:50)
      	at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
      	at org.wildfly.security.sasl.util.ServerNameSaslClientFactory.createSaslClient(ServerNameSaslClientFactory.java:50)
      	at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
      	at org.wildfly.security.sasl.util.ServerNameSaslClientFactory.createSaslClient(ServerNameSaslClientFactory.java:50)
      	at org.wildfly.security.sasl.util.FilterMechanismSaslClientFactory.createSaslClient(FilterMechanismSaslClientFactory.java:102)
      	at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
      	at org.wildfly.security.sasl.util.LocalPrincipalSaslClientFactory.createSaslClient(LocalPrincipalSaslClientFactory.java:76)
      	at org.wildfly.security.sasl.util.PrivilegedSaslClientFactory.lambda$createSaslClient$0(PrivilegedSaslClientFactory.java:64)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at org.wildfly.security.sasl.util.PrivilegedSaslClientFactory.createSaslClient(PrivilegedSaslClientFactory.java:64)
      	at org.wildfly.security.auth.client.AuthenticationConfiguration.createSaslClient(AuthenticationConfiguration.java:1545)
      	at org.wildfly.security.auth.client.AuthenticationContextConfigurationClient.createSaslClient(AuthenticationContextConfigurationClient.java:430)
      	at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:419)
      	at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:244)
      	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
      	at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
      	at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
      	at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
      
      

      To reproduce:

      Download and unzip latest WildFly release (Application Server Distribution):
          https://wildfly.org/downloads/
      
      Start the application server:
      
          cd /path/to/wildfly-20.0.0.Beta1/bin
          ./standalone.sh
      
      Use the latest JDK Mission Control:
          https://github.com/openjdk/jmc
          
      Edit '/path/to/jmc/jmc.ini'.
      Before the first --add-exports add the following line:
          -Xbootclasspath/a:/path/to/wildfly-20.0.0.Beta1/bin/client/jboss-client.jar
      
      Start JDK Mission Control
          $ /path/to/jmc/jmc
      
      From the menu "File -> Connect -> Create a new connection."
      Click on "Custom JMX service URL" and enter the same URL as used in jConsole:
          service:jmx:remote+http://localhost:9990
      Click 'Next' which will test the connection
      
      The error above will be seen:
          org.openjdk.jmc.rjmx.ConnectionException caused by javax.security.sasl.SaslException: org/ietf/jgss/GSSManager [Caused by java.lang.NoClassDefFoundError: org/ietf/jgss/GSSManager]
          ....
      

      The steps working on 8 but not 11 suggests an OSGI/modules problem, maybe more on the Eclipse side of things. Could be there is an alternate configuration for 11+.

        Attachments

          Activity

            People

            • Assignee:
              jkang Jie Kang
              Reporter:
              jkang Jie Kang
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: