Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-7564

Hawtio does not work on EAP due to ClassNotFoundException

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • fuse-7.0
    • fuse-7.0
    • Hawtio
    • None
    • % %
    • Fuse 7.0 Sprint 22

      The latest Fuse 7 Hawtio build does not work on EAP due to CNFE:

      09:58:54,287 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 77) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./hawtio: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./hawtio: java.lang.IllegalArgumentException: Cannot create an instance of custom restrictor class class io.hawt.system.RBACRestrictor
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:84)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:320)
      Caused by: java.lang.IllegalArgumentException: Cannot create an instance of custom restrictor class class io.hawt.system.RBACRestrictor
      	at org.jolokia.restrictor.RestrictorFactory.lookupRestrictor(RestrictorFactory.java:97)
      	at org.jolokia.restrictor.RestrictorFactory.createCustomRestrictor(RestrictorFactory.java:74)
      	at org.jolokia.restrictor.RestrictorFactory.createRestrictor(RestrictorFactory.java:42)
      	at org.jolokia.http.AgentServlet.createRestrictor(AgentServlet.java:155)
      	at org.jolokia.http.AgentServlet.init(AgentServlet.java:135)
      	at io.hawt.web.servlets.JolokiaConfiguredAgentServlet.init(JolokiaConfiguredAgentServlet.java:58)
      	at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117)
      	at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78)
      	at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103)
      	at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:250)
      	at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:133)
      	at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:565)
      	at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:536)
      	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
      	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      	at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
      	at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:578)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
      	at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81)
      	... 6 more
      Caused by: java.lang.reflect.InvocationTargetException
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at org.jolokia.restrictor.RestrictorFactory.lookupRestrictor(RestrictorFactory.java:82)
      	... 28 more
      Caused by: java.lang.NoClassDefFoundError: com/google/common/cache/CacheLoader
      	at io.hawt.system.RBACRestrictor.<init>(RBACRestrictor.java:46)
      	... 33 more
      Caused by: java.lang.ClassNotFoundException: com.google.common.cache.CacheLoader from [Module "deployment.hawtio-wildfly-2.0.0.fuse-000114.war" from Service Module Loader]
      	at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
      	at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
      	at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
      	... 34 more
      

            [ENTESB-7564] Hawtio does not work on EAP due to ClassNotFoundException

            Verified on fuse fuse-eap-installer-7.0.0.fuse-000070, EAP 7.1, fedora 25, chrome 63

            Mojmir Kubiste (Inactive) added a comment - Verified on fuse fuse-eap-installer-7.0.0.fuse-000070, EAP 7.1, fedora 25, chrome 63

            I can't reproduce that problem on my laptop. It's probably due to how your environment is configured. See this KB article:

            https://access.redhat.com/solutions/3247181

            It's a generic EAP issue, unrelated to Fuse or this bug fix.

            James Netherton added a comment - I can't reproduce that problem on my laptop. It's probably due to how your environment is configured. See this KB article: https://access.redhat.com/solutions/3247181 It's a generic EAP issue, unrelated to Fuse or this bug fix.

            jnethert@redhat.com of course.
            1. install fuse (e.g. java -jar fuse-eap-installer-7.0.0.fuse-000070.jar jboss-eap-7.1)
            2. lunch EAP (e.g jboss-eap-7.1/bin/standalone.sh -c standalone-full.xml)
            3. check the output on terminal and you will find the error

            Mojmir Kubiste (Inactive) added a comment - jnethert@redhat.com of course. 1. install fuse (e.g. java -jar fuse-eap-installer-7.0.0.fuse-000070.jar jboss-eap-7.1) 2. lunch EAP (e.g jboss-eap-7.1/bin/standalone.sh -c standalone-full.xml) 3. check the output on terminal and you will find the error

            mkubiste_jira steps to reproduce?

            James Netherton added a comment - mkubiste_jira steps to reproduce?

            Hi jnethert@redhat.com. I can verify, that hawtio runs on 7.0.0.fuse-000070. But I get error message during the starting. her is it.
            15:47:35,960 ERROR [io.undertow] (MSC service thread 1-1) UT005024: Could not register resource change listener for caching resource manager, automatic invalidation of cached resource will not work: java.lang.RuntimeException: java.io.IOException: User limit of inotify watches reached
            at org.xnio.nio.WatchServiceFileSystemWatcher.watchPath(WatchServiceFileSystemWatcher.java:183)
            at io.undertow.server.handlers.resource.PathResourceManager.registerResourceChangeListener(PathResourceManager.java:236)
            at org.wildfly.extension.undertow.deployment.ServletResourceManager.registerResourceChangeListener(ServletResourceManager.java:103)
            at io.undertow.server.handlers.resource.CachingResourceManager.<init>(CachingResourceManager.java:64)
            at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:580)
            at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:273)
            at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
            at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
            at java.lang.Thread.run(Thread.java:748)
            Caused by: java.io.IOException: User limit of inotify watches reached
            at sun.nio.fs.LinuxWatchService$Poller.implRegister(LinuxWatchService.java:264)
            at sun.nio.fs.AbstractPoller.processRequests(AbstractPoller.java:260)
            at sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:329)
            ... 1 more

            Mojmir Kubiste (Inactive) added a comment - Hi jnethert@redhat.com . I can verify, that hawtio runs on 7.0.0.fuse-000070. But I get error message during the starting. her is it. 15:47:35,960 ERROR [io.undertow] (MSC service thread 1-1) UT005024: Could not register resource change listener for caching resource manager, automatic invalidation of cached resource will not work: java.lang.RuntimeException: java.io.IOException: User limit of inotify watches reached at org.xnio.nio.WatchServiceFileSystemWatcher.watchPath(WatchServiceFileSystemWatcher.java:183) at io.undertow.server.handlers.resource.PathResourceManager.registerResourceChangeListener(PathResourceManager.java:236) at org.wildfly.extension.undertow.deployment.ServletResourceManager.registerResourceChangeListener(ServletResourceManager.java:103) at io.undertow.server.handlers.resource.CachingResourceManager.<init>(CachingResourceManager.java:64) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:580) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:273) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: User limit of inotify watches reached at sun.nio.fs.LinuxWatchService$Poller.implRegister(LinuxWatchService.java:264) at sun.nio.fs.AbstractPoller.processRequests(AbstractPoller.java:260) at sun.nio.fs.LinuxWatchService$Poller.run(LinuxWatchService.java:329) ... 1 more

            Hi mkubiste_jira, could you have a look at this issue, please?

            Andrej Podhradsky added a comment - Hi mkubiste_jira , could you have a look at this issue, please?

            Guava was missing from the hawtio-wildfly WAR. This commit should ensure that it's present in future builds:

            https://github.com/hawtio/hawtio/commit/da7517d9bc90c604f3f66ca60c82eea527380626

            James Netherton added a comment - Guava was missing from the hawtio-wildfly WAR. This commit should ensure that it's present in future builds: https://github.com/hawtio/hawtio/commit/da7517d9bc90c604f3f66ca60c82eea527380626

              jnethert@redhat.com James Netherton
              jnethert@redhat.com James Netherton
              Mojmir Kubiste Mojmir Kubiste (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: