6

We are using .Net DD4T solution with SDL Tridion 2013 SP1 and Smart Target 2014, Every thing else like Promotions, ADF etc seems OK but query is not returning any result. Please do suggest what could be wrong here.

Here is the Smart Target logs for the DD4T application.

015-10-28 10:27:29,994 DEBUG Query - Constructing Fredhopper query
2015-10-28 10:27:29,994 INFO  Query - Executing query: fh_location=//catalog01/en_GB&fh_user_date=20151028&fh_start_index=0&st_region=Sidebar&st_active_period=20151028&st_publication=tcm%3A0-26-1
2015-10-28 10:27:30,056 DEBUG Section - Adding Custom field with id: 2, name: multiselect and value no
2015-10-28 10:27:30,056 DEBUG Section - Adding Custom field with id: 3, name: state and value Expanded
2015-10-28 10:27:30,056 DEBUG Section - Creating section with title: Categories, name: categories, section type: Cat, number of links: 8
2015-10-28 10:27:30,056 DEBUG Section - Adding Custom field with id: 2, name: multiselect and value yes
2015-10-28 10:27:30,056 DEBUG Section - Adding Custom field with id: 3, name: state and value Expanded
2015-10-28 10:27:30,056 DEBUG Section - Creating section with title: Brand, name: brand, section type: Set, number of links: 10
2015-10-28 10:27:30,056 DEBUG Section - Creating section with title: Spotlight, name: spotlight, section type: Set, number of links: 4
2015-10-28 10:27:30,056 DEBUG Section - Adding Custom field with id: 2, name: multiselect and value no
2015-10-28 10:27:30,056 DEBUG Section - Adding Custom field with id: 3, name: state and value Collapsed
2015-10-28 10:27:30,056 DEBUG Section - Creating section with title: Price, name: price, section type: Other, number of links: 5
2015-10-28 10:27:30,056 DEBUG ResultSet - Changing the tcmuri's of '171010167799' to be in context of Publication 'tcm:0-46-1'.
2015-10-28 10:27:30,072 ERROR TimeoutQueryRunner - The fredhopper query thread had an exception during execution
java.util.concurrent.ExecutionException: java.lang.RuntimeException: com.tridion.smarttarget.SmartTargetException: Parsing secondid into TCMURIs failed
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[na:1.7.0_55]
    at java.util.concurrent.FutureTask.get(FutureTask.java:202) ~[na:1.7.0_55]
    at com.tridion.smarttarget.tags.TimeoutQueryRunner.executeQuery(TimeoutQueryRunner.java:59) ~[smarttarget_core.jar:na]
    at com.tridion.smarttarget.query.builder.QueryBuilder.execute(QueryBuilder.java:432) [smarttarget_core.jar:na]
java.lang.RuntimeException: com.tridion.smarttarget.SmartTargetException: Parsing secondid into TCMURIs failed
    at com.tridion.smarttarget.query.ResultSetImpl.<init>(ResultSetImpl.java:59) ~[smarttarget_core.jar:na]
    at com.tridion.smarttarget.query.QueryImpl.executeFredHopperQuery(QueryImpl.java:131) ~[smarttarget_core.jar:na]
    at com.tridion.smarttarget.query.QueryImpl.execute(QueryImpl.java:169) ~[smarttarget_core.jar:na]
    at com.tridion.smarttarget.tags.TimeoutQueryRunner$1.call(TimeoutQueryRunner.java:49) ~[smarttarget_core.jar:na]
    at com.tridion.smarttarget.tags.TimeoutQueryRunner$1.call(TimeoutQueryRunner.java:44) ~[smarttarget_core.jar:na]
    at java.util.concurrent.FutureTask.run(FutureTask.java:262) ~[na:1.7.0_55]
    at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_55]
Caused by: com.tridion.smarttarget.SmartTargetException: Parsing secondid into TCMURIs failed
    at com.tridion.smarttarget.query.ItemImpl.load(ItemImpl.java:254) ~[smarttarget_core.jar:na]
    at com.tridion.smarttarget.query.ItemImpl.<init>(ItemImpl.java:42) ~[smarttarget_core.jar:na]
    at com.tridion.smarttarget.query.ResultSetImpl.load(ResultSetImpl.java:429) ~[smarttarget_core.jar:na]
    at com.tridion.smarttarget.query.ResultSetImpl.<init>

