modalFactory method getModelFromWrappedRequest is not available | Community
Skip to main content
bhuwaneshdhakar
Level 2
Oct 9, 2018 1:29 PM UTC
Solved

modalFactory method getModelFromWrappedRequest is not available

I was trying to use getModelFromWrappedRequest of org.apache.sling.models.factory.ModalFactory class of Sling API. From the sling documentations, it looks like this method was introduced in Sling 10 API. I tried adding latest dependencies related Sling API. But it didn't resolved.

org.apache.sling.models.api version is 1.3.6 in my POM file.

Please let me know what other dependencies/artifacts I need to include in my POM file so that I can use getModelFromWrappedRequest method.

ModelFactory

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Peter_Puzanovs
Peter_PuzanovsAccepted solution
New Participant
Oct 9, 2018 1:55 PM UTC

Hey,

Which version of AEM are you using?

Generally, speaking uber-jar should resolve enough dependencies to launch this method:

<dependency>

            <groupId>com.adobe.aem</groupId>

            <artifactId>uber-jar</artifactId>

            <classifier>apis</classifier>

            <version>6.4.0</version>

</dependency>

Regards,
Peter

2 replies

bhuwaneshdhakar
Level 2
Oct 10, 2018 4:42 AM UTC

Thank you PuzanovsP​. The error is resolved now after changing uber jar version from 6.3.0 to 6.4.0.

Translate
Peter_Puzanovs
Peter_PuzanovsAccepted solution
New Participant
Oct 9, 2018 1:55 PM UTC

Hey,

Which version of AEM are you using?

Generally, speaking uber-jar should resolve enough dependencies to launch this method:

<dependency>

            <groupId>com.adobe.aem</groupId>

            <artifactId>uber-jar</artifactId>

            <classifier>apis</classifier>

            <version>6.4.0</version>

</dependency>

Regards,
Peter

Translate