6

We are facing issue with DXA Java 1.4. We have installed all services (i.e. discovery, Session, Context) to Linux server. When we add discovery service URL to cd_client_conf.xml and CWD_client_conf.xml.

It throws null exception and data is not appearing on the page.

Moreover with similar settings we installed all services to windows server and add discovery URL to both configuration files we are able to get data on page.

We also tried combination of these 2 services like in cd_client_conf.xml we added discovery service URL of linux server and in cwd_client_conf.xml we added discovery service URL of windows server, then page is coming fine with data coming from linux discovery service.

Can you please help me what is the dependency of cwd_Client_conf.xml file for the rendering of the page and what we have missed on Linux server to install these services.

Configuration settings:

enter image description here

We went ahead and applied all the Hotfixes available on Web 8.1.1 version. CD_8.1.1.1752.zip, CD_8.1.1.1876.zip, CD_8.1.1.1957.zip, CD_8.1.1.2049.zip, CD_8.1.1.2121.zip

Still we are facing same issue with Context service installed on Linux: Error logs:

2016-07-22 16:56:08,742 [27] ERROR - An error occurred while resolving evidence using the Context Service. Sdl.Web.Common.DxaException: An error occurred while resolving evidence using the Context Service. ---> Microsoft.OData.Client.DataServiceQueryException: An error occurred while processing this request. ---> Microsoft.OData.Client.DataServiceClientException: BadRequest at Microsoft.OData.Client.QueryResult.ExecuteQuery() at Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents) --- End of inner exception stack trace --- at Microsoft.OData.Client.DataServiceRequest.Execute[TElement](DataServiceContext context, QueryComponents queryComponents) at Microsoft.OData.Client.DataServiceQuery1.Execute() at Microsoft.OData.Client.DataServiceQuerySingle1.GetValue() at Sdl.Web.Context.OData.Client.Caller.IoDataContextEngineServiceCaller.Resolve(String serialisedEvidence) at Sdl.Web.Context.OData.Client.ODataContextEngine.Resolve(IEvidence evidence) at Sdl.Web.Tridion.Context.ContextServiceClaimsProvider.GetContextClaims(String aspectName) --- End of inner exception stack trace --- at Sdl.Web.Tridion.Context.ContextServiceClaimsProvider.GetContextClaims(String aspectName) at Sdl.Web.Mvc.Context.ContextEngine..ctor() at Sdl.Web.Mvc.Configuration.WebRequestContext.get_ContextEngine() at Sdl.Web.Mvc.Configuration.WebRequestContext.get_MaxMediaWidth() at Sdl.Web.Mvc.Html.BaseMediaHelper.GetResponsiveWidth(String widthFactor, Int32 containerSize) at Sdl.Web.Mvc.Html.BaseMediaHelper.GetResponsiveImageUrl(String url, Double aspect, String widthFactor, Int32 containerSize) at Sdl.Web.Common.Models.Image.ToHtml(String widthFactor, Double aspect, String cssClass, Int32 containerSize) at Sdl.Web.Mvc.Html.HtmlHelperExtensions.Media(HtmlHelper helper, MediaItem media, String widthFactor, Double aspect, String cssClass, Int32 containerSize) at ASP._Page_Areas_Ceair_Views_Entity_HeroBannerHeadingLeft_cshtml.Execute() in Page\Areas\Ceair\Views\Entity\HeroBannerHeadingLeft.cshtml:line 8

Due to this context service issue Images are not rendering with DXA.Net 1.4 but content is coming fine. and With Java DXA 1.4 we are getting internal server issue on the page.

Context Service Output and access from my local system: enter image description here

We have tried the workaround steps mentioned by Rick:

We have updated Content(Session) Service with the help of these 2 Urls: http://docs.sdl.com/LiveContent/content/en-US/SDL%20Web-v1/GUID-65379730-BB26-4712-B104-B467BD0C23D0#addHistory=true&filename=GUID-7C6C74E2-DC82-4EFF-87B8-C7509E5F0C92.xml&docid=GUID-7C6C74E2-DC82-4EFF-87B8-C7509E5F0C92&inner_id=&tid=&query=&scope=&resource=&toc=false&eventType=lcContent.loadDocGUID-7C6C74E2-DC82-4EFF-87B8-C7509E5F0C92

http://docs.sdl.com/LiveContent/content/en-US/SDL%20DXA-v5/GUID-9127A28E-5DF8-45C9-B64D-2EC2C5280195#addHistory=true&filename=GUID-9127A28E-5DF8-45C9-B64D-2EC2C5280195.xml&docid=GUID-9127A28E-5DF8-45C9-B64D-2EC2C5280195&inner_id=&tid=&query=&scope=&resource=&toc=false&eventType=lcContent.loadDocGUID-9127A28E-5DF8-45C9-B64D-2EC2C5280195

