5

We are in the middle of an upgrade from the web 8.5 in-process api to the web 8.5 restful api. Our webapp has jsp pages which are published out of SDL Web 8.5 and some jsp pages which are not. Most of these pages pull DCPs from the broker. We have run into an issue after performing the upgrade where we get the following exception when we attempt to access some of the pages:

[5/25/18 8:20:01:495 CDT] 000000c9 ServletWrappe E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0014E: Uncaught service() exception root cause /resources/aPath/aPathSegment/aPageName.jsp: com.ibm.websphere.servlet.error.ServletErrorReport: java.lang.NoClassDefFoundError: com/tridion/web/jsp/tag/ComponentPresentationHandler at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:732) at com.ibm._jsp._aPageName._jspService(_aPageName.java:831) at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1235) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:779) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178) at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:122) at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:220) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:143) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:96) at com.multibrand.security.SecurityFilter.doFilter(SecurityFilter.java:33) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:197) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:90) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:969) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1109) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4150) at com.ibm.ws.webcontainer.webapp.WebAppImpl.handleRequest(WebAppImpl.java:2208) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1030) at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:382) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:532) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:318) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:289) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138) at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204) at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775) at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1909) Caused by: java.lang.NoClassDefFoundError: com/tridion/web/jsp/tag/ComponentPresentationHandler at com.ibm._jsp._APageName._jspx_meth_tridion_ComponentPresentation_0(_APageName.java:3251) at com.ibm._jsp._APageName._jspService(_APageName.java:707) ... 35 more

When we first found this issue it was occurring on all of the pages which were pulling content using the new restful api, but then we found out that simply publishing the CMS managed pages fixed the issue on those pages. However, after publishing every page and component, the issue still persists on almost all of the jsp pages which are not managed in the CMS.

Things we have checked:

  • Our cd_tags.tld file has been upgraded to point to "com.sdl.web.content.tags.ComponentPresentationHandler" correctly.
  • The jsp pages where the exception is being thrown is including the correct tag library as:
  • We checked the source code of our java webapp, and we do not have the text "ComponentPresentationHandler" anywhere except in the cd_tags.tld file.

What could else might cause such an issue?

3

We figured out that it had to do with the way that WebSphere compiles .jsp files and stores them as byte code. From my understanding WebSphere does not store a reference to the include files in the compiled byte code, instead, it compiles each include mentioned in a jsp directly into each jsp file's bytecode. Clearing the entire server of code, and recompiling/redeploying the webapp fixed the issue for us.

An alternate way of fixing this is to slightly modify each .jsp file to force WebSphere to refresh the bytecode.

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.