2

I am trying to setup DD4T on my local machine for the first time for our Tridion 2013 SP1. I have installed the DD4T project template from google code, resolved Nugget dependencies, placed the Deployer dlls, jars and configs. I have not changed anything in deployer and storage config yet. I just copied them from my deployer . I run the solutions and resolved issues related to netrtsn.dll and xmogrt.dll.

I have 2 questions here:

1.Now When I run the solution I get the following error in PageController.cs at line

return base.Page(pageId); Java.Lang.Throwable was unhandled by user code
HResult=-2146232832 Message=
java/lang/ExceptionInInitializerError

(Query.java:45) Caused by: java.lang.RuntimeException: Fatal error, unable to load the StorageManagerFactory at com.tridion.storage.StorageManagerFactory.reloadInstance(StorageManagerFactory.java:91) at com.tridion.storage.StorageManagerFactory.(StorageManagerFactory.java:56) ... 1 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reldeployerdbDataSource': Invocation of init method failed; nested exception is javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093) at com.tridion.storage.util.EntityManagerFactoryBeanConfigurer.configure(EntityManagerFactoryBeanConfigurer.java:55) at com.tridion.storage.util.SpringContextDynamicConfigurer.configureDatasource(SpringContextDynamicConfigurer.java:87) at com.tridion.storage.util.SpringContextDynamicConfigurer.configure(SpringContextDynamicConfigurer.java:44) at com.tridion.storage.configuration.SpringConfigurationLoader.configure(SpringConfigurationLoader.java:26) at com.tridion.configuration.step.ConfigurationStepLoader.configure(ConfigurationStepLoader.java:47) at com.tridion.storage.StorageManagerFactory.configure(StorageManagerFactory.java:137) at com.tridion.services.BaseService.(BaseService.java:113) at com.tridion.storage.StorageManagerFactory.(StorageManagerFactory.java:104) at com.tridion.storage.StorageManagerFactory.reloadInstance(StorageManagerFactory.java:84) ... 2 more Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105) at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201) at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) ... 18 more at Codemesh.JuggerNET.JavaClass.ThrowException(Exception ex) at Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst) at Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst) at Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo) at Com.Tridion.Broker.Querying.Query..ctor() at Tridion.ContentDelivery.DynamicContent.Query.Query..ctor() at DD4T.Providers.SDLTridion2013.TridionPageProvider.GetContentByUrl(String Url) at DD4T.Factories.PageFactory.TryFindPage(String url, IPage& page) at DD4T.Mvc.Controllers.TridionControllerBase.GetModelForPage(String PageId) at DD4T.Mvc.Controllers.TridionControllerBase.Page(String pageId) at DD4T_MVC4_Web_Application1.Controllers.PageController.Page(String pageId) in c:\Users\rchoudhary\Documents\Visual Studio 2013\Projects\DD4T MVC4 Web Application1\DD4T MVC4 Web Application1\Controllers\PageController.cs:line 16 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.b__41() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49()]]> Source=netrtsn IsFrameworkException=false
IsProxyError=false IsProxyException=false JObject=341980352
JObjectDuplicate=341980192 StackTrace: java.lang.ExceptionInInitializerError at com.tridion.broker.querying.Query.(Query.java:45) Caused by: java.lang.RuntimeException: Fatal error, unable to load the StorageManagerFactory at com.tridion.storage.StorageManagerFactory.reloadInstance(StorageManagerFactory.java:91) at com.tridion.storage.StorageManagerFactory.(StorageManagerFactory.java:56) ... 1 more Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'reldeployerdbDataSource': Invocation of init method failed; nested exception is javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093) at com.tridion.storage.util.EntityManagerFactoryBeanConfigurer.configure(EntityManagerFactoryBeanConfigurer.java:55) at com.tridion.storage.util.SpringContextDynamicConfigurer.configureDatasource(SpringContextDynamicConfigurer.java:87) at com.tridion.storage.util.SpringContextDynamicConfigurer.configure(SpringContextDynamicConfigurer.java:44) at com.tridion.storage.configuration.SpringConfigurationLoader.configure(SpringConfigurationLoader.java:26) at com.tridion.configuration.step.ConfigurationStepLoader.configure(ConfigurationStepLoader.java:47) at com.tridion.storage.StorageManagerFactory.configure(StorageManagerFactory.java:137) at com.tridion.services.BaseService.(BaseService.java:113) at com.tridion.storage.StorageManagerFactory.(StorageManagerFactory.java:104) at com.tridion.storage.StorageManagerFactory.reloadInstance(StorageManagerFactory.java:84) ... 2 more Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.lookup(Unknown Source) at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:154) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105) at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201) at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452) ... 18 more at Codemesh.JuggerNET.JavaClass.ThrowException(Exception ex) at Codemesh.JuggerNET.NTypeValue.Throw(Int64 inst) at Codemesh.JuggerNET.JavaClass.ThrowTypedException(Int64 inst) at Codemesh.JuggerNET.JavaMethod.CallObject(JavaProxy jpo) at Com.Tridion.Broker.Querying.Query..ctor() at Tridion.ContentDelivery.DynamicContent.Query.Query..ctor() at DD4T.Providers.SDLTridion2013.TridionPageProvider.GetContentByUrl(String Url) at DD4T.Factories.PageFactory.TryFindPage(String url, IPage& page) at DD4T.Mvc.Controllers.TridionControllerBase.GetModelForPage(String PageId) at DD4T.Mvc.Controllers.TridionControllerBase.Page(String pageId) at DD4T_MVC4_Web_Application1.Controllers.PageController.Page(String pageId) in c:\Users\rchoudhary\Documents\Visual Studio 2013\Projects\DD4T MVC4 Web Application1\DD4T MVC4 Web Application1\Controllers\PageController.cs:line 16 at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass42.b__41() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.b__33() at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.b__49() InnerException:

  1. I will be having different publication target from our usual one. I have created one but where do I send the published data? what will be the changes in deployer and storage config?

