jakarta-eewildfly-10picketlink

Picketlink with WildFly 10


I am trying to use PicketLink in my Java EE 7 application. So far the projects compile without errors. But when I try to deploy the application on WildFly 10 it stops with following exception:

Caused by: java.lang.NoClassDefFoundError: org/picketlink/Identity

First I have tried to add Picketlink (picketlink-impl:2.5.5.SP2) as a dependency to my ear (in lib directory). But this gives quite more exceptions, namely for all internal picketlink classes, one of several exceptions:

java.lang.NoClassDefFoundError: Failed to link org/picketlink/internal/AbstractIdentity (Module "..." from Service Module Loader): org/picketlink/Identity

I thought that Picketlink is already deployed in WildFly 10 as a module. Is there any configuration I am missing to activate Picketlink?


Solution

  • Add picketlink module dependency to your jboss-deployment-structure.xml file:

    <jboss-deployment-structure>
        <deployment>
            <dependencies>
                <module name="org.picketlink"/>
            </dependencies>
        </deployment>
    </jboss-deployment-structure>
    

    If you don't have this file it should be placed in META-INF (or WEB-INF for web deployments).

    EDIT:

    It should be placed in the top level deployment. See https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7