Fraska Portal

Exploring the WebSphere Commerce world

Francesco Schettini

Francesco Schettini

Freelance e-Commerce Solution Architect focused on web development projects using technologies like WebSphere, SOLR, JEE and Eclipse RCP.

contacts:
blog: fschettini.com
linkedIn: es.linkedin.com/in/fschettini

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)
        
Small presentation introduce Data Load- development, running, customizations and a real use case- on WebSphere Commerce v7.

WebSphere Commerce by default includes more than 200 policies to meet the most common access control needs of the different kind of business models. To simplify the handling of these policies, Commerce arranges them in groups, calles Policy Groups where the Organizations can subscribe to.

 WebSphere Commerce Policy Groups

The InfoCenter reports the list of the policy groups.

The default policies are organized into two levels:

  1. Role Based also called Command Level (complete list);
  2. Resource Level (complete list).  

Hence, the Policy Manager checks:

  1. if the user is allowed to execute the Command (command level)
  2. if the user is allowed to access the Resource (resource level)

The resource level check is done only if the command level check is satisfied.

 

The authorizations are basically rules allow a group of users to run set of actions on specific resources according to defined relationships.

Users, Actions and Resources in WebSphere Commerce

WebSphere Commerce defines those rules with XML assertions called policies. Each policy is defined in the following way:

<Policy Name="value"
        OwnerId="value"
        UserGroup="value"
        UserGroupOwner="value"
        ActionGroupName="value"
        ResourceGroupName="value"
        PolicyType="value"
        RelationName="value"
        RelationGroupName="value"
        RelationGroupOwner="value">
</Policy>

The persistent side- stored in the DB- has the following data model mapped with the previous definition:

WebSphere Commerce Data Access Control Model

In the posts I found browsing around I could not get the exact working configuration for my environment, so I think it can help someone out review the configuration steps I made to integrated MySQL db with Play!.

Environment:

  • Mac OS X 10.7.5
  • MySQL 5.1.44
  • Eclipse 4.2 Juno
  • JVM 1.6.0_43
  • Play! 2.1.0

Most Popular Post

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
WebSphere Commerce, the curious life of a front-end catalog request
Core
Rate this blog entry:
5

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