ModuleNotFoundException after Thorntail upgrade

44 views
Skip to first unread message

Flo Ryan

unread,
Mar 3, 2020, 2:01:34 AM3/3/20
to Thorntail
I've also posted the question on stackoverflow but I feel here might be a better place:

I just upgraded the Thorntail version of my application from 2.5.0.Final to 2.6.0. Final. My app is using a module (for authorization), which lies in a separate git repo, so I've included it in my pom.xml.

Since the upgrade I'm getting a ModuleNotFoundException when the module is called (authorization is triggered)


Caused by: org.jboss.modules.ModuleNotFoundException: org.apache.santuario.xmlsec
at org.jboss.modules.Module.addPaths(Module.java:1266) [backend-thorntail.jar:]
at org.jboss.modules.Module.link(Module.java:1622) [backend-thorntail.jar:]
at org.jboss.modules.Module.relinkIfNecessary(Module.java:1650) [backend-thorntail.jar:]
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:299) [backend-thorntail.jar:]
at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:283) [backend-thorntail.jar:]
at org.jboss.as.security.plugins.SecurityActions.getModuleClassLoader(SecurityActions.java:50) [thorntailwildfly-security-18.0.1.Final5333088777079625058.jar:18.0.1.Final]
at org.jboss.as.security.plugins.ModuleClassLoaderLocator.get(ModuleClassLoaderLocator.java:65) [thorntailwildfly-security-18.0.1.Final5333088777079625058.jar:18.0.1.Final]
... 49 more

The problem is, that the org.apache.santuario.xmlsec dependency of the module is not being bundled in the thorntail jar, while all other dependencies are present in the jar.

This is the module.xml of the used module:


</module>
    ...
    <dependencies>
        <module name="javax.api"/>
        <module name="javax.servlet.api"/>
        <module name="org.apache.xalan"/>
        <module name="org.apache.santuario.xmlsec"/>
        <module name="org.picketbox"/>
        <module name="org.jboss.logging"/>
    </dependencies>
</module>



Does anyone have an idea how I can "force" Thorntail to include this dependency? I also tried simply adding the latest version of the missing dependency in my pom.xml but unfortunately this doesn't help.

Any help is appreciated - thanks!

Ladislav Thon

unread,
Mar 26, 2020, 4:56:47 AM3/26/20
to thor...@googlegroups.com

Hi,

this somehow fell through the cracks, sorry about that! What fractions does your application depend on?

The thing is: each fraction comes with a set of `module.xml` files that define all the required modules (there's a root set of modules, and all their dependencies and their dependencies etc. are added to the fraction). And when you build your application, the uberjar will only include `module.xml` files of those modules that are required by the fractions you use.

The `org.apache.santuario.xmlsec` module is only present when you add certain fraction -- it seems the only fractions that require this module are `webservices` and `keycloak-server`. The `keycloak-server` is a testing tool which you should _not_ add to your application, which leaves us with `webservices`. Does your application depend on the `webservices` fraction? If not, and you don't want it to, you'll have to add the `module.xml` file of `org.apache.santuario.xmlsec` yourself (similarly to what you do with your own module).

LT

--
You received this message because you are subscribed to the Google Groups "Thorntail" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thorntail+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/thorntail/28989ede-2876-4af2-b803-597b4affcfed%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages