Can't register AWS-SDK on Jboss modules correctly

I found the dependency aws-java-sdk was being compiled on a legacy code, having as result a very heavy EAR.

I declared this dependency as provided and wanted to put it as part of the Jboss modules, but no matter where I put it, I'm still having the ClassNotFound issue.

Here is my module.xml:

<module xmlns="urn:jboss:module:1.1" name="com.amazonaws">
            <property name="jboss.api" value="private"/>
            <resource-root path="aws-java-sdk-1.11.584.jar"/>
            <module name="javax.api"/>
            <module name=""/>
            <module name="javax.xml.bind.api"/>
            <module name="com.fasterxml.jackson"/>
            <module name="org.joda.time"/>

And the error:

Caused by: java.lang.NoClassDefFoundError: com/amazonaws/auth/AWSCredentials

1 answer

  • answered 2019-07-11 20:51 Rafael

    The problem was on the JAR file, needed sdk-core. Check your JARs always.