I am getting Claimstore as Null in java. My claim store is null from the below code.:

    private ResultSet executeSmartTargetQuery(AbstractSmartTargetPageModel stPageModel, final TcmUri pageUri) throws SmartTargetException {
        TcmUri publicationUri = new TcmUri(TcmUtils.buildPublicationTcmUri(pageUri.getPublicationId()));

        ClaimStore claimStore = AmbientDataContext.getCurrentClaimStore();
        System.out.println("Claim Store "+ claimStore);
        String triggers = AmbientDataHelper.getTriggers(claimStore);

I got to know the filter mapping to be add, ADF ClaimStore not available (null) in Java Application After that I added the filter in below code, I am getting 404 Error:

public class WebAppConfiguration implements WebApplicationInitializer {

    public void onStartup(ServletContext servletContext) throws ServletException {
        AnnotationConfigWebApplicationContext servletAppContext = new AnnotationConfigWebApplicationContext();

        servletContext.addListener(new ContextLoaderListener(servletAppContext));

        ServletRegistration.Dynamic registration = servletContext.addServlet("DispatcherServlet", new DispatcherServlet(servletAppContext));

        registerFilter(servletContext, AmbientClientFilter.class, "/*");

MY dxa.property file is as follows :

#EHCache configuration
#cache expired elements for amount of seconds

## DXA

# Web Properties

# Possible profiles:
# search.aws - Activates AWS in Search, Not compatible with search.solr
# search.solr - Activates SOLR in Search, Not compatible with search.aws
# dxa.no-cache - Makes DXA use NoCacheProvider in Tridion
# test Activates - Testing context, Only affects unit testing. Activated in Tests by default. Doesnt affect application.

# Multiple-line configuration is possible
#spring.profiles.active=search.solr, \
#  dxa.no-cache


## Modules
# - All commented are optional

# Mapping for CID resolver (Filter or Servlet)

# Class to use as a resolver for CID images

# External path to the server which runs DXA for back-mapping for CID Service

# Redirect link for XO GA client

Do someone have any idea, how to solve it.

1 Answer 1


The problem is likely that the AmbientClientFilter is not enabled.

It should not be needed to do that in code like you tried; it should be done through DXA properties configuration. This config has changed quite a bit in earlier DXA versions (IIRC, for some versions you still needed a web.xml).

I would recommend to try with a newer DXA version. Preferably the latest (DXA 1.6 since you're on 2013 SP1), but if you try DXA 1.5, you can get away without changing the CM-side.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.