I'm currently trying to implement a DD4T solution (running locally), and have had a lot of success with most aspects of the implementation. I have pages setup and working which pull through all types of content from Tridion, but am currently hitting a brick wall with regards to Dynamic Link Resolution. Every other aspect of my website works, that I've tried, but Dynamic Linking doesn't.

Having read around all sources I've been able to find online, I've determined that the only way to resolve the component TCMs I have access to into URLs is through the ResolveLink method within the TridionLinkProvider class (which in turn lives within my compiled DD4T.Providers.SDLTridion2013 dll. However, whenever and however I try to use this method I come up against the following Server Error:

Server Error in '/' Application.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: Java.Lang.Exception: com.tridion.linking.ComponentLink

Source Error:

Line 58:                 if (!_componentLinks.ContainsKey(uri.PublicationId)) // we must test again, because in the mean time another thread might have added a record to the dictionary!
Line 59:                 {
Line 60:                     _componentLinks.Add(uri.PublicationId, new ComponentLink(uri.PublicationId));
Line 61:                 }
Line 62:             }

Having investigated, the problem seems to be that the reference to the Tridion.ContentDelivery.Web.Linking dll within that class isn't working properly - all references to the ComponentLink type produce the following error, meaning that I am never able to create a ComponentLink to return:

ComponentLink = 'ComponentLink' threw an exception of type 'Java.Lang.Exception'
base {Java.Lang.Throwable} = {java.lang.ClassNotFoundException: com.tridion.linking.ComponentLink}

What makes it even more confusing is that if I go into the Dynamic Delivery Presentation solution (where I built my Providers DLL from), the reference is fine there! It sees and recognises the type ComponentLink without an issue. So it seems to be losing that information when built. I can also reference "Tridion.ContentDelivery.Web.Linking" successfully using the @using directive in my views, showing that the reference is in a "fit state" there if that's of any use.

Full stack trace follows:

