3

While connecting the smart target in tridion, I am getting the below error. Can someone tell me the debugging tips for the same issue.

java.lang.IllegalArgumentException: Universe must not be null or empty
    at com.tridion.smarttarget.entitymodel.query.Query.<init>(Query.java:263) ~[smarttarget_entitymodel-8.1.1.jar:8.1.1]
    at com.tridion.smarttarget.query.builder.QueryBuilder.<init>(QueryBuilder.java:128) ~[smarttarget_core-8.1.1.jar:8.1.1]
    at com.tridion.smarttarget.query.builder.QueryBuilder.<init>(QueryBuilder.java:112) ~[smarttarget_core-8.1.1.jar:8.1.1]
    at com.sdl.dxa.modules.smarttarget.mapping.SmartTargetPageBuilder.executeSmartTargetQuery(SmartTargetPageBuilder.java:166) ~[dxa-module-smarttarget-web8-1.4.1.jar:1.4.1]
    at com.sdl.dxa.modules.smarttarget.mapping.SmartTargetPageBuilder.processQueryAndPromotions(SmartTargetPageBuilder.java:135) ~[dxa-module-smarttarget-web8-1.4.1.jar:1.4.1]
    at com.sdl.dxa.modules.smarttarget.mapping.AbstractSmartTargetPageBuilder.createPage(AbstractSmartTargetPageBuilder.java:161) ~[dxa-module-smarttarget-abstract-1.4.1.jar:1.4.1]
    at com.sdl.webapp.tridion.mapping.ModelBuilderPipeline.createPageModel(ModelBuilderPipeline.java:72) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT]
    at com.sdl.webapp.tridion.mapping.AbstractDefaultProvider$1.tryFindPage(AbstractDefaultProvider.java:287) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT]
    at com.sdl.webapp.tridion.mapping.AbstractDefaultProvider$1.tryFindPage(AbstractDefaultProvider.java:267) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT]
    at com.sdl.webapp.tridion.mapping.AbstractDefaultProvider.findPage(AbstractDefaultProvider.java:102) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT]
    at com.sdl.webapp.tridion.mapping.AbstractDefaultProvider.getPageModel(AbstractDefaultProvider.java:267) ~[dxa-tridion-provider-1.4.1.jar:1.0-SNAPSHOT]
    at com.sdl.webapp.common.controller.PageController.getPageModel(PageController.java:321) ~[dxa-common-api-1.4.1.jar:1.4.1]
    at com.sdl.webapp.common.controller.PageController.handleGetPage(PageController.java:129) ~[dxa-common-api-1.4.1.jar:1.4.1]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_121]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_121]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_121]

Smarttarget_conf.xml

<?xml version="1.0" encoding="UTF-8"?>
<Configuration Version="8.1">
    <Fredhopper>
        <!-- Default settings -->
        <DefaultUniverse>catalog01</DefaultUniverse>
        <DefaultLocale>en_US</DefaultLocale>

        <IndexServer>
            <Timeouts>
                <Triggers>5000</Triggers>
            </Timeouts>
        </IndexServer>

        <QueryServer>
            <Timeouts>
                <Query>1000</Query>
            </Timeouts>
        </QueryServer>
    </Fredhopper>
    <SmartTarget>
        <!--
            Defines the offset in hours and minutes from this CD system to the CM system's local server time
            Used for begin and end dates of Experiments as well as date triggers
            Examples:
            -7 means the CM system is in a TimeZone 7 hours earlier than this CD system
            -7:45 means the CM system is in a TimeZone 7 hours and 45 minutes earlier than this CD system
            +5 means the CM system is in a TimeZone 5 hours later than this CD system
            +5:30 means the CM system is in a TimeZone 5 hours and 30 minutes later than this CD system
        -->
        <TimeZoneOffset>0</TimeZoneOffset>

        <!-- Analytics -->
        <Analytics trackingRedirectUrl="/redirect/" />

        <DefaultValues>
            <!-- Site-wide default for the "Allow duplicates across regions" option -->
            <AllowDuplicates>true</AllowDuplicates>
        </DefaultValues>

        <!-- The path to referrers definition file -->
        <Referrers>smarttarget.referrers.xml</Referrers>

        <!-- Ambient Data Framework prefixes (changes the long claim URIs of the framework into the shorter prefixes used in trigger-types.xml)-->
        <AmbientData>
            <Prefixes>
                <taf_claim_audiencemanager_contact>am</taf_claim_audiencemanager_contact>
                <taf_claim_audiencemanager_contact_extendeddetail>am_ex</taf_claim_audiencemanager_contact_extendeddetail>
                <taf_claim_ambientdata_sessioncartridge>sc</taf_claim_ambientdata_sessioncartridge>
                <taf_claim_ambientdata_sessioncartridge_session>sc_session</taf_claim_ambientdata_sessioncartridge_session>
                <taf_claim_ambientdata_sessioncartridge_useragent>sc_ua</taf_claim_ambientdata_sessioncartridge_useragent>
                <taf_claim_ambientdata_sessioncartridge_useragent_browser>sc_ua_browser</taf_claim_ambientdata_sessioncartridge_useragent_browser>
                <taf_claim_ambientdata_sessioncartridge_useragent_os>sc_ua_os</taf_claim_ambientdata_sessioncartridge_useragent_os>
                <taf_claim_ambientdata_sessioncartridge_authorization>sc_auth</taf_claim_ambientdata_sessioncartridge_authorization>
            </Prefixes>
            <!-- Add data to the Ambient Data ClaimStore so that other systems can use this information -->
            <AddSmartTargetDataToClaimStore>true</AddSmartTargetDataToClaimStore>
        </AmbientData>

    </SmartTarget>
