Fraska Portal

Exploring the WebSphere Commerce world

WebSphere Commerce, troubleshooting SEO meta data

Posted by on in Administration
  • Font size: Larger Smaller
  • Hits: 4107
  • 28 Comments
  • Subscribe to this entry
  • Print

Few weeks ago I faced a NullPointerException concerning SEO meta data:

[10/9/13 18:16:53:133 CEST] 0000003d config        W com.ibm.commerce.foundation.internal.client.taglib.config.GetDataConfig$DataTypeConfig invokeClientFacadeMethod(Object clientFacade, GetType getVerb) 
                                 java.lang.NullPointerException
        at com.ibm.commerce.catalog.facade.server.services.search.metadata.SearchCatalogNavigationViewSEOTitleMetaDataFilter.getTitleAndMetaDescription(SearchCatalogNavigationViewSEOTitleMetaDataFilter.java:419)
        at com.ibm.commerce.catalog.facade.server.services.search.metadata.SearchCatalogNavigationViewSEOTitleMetaDataFilter.filter(SearchCatalogNavigationViewSEOTitleMetaDataFilter.java:222)
        at com.ibm.commerce.catalog.facade.server.services.dataaccess.bom.mediator.solr.SolrReadCatalogNavigationViewPostMediator.buildNounPart(SolrReadCatalogNavigationViewPostMediator.java:120)
        at com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.AbstractReadBusinessObjectMediatorImpl.buildNounParts(AbstractReadBusinessObjectMediatorImpl.java:99)
        at com.ibm.commerce.foundation.server.services.dataaccess.bom.mediator.AbstractReadBusinessObjectMediatorImpl.getNouns(AbstractReadBusinessObjectMediatorImpl.java:167)
        at com.ibm.commerce.foundation.server.command.bod.bom.AbstractFetchNounUsingBusinessObjectMediatorCmdImpl.performExecute(AbstractFetchNounUsingBusinessObjectMediatorCmdImpl.java:190)
        at com.ibm.commerce.catalog.facade.server.commands.FetchCatalogNavigationViewCmdImpl.performExecute(FetchCatalogNavigationViewCmdImpl.java:98)
        at com.ibm.commerce.foundation.internal.server.command.impl.CommandTarget.executeCommand(CommandTarget.java:66)
        at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)
        at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:138)
        at com.ibm.commerce.foundation.server.command.bod.AbstractGetBusinessObjectDocumentCmdImpl.performExpression(AbstractGetBusinessObjectDocumentCmdImpl.java:301)
        at com.ibm.commerce.foundation.server.command.bod.AbstractGetBusinessObjectDocumentCmdImpl.performExecute(AbstractGetBusinessObjectDocumentCmdImpl.java:153)
        at com.ibm.commerce.foundation.server.command.bod.BusinessObjectCommandTargetImpl.executeCommand(BusinessObjectCommandTargetImpl.java:112)
        at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)
        at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:138)
        at com.ibm.commerce.foundation.server.command.bod.BusinessObjectDocumentProcessor.processBusinessObjectDocument(BusinessObjectDocumentProcessor.java:216)
        at com.ibm.commerce.catalog.facade.server.CatalogFacadeImpl.getCatalogNavigationView(CatalogFacadeImpl.java:282)
        at com.ibm.commerce.catalog.facade.server.EJSLocalStatelessCatalog_867afe99.getCatalogNavigationView(EJSLocalStatelessCatalog_867afe99.java:811)
        at sun.reflect.GeneratedMethodAccessor221.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at com.ibm.commerce.foundation.internal.client.services.invocation.impl.LocalEJBInvocationBindingImpl.invoke(LocalEJBInvocationBindingImpl.java:199)
        at com.ibm.commerce.foundation.internal.client.services.invocation.InvocationService.invoke(InvocationService.java:113)
        at com.ibm.commerce.foundation.client.facade.bod.AbstractBusinessObjectDocumentFacadeClient.sendBusinessObjectDocument(AbstractBusinessObjectDocumentFacadeClient.java:451)
        at com.ibm.commerce.catalog.facade.client.AbstractCatalogFacadeClient.getCatalogNavigationView(AbstractCatalogFacadeClient.java:1765)
        at com.ibm.commerce.catalog.facade.client.AbstractCatalogFacadeClient.getCatalogNavigationView(AbstractCatalogFacadeClient.java:1827)
        at sun.reflect.GeneratedMethodAccessor291.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at com.ibm.commerce.foundation.internal.client.taglib.config.GetDataConfig$DataTypeConfig.invokeClientFacadeMethod(GetDataConfig.java:898)
        at com.ibm.commerce.foundation.internal.client.taglib.GetDataHandler.execute(GetDataHandler.java:738)
        at com.ibm.commerce.foundation.internal.client.taglib.GetDataTag.doTag(GetDataTag.java:388)
        at com.ibm._jsp._TopCategoryPage._jspService(_TopCategoryPage.java:1007)
        at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
        at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
        at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:259)
        at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:372)
        at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
        at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
        at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
        at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
        at com.ibm.commerce.struts.ECActionServlet.processRequest(ECActionServlet.java:225)
        at com.ibm.commerce.struts.ECActionServlet.doGet(ECActionServlet.java:166)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
        at com.ibm.commerce.campaigns.filter.CampaignsFilter.doFilter(CampaignsFilter.java:148)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.commerce.likeminds.filter.LikeMindsFilter.doFilter(LikeMindsFilter.java:183)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.commerce.dynacache.filter.CacheFilter$1.run(CacheFilter.java:377)
        at com.ibm.commerce.dynacache.filter.CacheFilter.doFilter(CacheFilter.java:508)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilterAction(RuntimeServletFilter.java:743)
        at com.ibm.commerce.webcontroller.RuntimeServletFilter.access$0(RuntimeServletFilter.java:535)
        at com.ibm.commerce.webcontroller.RuntimeServletFilter$1.run(RuntimeServletFilter.java:476)
        at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilter(RuntimeServletFilter.java:501)
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
        at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
        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:1613)
        