(ResultSetImpl.java:57) ~[smarttarget_core.jar:na]
        ... 6 common frames omitted
    Caused by: java.text.ParseException: URI string  does not start with tcm:
        at com.tridion.util.TCMURI.load(TCMURI.java:91) ~[cd_core.jar:na]
        at com.tridion.util.TCMURI.<init>(TCMURI.java:76) ~[cd_core.jar:na]
        at com.tridion.smarttarget.query.ItemImpl.load(ItemImpl.java:251) ~[smarttarget_core.jar:na]
        ... 9 common frames omitted
    2015-10-28 10:27:30,072 DEBUG TimeoutQueryRunner - Query result retrieved from fredhopper in: 78 ms.

Hi All, Now I have been stuck in different error. Below i have mentioned the cd_core log ans application smartarget log. cd_core log

2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Ambient Data context initialization.
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Ambient Data context initialization.
2015-10-29 08:53:03,057 DEBUG WebContext - setCurrentClaimStore: com.tridion.ambientdata.dotnet.DotNetClaimStore@43be054d, thread: Thread-1
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:request:uri, value=/Images/template/atmel-icon-close.png
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:request:full_url, value=http://acmswebdev:8080/Images/template/atmel-icon-close.png
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:request:headers, value={cookie=[Ljava.lang.String;@704e24f9, cache-control=[Ljava.lang.String;@1a5d9109, connection=[Ljava.lang.String;@74dcf364, host=[Ljava.lang.String;@55ef662c, accept-language=[Ljava.lang.String;@581cfec7, accept=[Ljava.lang.String;@579ae802, user-agent=[Ljava.lang.String;@7af6083c, referer=[Ljava.lang.String;@2e96da35, accept-encoding=[Ljava.lang.String;@31cfe578, pragma=[Ljava.lang.String;@47e242d4}
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:request:cookies, value={TAFSessionId=tridion_9a00c02d-e84a-4342-8726-89786377c0ee, _ga=GA1.1.175339672.1445594031, ASP.NET_SessionId=45j25e03cfegygczq3j4yejn, TAFTrackingId=tridion_3d39dfce-6550-4445-9942-71b0fd2964a4}
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:request:parameters, value={CONTENT_TYPE=[Ljava.lang.String;@5791912a, QUERY_STRING=[Ljava.lang.String;@15d18950}
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:server:variables, value={REMOTE_USER=, PATH_TRANSLATED=D:\Inetpub\Tridion\RedesignLive\Images\template\atmel-icon-close.png, SERVER_PORT=8080, SCRIPT_NAME=/Images/template/atmel-icon-close.png, REMOTE_ADDR=172.24.64.108, AUTH_TYPE=, SERVER_PROTOCOL=HTTP/1.1, REQUEST_METHOD=GET, DOCUMENT_ROOT=D:\Inetpub\Tridion\RedesignLive, REMOTE_HOST=172.24.64.108, SERVER_NAME=acmswebdev, SECURE=false}
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Is http header processor enabled ?False
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Is http header processor enabled ?False
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Is http header processor enabled ?False
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Is http header processor enabled ?False
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:session:id, value=tridion_9a00c02d-e84a-4342-8726-89786377c0ee
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:tracking:id, value=tridion_3d39dfce-6550-4445-9942-71b0fd2964a4
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:session:attributes, value={Tridion.ContentDelivery.AmbientData.ClaimStore=Tridion.ContentDelivery.AmbientData.ClaimStore}
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Begin processing cookie claims.
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Begin processing cookie claims.
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Cookie forwarding is enabled: False
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Cookie forwarding is enabled: False
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Dispatching OnRequestStart event
2015-10-29 08:53:03,057 DEBUG AmbientRuntime - Dispatching OnRequestStart event
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:claim:ambientdata:footprintcartridge:devicetype, value=Desktop
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:claim:ambientdata:footprintcartridge:mobiledevice, value=NotMobile
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:claim:ambientdata:sessioncartridge:session:sessionid, value=tridion_9a00c02d-e84a-4342-8726-89786377c0ee
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:claim:ambientdata:sessioncartridge:session:creationtimestamp, value=1446133979688
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:claim:ambientdata:sessioncartridge:session:lifetime, value=0
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:claim:ambientdata:sessioncartridge:refererdomain, value=acmswebdev:8080
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:claim:ambientdata:sessioncartridge:authorization:isauthenticated, value=false
2015-10-29 08:53:03,057 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:03,057 DEBUG SearchClaimProcessor - No match found for referrer string http://acmswebdev:8080/products/microcontrollers/index.html
2015-10-29 08:53:03,057 DEBUG ClaimStore - put: uri=taf:claim:ambientdata:footprintcartridge:acceptlanguage, value=en-US
2015-10-29 08:53:33,633 DEBUG HttpModule - Dispose
2015-10-29 08:53:33,633 DEBUG HttpModule - Dispose
2015-10-29 08:53:33,633 DEBUG AmbientRuntime - Ambient Runtime release.
2015-10-29 08:53:33,633 DEBUG AmbientRuntime - Ambient Runtime release.
2015-10-29 08:53:54,319 DEBUG SessionManagerImpl - No session opened for the current execution thread.
2015-10-29 08:53:54,319 DEBUG SessionProxyMethodHandler - Intercepted call to 'findByPrimaryKey' while not in session.

SmartTarget log-

2015-10-29 08:52:59,719 DEBUG TriggerTypesHelper - Started fredhopper query call
2015-10-29 08:53:00,140 INFO  WebServiceExecutor - Trigger-Types are successfully retrieved. Response status code: 200
2015-10-29 08:53:00,171 INFO  WebServiceExecutor - trigger-types are successfully retrieved
2015-10-29 08:53:00,171 DEBUG WebServiceExecutor - Fredhopper Web service call for retrieved result in: 483 ms.
2015-10-29 08:53:00,171 DEBUG TriggerTypesProcessor - Storing trigger types for use on subsequent requests.
2015-10-29 08:53:00,171 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /System/Javascript/masonry.pkgd.min.js
2015-10-29 08:53:00,218 INFO  WebServiceExecutor - Trigger-Types are successfully retrieved. Response status code: 200
2015-10-29 08:53:00,234 INFO  WebServiceExecutor - trigger-types are successfully retrieved
2015-10-29 08:53:00,234 DEBUG WebServiceExecutor - Fredhopper Web service call for retrieved result in: 515 ms.
2015-10-29 08:53:00,249 DEBUG TriggerTypesProcessor - Storing trigger types for use on subsequent requests.
2015-10-29 08:53:00,249 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /System/Javascript/global.js
2015-10-29 08:53:00,514 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:00,842 DEBUG SessionProcessor - parsing 'user-agent' request header
2015-10-29 08:53:00,842 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:00,842 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /Images/template/logo_Atmel.png
2015-10-29 08:53:00,873 DEBUG SessionProcessor - parsing 'user-agent' request header
2015-10-29 08:53:00,873 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:00,873 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /Images/template/sprite_search_green.png
2015-10-29 08:53:00,889 DEBUG SessionProcessor - parsing 'user-agent' request header
2015-10-29 08:53:00,889 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:00,904 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /Images/template/btn-top.png
2015-10-29 08:53:00,920 DEBUG SessionProcessor - parsing 'user-agent' request header
2015-10-29 08:53:00,920 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:00,920 INFO  TriggerTypesProcessor - Retrieving defined trigger types from Fredhopper.
2015-10-29 08:53:00,920 DEBUG WebServiceExecutor - Trying to retrieve a result within a timeout of 5000 ms.
2015-10-29 08:53:00,920 DEBUG TriggerTypesHelper - Started fredhopper query call
2015-10-29 08:53:00,936 DEBUG SessionProcessor - parsing 'user-agent' request header
2015-10-29 08:53:00,936 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:00,936 INFO  TriggerTypesProcessor - Retrieving defined trigger types from Fredhopper.
2015-10-29 08:53:00,936 DEBUG WebServiceExecutor - Trying to retrieve a result within a timeout of 5000 ms.
2015-10-29 08:53:00,936 DEBUG TriggerTypesHelper - Started fredhopper query call
2015-10-29 08:53:00,951 DEBUG SessionProcessor - parsing 'user-agent' request header
2015-10-29 08:53:00,967 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:00,967 INFO  TriggerTypesProcessor - Retrieving defined trigger types from Fredhopper.
2015-10-29 08:53:00,967 DEBUG WebServiceExecutor - Trying to retrieve a result within a timeout of 5000 ms.
2015-10-29 08:53:00,967 DEBUG TriggerTypesHelper - Started fredhopper query call
2015-10-29 08:53:01,107 INFO  WebServiceExecutor - Trigger-Types are successfully retrieved. Response status code: 200
2015-10-29 08:53:01,107 INFO  WebServiceExecutor - Trigger-Types are successfully retrieved. Response status code: 200
2015-10-29 08:53:01,123 INFO  WebServiceExecutor - Trigger-Types are successfully retrieved. Response status code: 200
2015-10-29 08:53:01,138 INFO  WebServiceExecutor - trigger-types are successfully retrieved
2015-10-29 08:53:01,138 DEBUG WebServiceExecutor - Fredhopper Web service call for retrieved result in: 218 ms.
2015-10-29 08:53:01,138 DEBUG TriggerTypesProcessor - Storing trigger types for use on subsequent requests.
2015-10-29 08:53:01,138 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /Images/template/sprite_search_mobile.png
2015-10-29 08:53:01,138 INFO  WebServiceExecutor - trigger-types are successfully retrieved
2015-10-29 08:53:01,154 DEBUG WebServiceExecutor - Fredhopper Web service call for retrieved result in: 187 ms.
2015-10-29 08:53:01,154 DEBUG TriggerTypesProcessor - Storing trigger types for use on subsequent requests.
2015-10-29 08:53:01,154 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /Images/template/sprite_list_leftborder.png
2015-10-29 08:53:01,154 INFO  WebServiceExecutor - trigger-types are successfully retrieved
2015-10-29 08:53:01,170 DEBUG WebServiceExecutor - Fredhopper Web service call for retrieved result in: 234 ms.
2015-10-29 08:53:01,170 DEBUG TriggerTypesProcessor - Storing trigger types for use on subsequent requests.
2015-10-29 08:53:01,170 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /Images/template/sprite_cart.png
2015-10-29 08:53:01,419 DEBUG SessionProcessor - parsing 'user-agent' request header
2015-10-29 08:53:01,419 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:01,419 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /System/Javascript/elqCfg.min.js
2015-10-29 08:53:02,277 DEBUG SessionProcessor - parsing 'user-agent' request header
2015-10-29 08:53:02,277 DEBUG SessionProcessor - parsing 'authorization' request header
2015-10-29 08:53:02,277 DEBUG TriggerTypesProcessor - Adding trigger types to ClaimStore. Requested URL is: /forms/Secure/SignOn/SessionInfo.ashx
2015-10-29 08:53:03,057 DEBUG SessionProcessor - parsing 'authorization' request header

Any help will be much appreciated. Thanks in advance.

3

You can start your debugging by directly executing the query in fredhopper. To execute directly in fredhopper you should append http://<Fredhopper url>/fredhopper/query? before your query showing in log file. In your case query may be http://localhost:8180/fredhopper/query?fh_location=//catalog01/en_GB&fh_user_date=20151028&fh_start_index=0&st_region=Sidebar&st_active_period=20151028&st_publication=tcm%3A0-26-1

If this is returning the result then you should check by increasing the query timeout period in smart target configuration file in your website.

If this is not returning result then you should check the promotion in fredhopper preview url and then play with triggers to check what's going wrong with your query..

  • I checked with query provide by you directly executing in fredhopper and query returning the content and i have already increased the timeout for the query because earlier in logs I found the timeout error. In Fredhopper preview, promotions seems ok because as I made some changes in CME, changes reflect in fredhopper as well. – SumitK Oct 29 '15 at 15:38
  • Your log is not showing any error so can you try to debug the issue steps by step: 1. Check if you are getting promotions returned as a result of smart target api query execution. 2. If yes is the answer for 1, then check if you have component published in the broker.. – Mukesh Kumar Oct 31 '15 at 8:55
3

Parsing secondid into TCMURIs failed

URI string does not start with tcm:

It would appear that you have non-SmartTarget items being returned by your query (the "secondid" of the item is not a TCM URI). This is not currently supported.

To fix it, you should either move the items to a different universe or make sure all queries from SmartTarget filter out the non-SmartTarget items.

Another possibility is that the "secondid" attribute is not being returned at all (although I think you should be getting a specific error for that scenario). If that is the case, you can fix it by adding "secondid" to all of the lists returned under System -> Presentation (lister page, detail page, etc.)

  • Now i am not getting Parsing secondid into TCMURIs failed error. I am adding the latest logs in the ticket main content. – SumitK Oct 29 '15 at 15:40
  • I don't see any logging related to the query in that, so I can't tell if something is going wrong. If you are not getting any errors, check if the Dynamic Component Presentations that are returned have actually been published to the current website (or check the CD core logs for errors related to rendering the DCP). – Peter Kjaer Oct 29 '15 at 16:12

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.