Any help is most appreciated.

Thanks

1
  • More on question 2 - right now we are using tridion templating and we are using java as frontend. I do not want to mix my new publication target with the current one. I am planning to create a new publication target which would be used to publish only DD4T stuff. I want to setup the publishing target so that I would use it for my DD4T project. Oct 20, 2015 at 8:36

2 Answers 2

2

for the 1st error, did you verify if you have a valid and supported JAVA installed - You may try running java -version command in the Command prompt to verify.

For 2) I am not sure if I understood it correctly - you most like be having a publication target setup to a HTTP module and corresponding Storage Config will have an entry for the Broker Database details and File System details where the publishing would happen.

I would suggest if you elaborate your second query, you will get more valuable inputs from the community.

1
  • Hi Pankaj, Thanks for your quick response. I have java version 1.6.0_18 on my machine. For 2) right now we are using tridion templating and we are using java as frontend. I do not want to mix my new publication target with the current one. I am planning to create a new publication target which would be used to publish only DD4T stuff. Oct 20, 2015 at 8:38
1

The central idea is to publish content (Pages) to the Content Broker Database and retrieve them with the DD4T .NET MVC Application running a local instance of the Broker.

The publication target and deployer should enable Publishing to the Broker. Confirm the Broker database contains the Pages and Component Presentations.

The .NET MVC Application should have the lib folder within the bin folder, and the Content Delivery application should be setup and configured there. Also, the DLL files associated with the Content Delivery instance should be in the bin folder. The role of this application is to get content from the Content Broker, but not change anything there. The config files are often copied from the Deployer so you can easily access the Broker database.

License files will be needed in the DD4T application, as it is a Content Delivery instance. If you are running a 'customer' license file, you'll need a new license file for the solution. Otherwise, other license file types that are not tied to machines should work.

Finally, confirm your Java instance meets the requirements of Content Delivery. Also, be careful about 32 bit / 64 bit versions of the JAR files and DLLs. If you run the 64 bit DLLs, you may need to use the Local IIS instance (instead of the tiny Visual Studio server debugging instance) and also keep an eye on the IIS settings.

I've also posted some answers to common issues here on my blog.

2
  • Thanks Robert. The bin and lib folders are in place with 64 bit jars. Also placed the 64 bit dlls for deployer. I have copied the configs from deployer and haven't changed anything. Could it be due to licence files? I havent placed them yet. Where will they be placed? As I am using 64 bit jars and dlls I am using Local IIS instead of IIS express. The blog was useful while setting up the solution. I resolved 2-3 issues in my solution using the blog. Oct 21, 2015 at 11:27
  • I am using DD4T.Providers.Tridion2013 while my Tridion is 2013SP1. Could it be the reason? Whenever I change the provider to 2013SP1 it breaks the solution to great extent. Oct 21, 2015 at 11:31

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.