-
Notifications
You must be signed in to change notification settings - Fork 0
Description
I've been working on packaging the smoothness-weblib as a JBoss Module, which is how to avoid bundling it inside every war file (application) that uses it. Wildfly is designed to run multiple apps together in the same JVM (before days of Docker Compose!) and share libraries, and JBoss modules is how it is done (JBoss Modules was created before days of Java Platform Module System JPMS a.k.a. Jigsaw). The smoothness-weblib actually contains a tag library (TLD file) and apparently those are only "discovered" if inside a war file. There may be a workaround were we duplicate the TLD file inside each war or possibly use the jboss-deployment-structure.xml mechanism, but we also have the problem that the smoothness weblib is also a library of web resources (JSP, CSS, JavaScript, HTML, images), and those may also only be referenced if directly inside a war needing them.
If you do attempt to install smoothness-weblib as a module and then use it you'll see the very unhelpful error when you navigate your web browser to view the first JSP page:
ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /smoothness-demo/WEB-INF/views/overview.jsp: org.apache.jasper.JasperException: JBWEB004001: Unable to compile class for JSP
at io.undertow.jsp@2.0.11.Final//org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:667)
at io.undertow.jsp@2.0.11.Final//org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:242)
at io.undertow.jsp@2.0.11.Final//org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:587)
...
Caused by: java.lang.NullPointerException
at io.undertow.jsp@2.0.11.Final//org.apache.jasper.compiler.TagLibraryInfoImpl.createTagFileInfo(TagLibraryInfoImpl.java:486)
at io.undertow.jsp@2.0.11.Final//org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:198)
at io.undertow.jsp@2.0.11.Final//org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:412)
...