Search code examples
pluginshawtio

Can't load hawtio plugin


I have hawtio standalone application (hawtio-app-1.4.52.jar).

I wanted to deploy the simple plugin, but I wasn't successful at building it alone, so I downloaded the hawtio application from github and built the "simple plugin" without changing it. (I opened the whole project and used build artifact in IntelliJ idea.) - Building was without warning or errors and I got the .WAR file of this plugin.

I created "plugins" directory next to the hawtio.jar and put the war inside.

There is no new tab in hawtio or no other sign of this plugin running.

I can access plugin's folder on http://0.0.0.0:8090/simple-plugin-1.5-SNAPSHOT/ but it only shows folder structures and plain text of source files.

In this question is mentioned PluginServlet, but I have no idea, how to import it to the simple plugin.

Does anyone know, how to make plugin visible and usable? Thanks.

When I run the hawtio jar in terminal, this shows up:

[main] INFO jetty - using temp directory for jetty: /Users/mcejka/.hawtio/tmp
[main] INFO jetty - Scanning for 3rd party plugins in directory: plugins
[main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /simple-plugin-1.5-SNAPSHOT, did not find org.apache.jasper.servlet.JspServlet
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/mcejka/.hawtio/tmp/simple-plugin-1.5-SNAPSHOT.war/webapp/WEB-INF/lib/slf4j-log4j12-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/mcejka/Downloads/hawtio-app-1.4.52.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
log4j:WARN No appenders could be found for logger (io.hawt.web.plugin.HawtioPlugin).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[main] INFO org.eclipse.jetty.webapp.WebAppContext - hawt.io simple plugin at http://0.0.0.0:8090/simple-plugin-1.5-SNAPSHOT
[main] INFO jetty - Added 3rd party plugin with context-path: /simple-plugin-1.5-SNAPSHOT
Added 3rd party plugin with context-path: /simple-plugin-1.5-SNAPSHOT
Embedded hawtio: You can use --help to show usage
Using options [
    war=/private/var/folders/bm/gscmy_6d5f52xz038twpwymjfjz5kl/T/hawtio-1582436603468747864.war
    contextPath=/hawtio
    port=8090
    extraClassPath=file:/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/lib/tools.jar
    plugins=plugins
    jointServerThread=false
    help=false]
About to start hawtio /private/var/folders/bm/gscmy_6d5f52xz038twpwymjfjz5kl/T/hawtio-1582436603468747864.war
[main] INFO org.eclipse.jetty.server.Server - jetty-8.y.z-SNAPSHOT
[main] INFO org.eclipse.jetty.webapp.WebInfConfiguration - Extract jar:file:/private/var/folders/bm/gscmy_6d5f52xz038twpwymjfjz5kl/T/hawtio-1582436603468747864.war!/ to /Users/mcejka/.hawtio/tmp/webapp
[main] INFO org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /hawtio, did not find org.apache.jasper.servlet.JspServlet
[main] INFO io.hawt.system.ConfigManager - Configuration will be discovered via system properties
[main] INFO io.hawt.jmx.JmxTreeWatcher - Welcome to hawtio 1.4.52 : http://hawt.io/ : Don't cha wish your console was hawt like me? ;-)
[main] INFO io.hawt.jmx.UploadManager - Using file upload directory: /var/folders/bm/gscmy_6d5f52xz038twpwymjfjz5kl/T//uploads
[main] INFO /hawtio - Loading Blueprint contexts [file:/Users/mcejka/.hawtio/tmp/webapp/WEB-INF/classes/OSGI-INF/blueprint/blueprint.xml, jar:file:/Users/mcejka/.hawtio/tmp/webapp/WEB-INF/lib/hawtio-aether-1.4.52.jar!/OSGI-INF/blueprint/blueprint.xml, jar:file:/Users/mcejka/.hawtio/tmp/webapp/WEB-INF/lib/hawtio-core-1.4.52.jar!/OSGI-INF/blueprint/blueprint.xml, jar:file:/Users/mcejka/.hawtio/tmp/webapp/WEB-INF/lib/hawtio-git-1.4.52.jar!/OSGI-INF/blueprint/blueprint.xml, jar:file:/Users/mcejka/.hawtio/tmp/webapp/WEB-INF/lib/hawtio-ide-1.4.52.jar!/OSGI-INF/blueprint/blueprint.xml, jar:file:/Users/mcejka/.hawtio/tmp/webapp/WEB-INF/lib/hawtio-json-schema-mbean-1.4.52.jar!/OSGI-INF/blueprint/blueprint.xml, jar:file:/Users/mcejka/.hawtio/tmp/webapp/WEB-INF/lib/hawtio-kubernetes-1.4.52.jar!/OSGI-INF/blueprint/blueprint.xml, jar:file:/Users/mcejka/.hawtio/tmp/webapp/WEB-INF/lib/hawtio-local-jvm-mbean-1.4.52.jar!/OSGI-INF/blueprint/blueprint.xml]
[main] INFO io.hawt.git.GitFacade - hawtio using config directory: /Users/mcejka/.hawtio/config
[main] INFO io.hawt.git.GitFacade - Performing a pull in git repository /Users/mcejka/.hawtio/config on remote URL: https://github.com/hawtio/hawtio-config.git. Subsequent pull attempts will use debug logging
[main] INFO io.hawt.web.AuthenticationFilter - Starting hawtio authentication filter, JAAS authentication disabled
[main] INFO /hawtio - jolokia-agent: Using access restrictor classpath:/jolokia-access.xml
[main] INFO org.eclipse.jetty.webapp.WebAppContext - hawtio at http://0.0.0.0:8090/hawtio
[main] INFO org.eclipse.jetty.server.AbstractConnector - Started [email protected]:8090

hawtio: Don't cha wish your console was hawt like me!
=====================================================

http://localhost:8090/hawtio

[qtp1501587365-23] INFO io.hawt.web.keycloak.KeycloakServlet - Keycloak integration is disabled

Solution

  • Solved by properly renaming the plugin. It has to be "simple-plugin" instead of "simple-plugin-1.42" or anything else.