[Exception: com.tridion.linking.ComponentLink]
   Codemesh.JuggerNET.JavaClass.ThrowException(Exception ex) +96
   Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst) +413
   Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst) +1373
   Codemesh.JuggerNET.JavaClass.init() +373
   Codemesh.JuggerNET.JavaClass.get_JObject() +33
   Codemesh.JuggerNET.JavaMethod.init() +1115
   Codemesh.JuggerNET.JavaMethod.get_MethodPtr() +54
   Codemesh.JuggerNET.JavaMethod.get_Handle() +47
   Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo, JavaMethodArguments args) +389
   Com.Tridion.Linking.ComponentLink..ctor(Int32 publicationId) +191
   Tridion.ContentDelivery.Web.Linking.ComponentLink..ctor(Int32 publicationId) +58
   DD4T.Providers.SDLTridion2013.TridionLinkProvider.GetComponentLink(TcmUri uri) in C:\Documents and Settings\jwalters\My Documents\DD4T-New\dotnet\DD4T.Providers.SDLTridion2013\TridionLinkProvider.cs:60
   DD4T.Providers.SDLTridion2013.TridionLinkProvider.ResolveLink(String sourcePageUri, String componentUri, String excludeComponentTemplateUri) in C:\Documents and Settings\jwalters\My Documents\DD4T-New\dotnet\DD4T.Providers.SDLTridion2013\TridionLinkProvider.cs:82
   DD4T.Providers.SDLTridion2013.TridionLinkProvider.ResolveLink(String componentUri) in C:\Documents and Settings\jwalters\My Documents\DD4T-New\dotnet\DD4T.Providers.SDLTridion2013\TridionLinkProvider.cs:70
   DD4T.Factories.LinkFactory.ResolveLink(String componentUri) in C:\Documents and Settings\jwalters\My Documents\DD4T-New\dotnet\DD4T.Factories\LinkFactory.cs:90
   ASP._Page_Views_Shared_header_cshtml.Execute() in c:\Documents and Settings\jwalters\My Documents\Visual Studio 2010\Projects\New-DD4T\New-DD4T\Your Website\Views\Shared\header.cshtml:52
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +81
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +220
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
   System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection) +279
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +113
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName) +31
   ASP._Page_Views_Shared__MasterPage_cshtml.Execute() in c:\Documents and Settings\jwalters\My Documents\Visual Studio 2010\Projects\New-DD4T\New-DD4T\Your Website\Views\Shared\_MasterPage.cshtml:19
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +207
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +81
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +88
   System.Web.WebPages.c__DisplayClass7.b__6(TextWriter writer) +102
   System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +12
   System.Web.WebPages.WebPageBase.Write(HelperResult result) +67
   System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action`1 body) +66
   System.Web.WebPages.WebPageBase.PopContext() +262
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +95
   System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +220
   System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +115
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +303
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.c__DisplayClass1c.b__19() +23
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +260
   System.Web.Mvc.c__DisplayClass1e.b__1b() +19
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +177
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +343
   System.Web.Mvc.Controller.ExecuteCore() +116
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +97
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +10
   System.Web.Mvc.c__DisplayClassb.b__5() +37
   System.Web.Mvc.Async.c__DisplayClass1.b__0() +21
   System.Web.Mvc.Async.c__DisplayClass8`1.b__7(IAsyncResult _) +12
   System.Web.Mvc.Async.WrappedAsyncResult`1.End() +62
   System.Web.Mvc.c__DisplayClasse.b__d() +50
   System.Web.Mvc.SecurityUtil.b__0(Action f) +7
   System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action) +22
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +60
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +8862381
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

I've been fighting with this issue for days and am at my wit's end. My lib and config folders seem correct, my licence is fine (else nothing else would work), the Tridion logging (through logback) does not show anything relevant even when set to Verbose. I've tried starting with a new DD4T website solution, re-compiling my Providers DLL, experimenting with references (re-adding them, moving the DLLs to live natively in the solution folders rather than within the DD4T "build" folder where I was previously referencing them), and nothing has changed the error at all.

If anyone could offer some pointers or advice, it would be very much appreciated. I really don't know how else to proceed with this.

  • Do you have a cd_link.jar in the lib? Is it a 2013 jar file?
    – Quirijn
    Commented Jun 21, 2013 at 15:24
  • No, there's no cd_link.jar in there - and I can't find one anywhere on the server which Tridion itself is installed on, where we've pulled all the /lib/ files from. I do see a cd_linking.jar on the server if that's what you mean, but copying that down doesn't change the error at all. Commented Jun 21, 2013 at 15:47
  • 1
    The error is quite clear: the com.tridion.linking.ComponentLink class cannot be found, and that is certainly located in the cd_link(ing).jar. It could be in one of two places: %TRIDION_HOME%\lib or the bin\lib folder inside your web application's home dir.
    – Quirijn
    Commented Jun 21, 2013 at 18:58

1 Answer 1


Did Quirijn's comment fix the issue?

Looking at it, this indeed seems to be the case. Perhaps you could check / confirm the correct API libs are located in your website /bin/lib folder - or coming from a configured TRIDION_HOME location.

Full documentation to installing content delivery api in .net is located in the SDL Tridion content website here: http://sdllivecontent.sdl.com/LiveContent/content/en-US/SDL_Tridion_2011_SPONE/task_DFE30215E62D42D097516F0450C853D7

  • 1
    Both of you seem to have moved me on! It does indeed seem to have been issues surrounding cd_linking.jar, but I think the core issue was the associated config - "cd_linking.xml" wasn't there. That link to the documentation is very helpful - thanks for that. The error has now moved onto reporting that "Some configured classpath roots cannot be found" over com.tridion.linking.linking, which I believe points to further jar issues? It's moved for the first time in days though, which is great! Commented Jun 24, 2013 at 10:07
  • All working now - got my URLs pulling through properly :) Thanks very much guys - really appreciate your support! Commented Jun 24, 2013 at 11:17
  • Hi John, I went through your question. I am also facing similar issue, but it is related to UGC implmentation. You can find the issue in below URL. http://tridion.stackexchange.com/questions/14042/error-in-ugc-implementation-in-dd4t-application . Can you tell me what was the fix you implemented.
    – Manas.p
    Commented Mar 3, 2016 at 6:43

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.