The resolution has been straightforward.

The exception was complaining about SearchCatalogNavigationViewSEOTitleMetaDataFilter.getTitleAndMetaDescription. So, first of all, I tried to figured out where the SEO meta data could be stored. I found the table SEOPAGEDEFDESC.

I had to understand if something was wrong, so I ran the following query:

SELECT * FROM SEOPAGEDEF WHERE SEOPAGEDEF.SEOPAGEDEF_ID NOT IN (SELECT SEOPAGEDEF_ID FROM SEOPAGEDEFDESC WHERE LANGUAGE_ID=-1)

and the result was 0. So, everything was fine for English (-1). Than I ran the same query but this time for Spanish:

SELECT * FROM SEOPAGEDEF WHERE SEOPAGEDEF.SEOPAGEDEF_ID NOT IN (SELECT SEOPAGEDEF_ID FROM SEOPAGEDEFDESC WHERE LANGUAGE_ID=-5)

The result was a list of seopagedef. These pages did not have any description in the specific language (in this case, Spanish).

So I just filled the missing values with INSERT queries like the following one:

 

INSERT INTO SEOPAGEDEFDESC (SEOPAGEDEF_ID,LANGUAGE_ID,TITLE,META_DESC,META_KEYWORD,IMAGE_ALT_DESC,LASTUPDATE,CREATEDTIME) VALUES (<seopagedefdesc_id>,-5,'<Title>','<Description>','','','2010-01-01 00:00:00.0','2010-01-01 00:00:00.0');

Of course, according with the customer, I set values for titles and descriptions could make sense. 

Populating properly SEOPAGEDEFDESC the exception disappeared.

 

Environment:

  • WebSphere Commerce v 7.0.0.6 FEP5
  • DB2 9.7

 

 

Rate this blog entry:
0

Comments

Leave your comment

Guest
Guest Tuesday, 22 October 2019

Most Popular Post

WebSphere Commerce, the curious life of a front-end catalog request
Core
Rate this blog entry:
5
WebSphere Commerce, the SOLR extension index
Administration
Rate this blog entry:
4
WebSphere Commerce, Data Load and SOLR Delta Index
Data Load
Rate this blog entry:
0

Latest Blogs

WebSphere Commerce, CommandLevelAuthorizationCache
Cache
Rate this blog entry:
0
WebSphere Commerce v8, toolkit exception, ClassNotFound db2
Administration
Rate this blog entry:
1
WebSphere Commerce, ATP migration
Store
Rate this blog entry:
0
WebSphere Commerce, the curious life of a front-end catalog request
Core
Rate this blog entry:
5
WebSphere Commerce, Performance analysis of few European stores
Performance
Rate this blog entry:
0