2

We are seeing the following errors repeatedly in the log files of the content service:

ERROR ContentV2Controller - Error handling Content V2 request. 
org.hibernate.LazyInitializationException: could not initialize proxy - no Session
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:165) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:286) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:185) ~[hibernate-core-4.3.9.Final.jar:4.3.9.Final]
at com.tridion.storage.TemplateMeta_$$_jvstd56_1d.getPriority(TemplateMeta_$$_jvstd56_1d.java) ~[cd_model-8.1.1-1005.jar:8.1.1-1005]
at com.sdl.web.content.wrappers.ComponentPresentationPropertyWrapper.<init>(ComponentPresentationPropertyWrapper.java:45) ~[content-v2-odata-types-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.builders.ComponentPresentationEntryBuilder.buildContent(ComponentPresentationEntryBuilder.java:78) ~[content-v2-odata-types-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.builders.EntryBuilder.constructEntry(EntryBuilder.java:76) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.builders.EntryBuilder.constructEntry(EntryBuilder.java:92) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.resolver.ResolverBase.buildEntry(ResolverBase.java:148) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.resolver.ResolverBase.buildEntry(ResolverBase.java:127) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.resolver.ComponentPresentationsResolver.buildComponentPresentationEntries(ComponentPresentationsResolver.java:144) ~[content-v2-odata-types-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.resolver.ComponentPresentationsResolver.resolveRelation(ComponentPresentationsResolver.java:44) ~[content-v2-odata-types-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.resolver.ResolverBase.resolve(ResolverBase.java:57) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.handler.ODataFeedRenderer.renderODataFeed(ODataFeedRenderer.java:57) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.resolver.EntryExpander.expandLink(EntryExpander.java:118) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.resolver.EntryExpander.expandEntry(EntryExpander.java:57) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.resolver.ResolverBase.buildEntry(ResolverBase.java:153) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.resolver.ResolverBase.buildEntry(ResolverBase.java:127) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.resolver.ComponentsResolver.buildComponentEntries(ComponentsResolver.java:127) ~[content-v2-odata-types-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.resolver.ComponentsResolver.resolveRelation(ComponentsResolver.java:43) ~[content-v2-odata-types-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.resolver.ResolverBase.resolve(ResolverBase.java:57) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.handler.ODataFeedRenderer.renderODataFeed(ODataFeedRenderer.java:57) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.handler.ODataWebHandler.handleODataEntity(ODataWebHandler.java:201) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.odata.input.handler.ODataWebHandler.handleResourceRequest(ODataWebHandler.java:175) ~[content-v2-odata-8.1.1-1008.jar:8.1.1-1008]
at com.sdl.web.content.controller.ContentV2Controller.handleResourceRequest(ContentV2Controller.java:91) ~[content-v2-controller-8.1.1-1008.jar:8.1.1-1008]
at sun.reflect.GeneratedMethodAccessor121.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_73]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_73]
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221) ~[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137) ~[spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:776) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:705) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843) ~[spring-webmvc-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) [tomcat-embed-websocket-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$ApplicationContextHeaderFilter.doFilterInternal(EndpointWebMvcAutoConfiguration.java:295) [spring-boot-actuator-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.springframework.boot.actuate.trace.WebRequestTraceFilter.doFilterInternal(WebRequestTraceFilter.java:102) [spring-boot-actuator-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.23.jar:8.0.23]
at com.sdl.web.readwrite.filter.ReadWriteFilter.doFilter(ReadWriteFilter.java:67) [web-readwrite-filter-8.1.1-1005.jar:8.1.1-1005]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.23.jar:8.0.23]
at com.tridion.ambientdata.web.AbstractAmbientDataServletFilter.doFilter(AbstractAmbientDataServletFilter.java:286) [web-ambient-client-8.1.1-1005.jar:8.1.1-1005]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.springframework.boot.actuate.autoconfigure.MetricsFilter.doFilterInternal(MetricsFilter.java:68) [spring-boot-actuator-1.2.5.RELEASE.jar:1.2.5.RELEASE]
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.1.7.RELEASE.jar:4.1.7.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1521) [tomcat-embed-core-8.0.23.jar:8.0.23]
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1478) [tomcat-embed-core-8.0.23.jar:8.0.23]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_73]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_73]
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.23.jar:8.0.23]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_73]

It doesn't occur on every request, but we are seeing about 40 of them per hour. Does anyone have an idea what might be causing this?

Our implementation is 100% database driven, Linux, DD4T 2.0.8 (Java), Tomcat, CIL, SDL Web 8.1.1.

2
+50

This looks to be issue similar to the one faced with discovery service due to hibernate configuration. This was fixed for in datalayer and hotfix was provided for discovery service in CD_8.1.1.2237.zip.

Can you try with latest hotfix of 8.1.1 content service which should include this fix ?

Alternatively, you can try setting a hibernate configuration which help resolving this issue. This can be done by adding below value to JVM options in startup or installation script of the service.

-Dhibernate.enable_lazy_load_no_trans=true

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.