We are getting following error when starting content(session) service.

2016-07-26 15:22:01,045 ERROR PersistentContextRepository - Context repository rules have not been pre-initialised in context repository, spin up will be slightly slower. Please re-initialise your repository. 2016-07-26 15:22:11,649 ERROR EngineFactory - Unable to configure the AmbientData Framework com.tridion.configuration.ConfigurationException: Cannot find claim processor configuration provider class: com.sdl.context.ambient.ContextEngineClaimProcessorConfigProvider at com.tridion.ambientdata.EngineFactory.claimProcessorDefinitionFromConfig(EngineFactory.java:101) ~[web-ambient-engine-8.1.1-1005.jar:8.1.1-1005] at com.tridion.ambientdata.EngineFactory.cartridgeDefinitionFromConfig(EngineFactory.java:70) ~[web-ambient-engine-8.1.1-1005.jar:8.1.1-1005] at com.tridion.ambientdata.EngineFactory.newEngine(EngineFactory.java:45) ~[web-ambient-engine-8.1.1-1005.jar:8.1.1-1005] at com.sdl.web.content.ambient.service.AmbientServiceProvider.init(AmbientServiceProvider.java:53) [content-ambient-extension-8.1.1-1008.jar:8.1.1-1008] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:349) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:300) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755) [spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at com.sdl.delivery.service.ServiceContainer.main(ServiceContainer.java:43) [service-container-core-8.1.1-1007.jar:8.1.1-1007] Caused by: java.lang.ClassNotFoundException: com.sdl.context.ambient.ContextEngineClaimProcessorConfigProvider at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_91] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_91] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_91] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_91] at java.lang.Class.forName0(Native Method) ~[na:1.8.0_91] at java.lang.Class.forName(Class.java:264) ~[na:1.8.0_91] at com.tridion.ambientdata.EngineFactory.claimProcessorDefinitionFromConfig(EngineFactory.java:97) ~[web-ambient-engine-8.1.1-1005.jar:8.1.1-1005] ... 25 common frames omitted 2016-07-26 15:22:12,433 ERROR SpringApplication - Application startup failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ambientServiceProvider': Invocation of init method failed; nested exception is com.sdl.odata.api.processor.datasource.ODataDataSourceException: Error while initialising Ambient Data Framework

Thanks Piyush Jain

  • I have seen this block, But still not found any solution yet. – Piyush Jain Jul 24 '16 at 15:10
  • It looks like your context service, while installed, isn't actually working. Have you tried accessing it directly yourself to see what kind of errors you get? Have you checked the logs for the context service? – Peter Kjaer Jul 25 '16 at 6:53
  • Updated output of Context service – Piyush Jain Jul 25 '16 at 8:02
  • Apparently, the Context Service on Linux is sending a Bad Request (400) response. Do you see a trace of this in the Context Service log files? – Rick Pannekoek Jul 25 '16 at 18:46
1

Given your analysis, this seems like a defect in the Context Service (client). I would recommend reporting this to SDL Customer Support for further analysis and resolution.

As a work-around, you can configure DXA to get the Context Claims from ADF instead of from Context Service:

If you do this, you have to ensure that you enable the Context Cartridge in your Content Service. In that manner the Context Claims are provided by the Content Service instead of the Context Service.

Such an ADF-based configuration is known to have worse performance, so should be considered a work-around.

  • Thanks Rick but after following the steps we are not able to start content (Session) service. Error logs added above – Piyush Jain Jul 27 '16 at 11:18
  • We have updated Content(Session) Service with the help of these 2 Urls: – Piyush Jain Jul 27 '16 at 13:56
1

There is a known issue in the Unix start.sh script for the Context Service which can cause 400 errors if the user-agent string contains encoded slashes. The workaround is to add the following Java System Properties to the top of the start.sh script:

JVM_OPTIONS="-Xrs -Xms256m -Xmx256m -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true -Dorg.apache.catalina.connector.CoyoteAdapter.ALLOW_BACKSLASH=true"

This property is already set in the Windows startup scripts, and will be addressed in the Unix startup script in future versions. Note that this might also impact you if you are running a load balancer in front of your service - as these may also reject these encoded slashes in the parameters. This will also be addressed in a future release (via double-encoding).

  • Yes After this fix we are able to run page with Linux hosted service. – Piyush Jain Jul 28 '16 at 14:23
0

After adding this parameters with JVM_Options, we are able to resolve this issue. Please let me know when we get any further update on this. Thanks a lot.

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.