Thursday, March 29, 2018

EJB Bean and table relation in ibm wcs

Some time i want to see custome access bean belongs to which table.

You search for map.mapxmi this file have linking og table with bean.


For OOB beans refer below URL :

Cross-reference of data beans, EJB beans, and tables

Wednesday, March 21, 2018

IBM WCS Toolkit - java.lang.ClassNotFoundException: com.ibm.db2.jcc.am.SqlDataException



ISSUE:
Frist time after starting WCS V8, I hit store URL and i got below exception:
The exception seems to derive from the class: com.ibm.commerce.foundation.server.command.bod.BusinessObjectDocumentProcessor
In particular, this class makes a check about the existing masked exceptions; the list of values of the masked exceptions is contained in the following file:
 IBM\WCDE80\workspace\WC\xml\config\com.ibm.commerce.foundation\wc-component.xml
<_config:configgrouping name="BusinessObjectDocumentProcessor">
    <_config:property name="maskedExceptionClassList" value="java.sql.SQLException,com.ibm.db2.jcc.am.SqlDataException,com.ibm.commerce.foundation.server.services.dataaccess.exception.QueryServiceSystemException"/>
</_config:configgrouping>
The above code contains- in the maskedExceptionClassList property- the class com.ibm.db2.jcc.am.SqlDataException.
 However, the system is not using DB2 but Oracle, so it's pretty normal an exception is thrown and the class is not found.


[3/21/18 12:02:57:315 IST] 000000f6 BusinessObjec W com.ibm.commerce.foundation.server.command.bod.BusinessObjectDocumentProcessor static com.ibm.db2.jcc.am.SqlDataException
                                 java.lang.ClassNotFoundException: com.ibm.db2.jcc.am.SqlDataException
 at java.lang.Class.forNameImpl(Native Method)
 at java.lang.Class.forName(Class.java:256)
 at com.ibm.commerce.foundation.server.command.bod.BusinessObjectDocumentProcessor.<clinit>(BusinessObjectDocumentProcessor.java:141)
 at java.lang.J9VMInternals.initializeImpl(Native Method)
 at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
 at com.ibm.commerce.catalog.facade.server.CatalogFacadeImpl.getCatalog(CatalogFacadeImpl.java:56)
 at com.ibm.commerce.catalog.facade.server.EJSLocalStatelessCatalog_867afe99.getCatalog(EJSLocalStatelessCatalog_867afe99.java:845)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:95)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
 at java.lang.reflect.Method.invoke(Method.java:620)
 at com.ibm.commerce.foundation.internal.client.services.invocation.impl.LocalEJBInvocationBindingImpl.invoke(LocalEJBInvocationBindingImpl.java:211)
 at com.ibm.commerce.foundation.internal.client.services.invocation.InvocationService.invoke(InvocationService.java:113)
 at com.ibm.commerce.foundation.client.facade.bod.AbstractBusinessObjectDocumentFacadeClient.internalSendBusinessObjectDocument(AbstractBusinessObjectDocumentFacadeClient.java:813)
 at com.ibm.commerce.foundation.client.facade.bod.AbstractBusinessObjectDocumentFacadeClient.sendBusinessObjectDocument(AbstractBusinessObjectDocumentFacadeClient.java:529)
 at com.ibm.commerce.catalog.facade.client.AbstractCatalogFacadeClient.getCatalog(AbstractCatalogFacadeClient.java:186)
 at com.ibm.commerce.catalog.facade.client.AbstractCatalogFacadeClient.getCatalog(AbstractCatalogFacadeClient.java:371)
 at com.ibm.commerce.catalog.facade.client.AbstractCatalogFacadeClient.getCatalog(AbstractCatalogFacadeClient.java:397)
 at com.ibm.commerce.catalog.facade.server.cache.DefaultCatalogCache$MyDefaultCatalogCacheableDataAndDependencyIdGenerator.generateCacheableData(DefaultCatalogCache.java:117)
 at com.ibm.commerce.datatype.AbstractFinderResult.invokeFinder(AbstractFinderResult.java:622)
 at com.ibm.commerce.datatype.CacheableFinderResult.invokeFinder(CacheableFinderResult.java:195)
 at com.ibm.commerce.dynacache.commands.AbstractFinderResultCache.myInvokeFinder(AbstractFinderResultCache.java:1526)
 at com.ibm.commerce.dynacache.commands.AbstractFinderResultCache.invokeFinder(AbstractFinderResultCache.java:1161)
 at com.ibm.commerce.dynacache.commands.AbstractDistributedMapCache$Cache.getOrPut(AbstractDistributedMapCache.java:520)
 at com.ibm.commerce.dynacache.commands.AbstractDistributedMapCache$Cache.access$3(AbstractDistributedMapCache.java:507)
 at com.ibm.commerce.dynacache.commands.AbstractDistributedMapCache.getOrPut(AbstractDistributedMapCache.java:285)
 at com.ibm.commerce.catalog.facade.server.cache.DefaultCatalogCache.getDefaultCatalogId(DefaultCatalogCache.java:168)
 at com.ibm.commerce.catalog.facade.server.helpers.CatalogComponentHelper.getDefaultCatalogId(CatalogComponentHelper.java:6272)
 at com.ibm.commerce.seo.registry.SEOConfigurationRegistry.populateStoreUrlKeywords(SEOConfigurationRegistry.java:552)
 at com.ibm.commerce.seo.registry.SEOConfigurationRegistry.initialize(SEOConfigurationRegistry.java:306)
 at com.ibm.commerce.seo.registry.SEOConfigurationRegistry.initializeRegistry(SEOConfigurationRegistry.java:1644)
 at com.ibm.commerce.seo.registry.SEOConfigurationRegistry.singleton(SEOConfigurationRegistry.java:843)
 at com.ibm.commerce.seo.url.helpers.SEOURLMapperImpl.getStoreIdFromSEOURL(SEOURLMapperImpl.java:1636)
 at com.ibm.commerce.seo.url.helpers.SEOURLMapperImpl.processRequestURL(SEOURLMapperImpl.java:1743)
 at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilterAction(RuntimeServletFilter.java:647)
 at com.ibm.commerce.webcontroller.RuntimeServletFilter.access$0(RuntimeServletFilter.java:614)
 at com.ibm.commerce.webcontroller.RuntimeServletFilter$1.run(RuntimeServletFilter.java:458)
 at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilter(RuntimeServletFilter.java:500)
 at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:195)
 at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:91)
 at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:967)
 at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1107)
 at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3926)
 at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:304)
 at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1007)
 at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1817)
 at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:200)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:463)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:530)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:316)
 at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:287)
 at com.ibm.ws.ssl.channel.impl.SSLConnectionLink.determineNextChannel(SSLConnectionLink.java:1049)
 at com.ibm.ws.ssl.channel.impl.SSLConnectionLink$MyReadCompletedCallback.complete(SSLConnectionLink.java:643)
 at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$SSLReadCompletedCallback.complete(SSLReadServiceContext.java:1818)
 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:1881)

 Resolution:
1) edit the file
  --> IBM\WCDE80\workspace\WC\xml\config\com.ibm.commerce.foundation\wc-component.xml
 and change the property maskedExceptionClassList with the following value:
 java.sql.SQLException,com.ibm.commerce.foundation.server.services.dataaccess.exception.QueryServiceSystemException

 After change value:

  <_config:configgrouping name="BusinessObjectDocumentProcessor">
   <_config:property name="maskedExceptionClassList" value="java.sql.SQLException,com.ibm.commerce.foundation.server.services.dataaccess.exception.QueryServiceSystemException"/>
  </_config:configgrouping>

 2) restart the test server