4

I am using DD4T to implement SDL Tridion. I have 2 servers (in Datacenters)

  1. Content Management (Server A)
  2. Content Delivery (Server B)

I have created a DD4T template in my local machine. In the DD4T Web Site, i have copied the lib and config directories. Now I am getting a runtime Error.

[NullReferenceException: Object reference not set to an instance of an object.]
   DD4T.Providers.SDLTridion2013.TridionPageProvider.GetContentByUrl(String Url) +547
   DD4T.Factories.PageFactory.TryFindPage(String url, IPage& page) +557
   DD4T.Mvc.Controllers.TridionControllerBase.GetModelForPage(String PageId) +109
   DD4T.Mvc.Controllers.TridionControllerBase.Page(String pageId) +22

I have few questions:

  1. How the DD4T application finds the Content Delivery server (Server B), although it is not mentioned anywhere in the config file.
  2. How to solve the above exception.
  3. Can we provide Content Delivery URL in the DD4T Website and connect to it from Visual Studio, or do I need to set up a Content delivery instance in my local host environment?

Log errors

014-08-08 11:57:15,766 [21] DEBUG Performance [(null)] - >>TryFindPage (/Test_Page
2014-08-08 11:57:15,813 [21] DEBUG Performance [(null)] - about to load page from cache with key Page_/Test_Page_0
2014-08-08 11:57:15,814 [21] DEBUG Performance [(null)] - finished loading page from cache with key Page_/Test_Page_0, page found = False
2014-08-08 11:57:15,814 [21] DEBUG Performance [(null)] - about to load page content from provider with url /Test_Page
2014-08-08 11:57:15,820 [21] DEBUG Performance [(null)] - >>GetContentByUrl(/Test_Page)
2014-08-08 11:57:15,820 [21] DEBUG Performance [(null)] - GetContentByUrl: about to create query
2014-08-08 11:57:24,228 [21] DEBUG Performance [(null)] - GetContentByUrl: created query
2014-08-08 11:57:24,307 [21] DEBUG Performance [(null)] - GetContentByUrl: added criteria to query
2014-08-08 11:57:24,307 [21] DEBUG Performance [(null)] - GetContentByUrl: about to execute query
2014-08-08 11:57:24,309 [21] DEBUG Performance [(null)] - GetContentByUrl: executed query
5
  • Can you check that - the DB server settings in storage config is pointing to the correct server (server b) - you actually have a valid cd_license.xml for your dev environment (check your tridion log files for any license errors) Aug 8, 2014 at 8:27
  • @HaraldHoffelinck i am pointing to the correct DB Server in the storage.config. and also No license erros in the log files. I have updated question with log error details
    – Ravi Gadag
    Aug 8, 2014 at 8:59
  • Check the Tridion cd_core.log. The location (and loglevel) are configured in the logback.xml file in 'bin\config\logback.xml' Aug 8, 2014 at 9:03
  • @AlbertRomkes ok, I will look into it and get back to you. Is there any good basic tutorials for understanding DD4T. I would like to thank you people for helping me out so quickly :).
    – Ravi Gadag
    Aug 8, 2014 at 9:12
  • Just google for 'DD4T' and you should be good to go. If you have any more questions, just post them on SO :) Aug 8, 2014 at 9:17

1 Answer 1

4
  1. DD4T is part of your website and runs on your Content Delivery (web)server. In the 'bin\config\cd_storage_conf.xml' there is a reference to the so called 'Broker Database'. This is the Tridion Content Delivery Databases that DD4T uses to find it's content. So your call GetContentByUrl tries to find it's content in this Broker Database.

  2. Check Harald's comment. Did you follow the documentation? Java installed? License? Etc.

  3. You can run/develop a DD4T website on any supported OS. You can either point your Visual Studio solution to an IIS website or use the build in webserver.

2
  • So you mean, WebSite has to deployed in the Deliver server. From Visual studio i can connect to that website for developing and building. am i right ?
    – Ravi Gadag
    Aug 8, 2014 at 9:06
  • No. Your website (with DD4T) can also run on your local machine, but your OS must be supported (check the docs) and your license should be valid for your machine. Also, your machine should be able to connect to the broker database. Aug 8, 2014 at 9:15

Your Answer

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

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