jakarta-eewildflyjschwildfly-10sshj

sshj or jsch, getting java.lang.NoClassDefFoundError when deployed to Wildfly 10.1


I have tried both these libraries and Wildfly is throwing java.lang.NoClassDefFoundError on any class in use when my application is deployed.

Is there something in Wildfly that's blocking these libraries/or APIs that they use?


Solution

  • I found the solution. In my pom.xml file of my EJB module, I added the following under <configuration> of maven-ejb-plugin:

    <archive>
        <manifest>
            <addClasspath>true</addClasspath>
        </manifest>
    </archive>