Wildlfy 10 deployement - NoClassDefFoundError: org/picketlink/common/exceptions/ProcessingException

248 Views Asked by At

I'm overriding a server filter class from a jar in the Wildlfy 10 modules. It's a quick and dirty solution : copied/pasted the content of the class in my custom class and referenced my custom class instead.

My parent pom is like this :

        <dependency>
            <groupId>org.picketlink</groupId>
            <artifactId>picketlink-api</artifactId>
            <version>${picketlink-version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.picketlink</groupId>
            <artifactId>picketlink-federation</artifactId>
            <version>${picketlink-version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.picketlink</groupId>
            <artifactId>picketlink-common</artifactId>
            <version>${picketlink-version}</version>
            <scope>provided</scope>
        </dependency>

And I have the following section in the war pom containing the custom class :

    <dependency>
        <groupId>org.picketlink</groupId>
        <artifactId>picketlink-api</artifactId>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.picketlink</groupId>
        <artifactId>picketlink-federation</artifactId>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.picketlink</groupId>
        <artifactId>picketlink-common</artifactId>
        <scope>provided</scope>
    </dependency>

I also have a jboss-deployment-description.xml file in my war where the package containing the missing class is already referenced (this is from an instruction on how to use the package for other things) :

<jboss-deployment-structure>
<deployment>
    <!-- You must configure the PicketLink dependency to your deployment. The dependency above is a reference to a static module
    from JBoss EAP modules directory. -->
    <dependencies>
        <module name="org.picketlink"/>
        <module name="org.picketlink.common"/>
    </dependencies>
</deployment>

and the main package "org.picketlink" is also in my ear's manifest file which packages the war :

<manifestEntries>
    <Dependencies>
        com.docapost.configuration,org.picketlink
    </Dependencies>
</manifestEntries>

This was also done to solve some past ClassNotFoundException in the past if i recall correctly.

The jar version in the pom is the same as the version in my Wildfly (picketlink 2.7.0.Final)

At deployment, I get the exception from my custom class ZephirSPFilter :

 Error getting reflective information for class com.docapost.zephir.filters.ZephirSPFilter with ClassLoader ModuleClassLoader

And :

Caused by: java.lang.NoClassDefFoundError: org/picketlink/common/exceptions/ProcessingException
Caused by: java.lang.ClassNotFoundException: org.picketlink.common.exceptions.ProcessingException from [Module \"deployment.zephir-ear.ear.zephir-web.war:main\" from Service Module Loader]"},
1

There are 1 best solutions below

1
Anton Tupy On

As far as I understand you have ear and included in it war. And you added jboss-deployment-description.xml to your war. But this file should be placed in the top level deployment, i.e. in your case to ear.

See https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7