</Configuration>

And method of api causing an error :

private PageModel getPageModel(String path, Localization localization) {
    try {
      return this.contentProvider.getPageModel(path, localization);
    } catch (PageNotFoundException e) {
      LOG.error("Page not found: {}", path, e);
      throw new NotFoundException(new StringBuilder().append("Page not found: ").append(path).toString(), e);
    } catch (ContentProviderException e) {
      LOG.error("An unexpected error occurred", e);
      throw new InternalServerErrorException("An unexpected error occurred", e);
    }
  }

Even when I rename the smarttarget_conf, same error coming. So i think might be my connection is not loading this file. Any Inputs?

  • Could you post your smarttarget_conf.xml contents, it might be the setting of the universe is missing here. – Harald Hoffelinck Jan 30 '17 at 11:34
  • @HaraldHoffelinck I have updated the question with xml file. – Vivek Dhiman Jan 30 '17 at 12:07
5

The error indicates that something went wrong when loading your configuration file (e.g. it is invalid).

To resolve it, make sure your smarttarget_conf.xml file has a value for the DefaultUniverse setting. The default value is 'catalog01'.

While you are there, you should take a look at the other settings and make sure they are correct as well.

  • Hi Peter, With the same SDL Optimization setup .net dxa1.4 application is running fine. But java dxa1.4 causing the above issue. Any specific change or files we need to look for to make this work for java. – Vivek Dhiman Jan 31 '17 at 9:22
  • 1
    AFAIK, Java XO CIL requires many more settings in smarttarget_conf.xml (even though most of these setting are not really used by the CIL). For DXA .NET XO Module, we have stripped the OOTB smarttarget_conf.xml to the bare minimum (to avoid confusion), but that was not possible for DXA Java XO Module (which has the full config with dummy values). – Rick Pannekoek Feb 1 '17 at 7:18
  • Thanks @RickPannekoek , We have updated full smarttarget_conf.xml file in Java DXA webapp, now error is resolved but and page appear with default content that is added on CMS page. But as we configured browser based promotions in CMS which is appearing fine with .Net DXA 1.4, but with the same configuration this browser based promotion is not appearing with Java DXA . Any thoughts? – Vivek Dhiman Feb 1 '17 at 10:51
  • Check the log file. Typical reason why you see fallback content instead of Promotion content is that the Fredhopper query timed out. – Rick Pannekoek Feb 1 '17 at 11:56
  • Hi @RickPannekoek, I did debug the same issue and found ** Claim Store is null** in file SmartTargetPageBuilder and method is executeSmartTargetQuery in dxa solution. Do you have any clue, why claim store is null? Moreover, We don't have any web.xml and using the spring framework to configure deployment parameters. – Vivek Dhiman Feb 2 '17 at 9:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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