Embedding the JARs is surely not the right solution. These need to be deployed as OSGi bundles (as Stefan wrote).
Regards, Justin On Sat, Nov 19, 2016 at 4:56 AM Gopal Agarwal <[email protected]> wrote: > Hi All, > > I managed to resolve the dependency issue by embedding these jars. > Now I am getting issue @ line 3 > > ResourceResolver resourceResolver = request.getResourceResolver(); > Resource contentResource = (Resource) > resourceResolver.getResource("/content/ubi/test"); > ValueMap props = > contentResource.adaptTo(ConfigurationBuilder.class).asValueMap(); > > com.adobe.beagle.servlet.ContextAwareConfigReader [Exception] > java.lang.NullPointerException: null > > Any help is appreciated. > > Regards, > Gopal > > > > > From: Gopal Agarwal > Sent: Thursday, November 17, 2016 8:30 PM > To: '[email protected]' <[email protected]> > Subject: Need help in implementing Sling Context Aware Configuration > > Hi, > > I am looking to use Sling Context Aware Configuration. > > https://sling.apache.org/documentation/bundles/context-aware-configuration/context-aware-configuration.html > > I have added these in the POM file > <dependency> > <groupId>org.apache.sling</groupId> > <artifactId>org.apache.sling.caconfig.impl</artifactId> > <version>1.0.0</version> > </dependency> > <dependency> > <groupId>org.apache.sling</groupId> > <artifactId>org.apache.sling.caconfig.api</artifactId> > <version>1.0.0</version> > </dependency> > <dependency> > <groupId>org.apache.sling</groupId> > <artifactId>org.apache.sling.caconfig.spi</artifactId> > <version>1.0.0</version> > </dependency> > <dependency> > <groupId>org.apache.sling</groupId> > <artifactId>org.apache.sling.caconfig.bnd-plugin</artifactId> > <version>1.0.0</version> > </dependency> > > > Java code > ResourceResolver resourceResolver = request.getResourceResolver(); > Resource contentResource = (Resource) > resourceResolver.getResource("/content/ubi/test"); > ValueMap props = > contentResource.adaptTo(ConfigurationBuilder.class).asValueMap(); > String param1 = props.get("param1", String.class); > > Issue: > ConfigurationBuilder Class is not getting resolved. > > Am I missing something? Any help is appreciated.. > > > Regards, > Gopal > > >
