WebSphere Commerce 7 | Management Center | Customer Segment Failed to Save | Error Code CMN0207E

When we tried to Create/Update Customer Segment, it is failing to save and throwing the following exception (With Error Code: CMN0207E),

[1/9/17 10:41:55:286 GMT] 00000d64 AbstractChang I com.ibm.commerce.foundation.server.command.bod.AbstractChangeBusinessObjectDocumentCmdImpl save(Map) The com.ibm.commerce.member.facade.server.commands.ChangeMemberGroupCmdImpl.save(Map) was not implemented and the default behavior does not invoke any logic.  It is recommend to implement this method.
[1/9/17 10:41:55:852 GMT] 00000d64 CommerceSrvr  A com.ibm.commerce.scheduler.commands.AddBroadcastJobCmdImpl validateParameters CMN0207E The value of the parameter "name" is not correct.
[1/9/17 10:41:55:852 GMT] 00000d64 ExtendedInfo  I   CWXFR9010I: Extended information : [componentId=com.ibm.commerce.member]
[1/9/17 10:41:55:853 GMT] 00000d64 ExtendedInfo  I   CWXFR9010I: Extended information : [componentId=com.ibm.commerce.member]
[1/9/17 10:41:55:855 GMT] 00000d64 ExtendedInfo  I   CWXFR9010I: Extended information : [componentId=com.ibm.commerce.member]
[1/9/17 10:41:55:858 GMT] 00000d64 ExtendedInfo  I   CWXFR9010I: Extended information : [componentId=com.ibm.commerce.member]
[1/9/17 10:41:55:853 GMT] 00000d64 BusinessObjec E   CMN0207E The value of the parameter "name" is not correct.

Correlation Identity: 61f647de:15974236cb5:-7a79
Additional Data:
        null
Current exception:
Message:
   _ERR_CMD_INVALID_PARAM
Stack trace:
com.ibm.commerce.exception.ECApplicationException: CMN0207E The value of the parameter "name" is not correct.
        at com.ibm.commerce.scheduler.commands.AddBroadcastJobCmdImpl.validateParameters(AddBroadcastJobCmdImpl.java:146)
        at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:135)
        at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:332)
        at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:166)

Issue:

1. While saving any information in Management Center, it will pass "SiteAdminID", which has been mentioned in <Instance> tag of wc-server.xml. This value should be a valid user in the application


2. In our application, "wcsadmin" user is not available as we have deleted that user.
3. The application is trying to find this user and as it is available it is throwing the exception. And also, failed to save the same.

com.ibm.commerce.tools.segmentation.SegmentCache
Possible fixes:
 - Update wc-server.xml <Instance> tag with active user & password with wcsadmin access. Eg: siteadmin
 - Create the user which has been mentioned in wc-server.xml <Instance> tag with wcsadmin access

WebSphere Commerce 7 | IBM Developer Works | How to post questions in IBM Developer Works?

1. Login to IBM Developer Works
https://www.ibm.com/developerworks/

2. Search for "WebSphere Commerce" forum in the top right Search text box

3. In the resultant forums, click on the appropriate forum


4. Start the topic and provide details of your question & post of the same


WebSphere Commerce 7 | Solr | Preprocess failed to run | SolrCore 'collection1' is not available | Could not load config file "search/solr/home/collection1/solrconfig.xml"

After migrating custom Solr files and if you try to run Solr Preprocess, sometimes you might face the following exceptions in running di-preprocess command,

INFO: Solr server core MC_10001_CatalogEntry_Unstructured_en_US status is initialized.
Aug 5, 2016 1:51:45 PM com.ibm.commerce.foundation.dataimport.process.DataImportProcessorMain executeDIH
INFO: Solr server core MC_10001_CatalogEntry_Unstructured_es_ES status is initialized.
Aug 5, 2016 1:51:45 PM null null
INFO: CWPKI0027I: Disabling default hostname verification for HTTPS URL connections.
Aug 5, 2016 1:51:46 PM com.ibm.commerce.foundation.dataimport.util.DataImportHelper printException
INFO: Data import process was unsuccessful. An unrecoverable error has occurred.
Throwable occurred: org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException: Expected mime type application/octet-stream but got text/html. Error 500: {msg=SolrCore &#39;collection1&#39; is not available due to init failure: Could not load config file /opt/IBM/WebSphere/CommerceServer70/instances/live/search/solr/home/collection1/solrconfig.xml,trace=org.apache.solr.common.SolrException: SolrCore &#39;collection1&#39; is not available due to init failure: Could not load config file /opt/IBM/WebSphere/CommerceServer70/instances/live/search/solr/home/collection1/solrconfig.xml
        at org.apache.solr.core.CoreContainer.getCore&#40;CoreContainer.java:827&#41;
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter&#40;SolrDispatchFilter.java:317&#41;
        at com.ibm.commerce.foundation.internal.server.services.search.servlet.solr.SolrSearchDispatchFilter.doFilter&#40;SolrSearchDispatchFilter.java:100&#41;
        at org.apache.solr.servlet.SolrDispatchFilter.doFilter&#40;SolrDispatchFilter.java:217&#41;
        ...........
        ...........
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready&#40;HttpInboundLink.java:278&#41;
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators&#40;NewConnectionInitialReadCallback.java:214&#41;
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete&#40;NewConnectionInitialReadCallback.java:113&#41;
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted&#40;AioReadCompletionListener.java:175&#41;
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback&#40;AbstractAsyncFuture.java:217&#41;
        at com.ibm.io.async.AsyncChannelFuture$1.run&#40;AsyncChannelFuture.java:205&#41;
        at com.ibm.ws.util.ThreadPool$Worker.run&#40;ThreadPool.java:1662&#41;
Caused by: org.apache.solr.common.SolrException: Could not load config file /opt/IBM/WebSphere/CommerceServer70/instances/live/search/solr/home/collection1/solrconfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal&#40;CoreContainer.java:530&#41;
        at org.apache.solr.core.CoreContainer.create&#40;CoreContainer.java:597&#41;


Ideally, there won't be any "collections1" folder in the WebSphere Commerce Solr files. This might have happened because couple of Solr configuration files are missed in Search folder of the WebSphere Commerce installation directory.

Check whether all the Seach configurations files are in place and it should resolve your issue.

WebSphere Commerce 7 | Storefront | Product Display Page | "Add to Cart" button failed to load | CMN0420E | CWXFR9010I

After publishing new store in the Extended Sites, all the prices are coming up fine. But, in the Product Display Page, "Add to Cart" button is not getting displayed and it is throwing the following exception,

[8/11/16 5:42:31:712 GMT] 00000069 CommerceSrvr  E com.ibm.commerce.command.ECCommandTarget executeCommand CMN0420E: The following command exception has occurred during processing: "java.lang.NullPointerException". java.lang.NullPointerException
        at com.ibm.commerce.price.commands.PriceRuleGetContractUnitPriceCmdImpl.getRuleExecutionCommand(PriceRuleGetContractUnitPriceCmdImpl.java:512)
        at com.ibm.commerce.price.commands.PriceRuleGetContractUnitPriceCmdImpl.executeRule(PriceRuleGetContractUnitPriceCmdImpl.java:419)
        at com.ibm.commerce.price.commands.PriceRuleGetContractUnitPriceCmdImpl.calculatePrices(PriceRuleGetContractUnitPriceCmdImpl.java:198)
        at com.ibm.commerce.price.commands.PriceRuleGetContractUnitPriceCmdImpl.performExecute(PriceRuleGetContractUnitPriceCmdImpl.java:123)
        ...........
        ...........
        at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:199)
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.execute(AbstractGetPriceCmdImpl.java:1306)
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.executeNextInChain(AbstractGetPriceCmdImpl.java:1224)
        at com.ibm.commerce.price.commands.EnsureOffersExistGetContractUnitPriceCmdImpl.performExecute(EnsureOffersExistGetContractUnitPriceCmdImpl.java:220)
        ...........
        ...........
        at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:263)
        at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:100)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_set_274(_CachedProductOnlyDisplay.java:16947)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_when_32(_CachedProductOnlyDisplay.java:17015)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_choose_20(_CachedProductOnlyDisplay.java:17304)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_if_64(_CachedProductOnlyDisplay.java:17346)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspService(_CachedProductOnlyDisplay.java:3099)
        at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        at com.ibm.ws.cache.servlet.ServletWrapper.serviceProxied(ServletWrapper.java:307)
        at com.ibm.ws.cache.servlet.CacheHook.handleFragment(CacheHook.java:576)
        ..............
        ..............
[8/11/16 5:42:31:713 GMT] 00000069 ExtendedInfo  I   CWXFR9010I: Extended information : [URL=http://localhost/webapp/wcs/stores/servlet/ProductDisplay] [parameters=storeId[0]=10651 storeId[1]=10651 parent_category_rn=40722 productId[0]=5750001 productId[1]=5750001 urlRequestType=Base categoryId=40792 top_category=40718 catalogId[0]=12051 catalogId[1]=12051 langId[0]=-24 langId[1]=-24 ] [userId=-1002]
[8/11/16 5:42:31:715 GMT] 00000069 CommerceSrvr  E com.ibm.commerce.command.ECCommandTarget executeCommand CMN0420E: The following command exception has occurred during processing: "java.lang.NullPointerException". java.lang.NullPointerException
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.createFromOutput(AbstractGetPriceCmdImpl.java:578)
        at com.ibm.commerce.price.commands.EnsureOffersExistGetContractUnitPriceCmdImpl.performExecute(EnsureOffersExistGetContractUnitPriceCmdImpl.java:222)
        at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
        at com.ibm.ws.cache.command.CommandCache.executeCommand(CommandCache.java:332)
        at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:166)
        at com.ibm.commerce.command.MeasuredCacheableCommandImpl.execute(MeasuredCacheableCommandImpl.java:63)
        at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:199)
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.execute(AbstractGetPriceCmdImpl.java:1306)
        at com.ibm.commerce.price.commands.AbstractGetPriceCmdImpl.executeNextInChain(AbstractGetPriceCmdImpl.java:1224)
        at com.ibm.commerce.price.commands.CompositeGetContractUnitPriceCmdImpl.executeCommand(CompositeGetContractUnitPriceCmdImpl.java:339)
        at com.ibm.commerce.price.commands.CompositeGetContractUnitPriceCmdImpl.performExecute(CompositeGetContractUnitPriceCmdImpl.java:230)
        .............
        .............
        at javax.el.BeanELResolver.getValue(BeanELResolver.java:65)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
        at org.apache.el.parser.AstValue.getValue(AstValue.java:102)
        at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:263)
        at org.apache.jasper.el.JspValueExpression.getValue(JspValueExpression.java:100)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_set_274(_CachedProductOnlyDisplay.java:16947)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_when_32(_CachedProductOnlyDisplay.java:17015)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_choose_20(_CachedProductOnlyDisplay.java:17304)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspx_meth_c_if_64(_CachedProductOnlyDisplay.java:17346)
        at com.ibm._jsp._CachedProductOnlyDisplay._jspService(_CachedProductOnlyDisplay.java:3099)
        at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
        ............
        ............


When we tried to validate Price Lists & Price Rules for the store, it looks fine. But, there were no default Customer Segment and Price Rules setup in Commerce Accelerator and after setting up them from Commerce Accelerator, it started coming fine.

Here are the steps to setup default Customer Segments and Price rules,
1. Login to Commerce Accelerator
2. Select "Merchandise" --> "Catalog Filter and Price Rule"
3. In the "Catalog Filter" tab, set property value for the Catalog filter number


4. In the "Price Rule" tab, set property value for the Price Rule

WebSphere Commerce 7 | Solr | Preprocess Command failed to run | ERRORCODE=-4229, SQLSTATE=null | SQLCODE=-803, SQLSTATE=23505 | TI_APGROUP_0

Sometimes, we might face issue of Solr Preprocess failed with the following exceptions and it is because of Data issue in Categories and Catalog entries,
com.ibm.commerce.foundation.dataimport.preprocess.CatalogHierarchyDataPreProcessor determineCatalogEntriesForCatalog(Connection connection, String catalogID)
INFO: The catalog with ID: 10001 contains 18769 catalog entries.
com.ibm.db2.jcc.am.BatchUpdateException: [jcc][t4][102][10040][4.19.49] Batch failure.  The batch was submitted, but at least one exception occurred on an individual member of the batch.
Use getNextException() to retrieve the exceptions for specific batched elements. ERRORCODE=-4229, SQLSTATE=null
        at com.ibm.db2.jcc.am.kd.a(Unknown Source)
        at com.ibm.db2.jcc.am.Agent.endBatchedReadChain(Unknown Source)
        at com.ibm.db2.jcc.am.gp.a(Unknown Source)
        at com.ibm.db2.jcc.am.gp.c(Unknown Source)
        at com.ibm.db2.jcc.am.gp.executeBatch(Unknown Source)
        at com.ibm.commerce.foundation.dataimport.preprocess.CatalogHierarchyDataPreProcessor.populateTable(CatalogHierarchyDataPreProcessor.java:1271)
        at com.ibm.commerce.foundation.dataimport.preprocess.CatalogHierarchyDataPreProcessor.process(CatalogHierarchyDataPreProcessor.java:676)
        at com.ibm.commerce.foundation.dataimport.preprocess.CatalogHierarchyDataPreProcessor.process(CatalogHierarchyDataPreProcessor.java:448)
        at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.processDataConfig(DataImportPreProcessorMain.java:1072)
        at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.execute(DataImportPreProcessorMain.java:942)
        at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.main(DataImportPreProcessorMain.java:385)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:267)
Aug 9, 2016 2:21:04 PM com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain processDataConfig(DataProcessingConfig, String)
INFO: Error for batch element #172: DB2 SQL Error: SQLCODE=-803, SQLSTATE=23505, SQLERRMC=1;WCSDB.TI_APGROUP_0, DRIVER=4.19.49
Aug 9, 2016 2:21:04 PM com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain processDataConfig(DataProcessingConfig, String)
INFO: SQL:
Aug 9, 2016 2:21:04 PM com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain logExitCode
INFO:
The program exiting with exit code: 1.
Data import pre-processing was unsuccessful. An unrecoverable error has occurred.


This issue might have happend because one Category is mapped with multiple Categories or One Product might be mapped with multiple Categories. Here are the queries to find these entries,

select catentry_id, catgroup_id from catgpenrel where catentry_id in (select catentry_id from catgpenrel where catalog_id = 10001 group by catentry_id having count(catentry_id) > 1)

select catgroup_id_parent, catgroup_id_child from catgrprel where catalog_id = 10001 and catgroup_id_child in (select catgroup_id_child from catgrprel where catalog_id = <catalogId> group by catgroup_id_child having count(catgroup_id_child) > 1)

Once these Catalog entries and groups issue has been fixed, re run Preprocesss command and it should work fine.

WebSphere Commerce 7 | Local setup of WCS & IBM HTTP Server | Not able to hit local server | Request is not reaching to WAS

I got some weird issue in my local environment where WebSphere Commerce Server was able to start properly. But, I am not able open Storefront pages as the request is not reaching the Application Server.

Later, I have realized it was happened because IBM HTTP Server was not started.


After, WebSphere Commerce installation in the local environment and on top of it, IBM HTTP Server has been installed so that Static content will be served from Web Server instead of WCS Application Server as mentioned in the following document,
http://www.ibm.com/developerworks/library/co-config-httpserver-was/


As part of this IBM HTTP Server installation, you might have run Jython Script so that, Ports  80, 443 will be used by HTTP Server. Later, you will be able to hit only local WebSphere Commerce Server through IBM HTTP Server itself.

If we stop HTTP Server and try to hit Storefront, it will not reach the WebSphere Commerce Server. In the future, if you don't want to use IBM HTTP Server and directly, hit WCS Server itself, then update Jython Script "configureWCPorts.py".

AdminTask.modifyServerPort ('server1', '[-nodeName localhost -endPointName WC_defaulthost -host localhost -port 80 -modifyShared true]')


AdminTask.modifyServerPort ('server1', '[-nodeName localhost -endPointName WC_defaulthost_secure -host localhost -port 443 -modifyShared true]')

AdminTask.modifyServerPort ('server1', '[-nodeName localhost -endPointName WC_PORT_4 -host localhost -port 18006 -modifyShared true]')AdminConfig.save()

And run the following Jython Script as mentioned in the document,
wsadmin -lang jython -f configureWCPorts.py -conntype NONE


Now, you should be able to hit WebSphere Application Server directly with out IBM HTTP Server.

WebSphere Commerce 7 | Solr Search | Running Preprocess is failing | CWFDIH0001 | CWFDIH0002 | ERRORCODE=-4461, SQLSTATE=42815

After Solr setup, when we tried to run di-preprocess command, it failing with the following exception,
       
Table name:     TI_GROUPING_0
Fetch size:     500
Batch size:     500
Aug 3, 2016 9:23:59 AM com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain logExitCode
INFO:
The program exiting with exit code: 1.
Data import pre-processing was unsuccessful. An unrecoverable error has occurred.

Aug 3, 2016 9:23:59 AM com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain logEndDateAndTime
INFO: Data import pre-processing ended:Wed Aug 03 09:23:59 GMT 2016
Aug 3, 2016 9:23:59 AM com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain logEndDateAndTime
INFO: Data import pre-processing completed in 4.287 seconds.
Aug 3, 2016 9:23:59 AM com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain handleExecutionException
SEVERE: Exception message: CWFDIH0001: Data Import encountered a generic error. The error is CWFDIH0002: An SQL exception was caught. The following error occurred: [jcc][1091][10404][4.19.49] Invalid data conversion: Parameter instance 5711501;5711502 is invalid for the requested conversion. ERRORCODE=-4461, SQLSTATE=42815.. , stack trace: com.ibm.commerce.foundation.dataimport.exception.DataImportSystemException: CWFDIH0001: Data Import encountered a generic error. The error is CWFDIH0002: An SQL exception was caught. The following error occurred: [jcc][1091][10404][4.19.49] Invalid data conversion: Parameter instance 5711501;5711502 is invalid for the requested conversion. ERRORCODE=-4461, SQLSTATE=42815..
        at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.processDataConfig(DataImportPreProcessorMain.java:1112)
        at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.execute(DataImportPreProcessorMain.java:942)
        at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.main(DataImportPreProcessorMain.java:385)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:267)
Caused by: com.ibm.commerce.foundation.dataimport.exception.DataImportSystemException: CWFDIH0002: An SQL exception was caught. The following error occurred: [jcc][1091][10404][4.19.49] Invalid data conversion: Parameter instance 5711501;5711502 is invalid for the requested conversion. ERRORCODE=-4461, SQLSTATE=42815.
        at com.ibm.commerce.foundation.dataimport.preprocess.AbstractDataPreProcessor.insertColumns(AbstractDataPreProcessor.java:284)
        at com.ibm.commerce.foundation.dataimport.preprocess.StaticAttributeDataPreProcessor.process(StaticAttributeDataPreProcessor.java:365)
        at com.ibm.commerce.foundation.dataimport.preprocess.DataImportPreProcessorMain.processDataConfig(DataImportPreProcessorMain.java:1072)
        ... 7 more
Caused by: com.ibm.db2.jcc.am.SqlSyntaxErrorException: [jcc][1091][10404][4.19.49] Invalid data conversion: Parameter instance 5711501;5711502 is invalid for the requested conversion. ERRORCODE=-4461, SQLSTATE=42815


From the log file, we have noticed two catentries - 5711501;5711502 and we tried validate from the database, one Catentry is parent to another catentry. But where as both catentries has CATENTTYPE_ID has 'ProductBean' itself.

We have corrected the Catentries and rerun the di-preprocess, it was successful

WebSphere Commerce 7 | Storefront | Failed to compile JSP | SRVE0293E | JSPG0049E | Exceeding the 65535 bytes limit


Once the new code has been deployed to WebSphere Commerce environment and hit the Category Page, it starting throwing the following Exception,

[8/4/16 7:29:13:700 GMT] 00000059 webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[/DefaultStorefrontAssetStore/Layouts/SearchBasedCategoryPage.jsp]: com.ibm.ws.jsp.JspCoreException: JSPG0049E: /DefaultStorefrontAssetStore/Layouts/SearchBasedCategoryPage.jsp failed to compile :

/opt/IBM/WebSphere/AppServer/profiles/live/temp/WC_myNode_node/server1/WC_live/Stores.war/DefaultStorefrontAssetStore/Layouts/_SearchBasedCategoryPage.java : 967 : The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit

        at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.translateJsp(AbstractJSPExtensionServletWrapper.java:620)
        at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper._checkForTranslation(AbstractJSPExtensionServletWrapper.java:487)
        at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.checkForTranslation(AbstractJSPExtensionServletWrapper.java:340)
        at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:156)
        at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:374)
        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:232)
        at com.ibm.commerce.struts.ECActionServlet.doGet(ECActionServlet.java:173)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
        at com.ibm.commerce.struts.ECActionServlet.service(ECActionServlet.java:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)

       
To fix the issue, here are the steps,
  • Login to WAS Administration Console
  • Navigate to Servers --> Server Types --> WebSphere application servers
  • Click on server1
  • In Configuration Tab, Click on Container Settings --> Web Container Settings --> Web Container
  
  • Click on Additional Properties --> Custom properties


  •  Click on New and provide the custom property,
          Name : com.ibm.wsspi.jsp.disableResourceInjection
          Value: true

  •  Restart the server

WebSphere Commerce 7 | Queries | Enable/Disable Site Administrators

Here are few queries related to enabling/disabling Site Administrators in WebSphere Commerce,

-- Query to check Site Admins
select u1.users_id, status, plcyacct_id, logonid, u2.REGISTERTYPE, u2.dn, u2.REGISTRATION from userreg u1, users u2 where u1.users_id = u2.users_id and u2.REGISTERTYPE not in ('R', 'G');

-- Disable all Site Admins
update userreg set status = 0 where logonid in (select logonid from userreg u1, users u2 where u1.users_id = u2.users_id and u2.REGISTERTYPE not in ('R', 'G'));

-- Enable all Site Admins
update userreg set status = 1 where logonid in (select logonid from userreg u1, users u2 where u1.users_id = u2.users_id and u2.REGISTERTYPE not in ('R', 'G'));

-- Disable Site Admin
update userreg set status = 0 where logonid = 'siteadmin'

-- Enable Site Admin
update userreg set status = 1 where logonid = 'siteadmin'

WebSphere Commerce 7 | Setting up New Stores | Queries for setting new LANGUAGE & CURRENCY

If you wanted to setup a new store which supports the LANGUAGE and CURRENCY,  which is not supported by Out of Box WebSphere Commerce then you need to setup this new LANGUAGE and CURRENCY.

Here are tables associated with LANGUAGE,
 - LANGUAGE
 - LANGPAIR
 - LANGUAGEDS
 

Here are tables associated with CURRENCY,
 - SETCURR
 - SETCURRDSC
 - CURFORMAT
 - CURFMTDESC


For example, if you wanted to setup new language_id "en_UK" and currency as "EUR", here are the queries,
 

-- Setting new languages
insert into LANGUAGE values (-24, 'en_UK', 'en', 'UK', null, 'UTF-8', 'iso-8859-1', null);

insert into LANGPAIR(storeent_id, language_id, language_id_alt, sequence) values (-1, -24, -1, 100.0);

insert into LANGUAGEDS(language_id, description, language_id_desc) values (-24, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-23, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-22, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-21, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-20, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-10, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-9, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-8, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-7, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-6, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-5, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-4, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-3, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-2, 'United Kingdom English', -24);
insert into LANGUAGEDS(language_id, description, language_id_desc) values (-1, 'United Kingdom English', -24);

-- Setting new currencies

insert into SETCURR (setccurr, setccode, setcexp) values ('EUR', 604, -2);
insert into SETCURRDSC (setccurr, language_id, description) values ('EUR', -1, 'Euro');
insert into SETCURRDSC (setccurr, language_id, description) values ('EUR', -24, 'Euro');
insert into CURFORMAT (storeent_id, setccurr, roundingmultiple,numbrusg_id, roundingmethod, decimalplaces, minapproveamount) values (-1,'EUR', 1, -1,'R', 2, NULL);
insert into CURFMTDESC (storeent_id, NUMBRUSG_ID, setccurr, language_id, currencysymbol, customizedcurrstr, currencyprefixpos, currencysuffixpos, displaylocale, currencyprefixneg, currencysuffixneg, radixpoint, groupingchar, numberpattern, description) values
(-1, -1, 'EUR', -1, '&euro;', null, '&euro;&nbsp;', null, null, '-&euro;&nbsp;', null, null, null, '#,##0.00', 'Euro');
insert into CURFMTDESC (storeent_id, NUMBRUSG_ID, setccurr, language_id, currencysymbol, customizedcurrstr, currencyprefixpos, currencysuffixpos, displaylocale, currencyprefixneg, currencysuffixneg, radixpoint, groupingchar, numberpattern, description) values
(-1, -1, 'EUR', -5, '&euro;', null, '&euro;&nbsp;', null, null, '-&euro;&nbsp;', null, null, null, '#,##0.00', 'Euro');
insert into CURFMTDESC (storeent_id, NUMBRUSG_ID, setccurr, language_id, currencysymbol, customizedcurrstr, currencyprefixpos, currencysuffixpos, displaylocale, currencyprefixneg, currencysuffixneg, radixpoint, groupingchar, numberpattern, description) values
(-1, -1, 'EUR', -24, '&euro;', null, '&euro;&nbsp;', null, null, '-&euro;&nbsp;', null, null, null, '#,##0.00', 'Euro');
commit;


-- Store related entries
insert into storelang values (-24, 10001, NULL, 1)
insert into storelang values (-24, 10051, NULL, 1)
insert into storelang values (-24, 10101, NULL, 1)

insert into storeentds values (-24, 10001, 'Extended Sites Hub', NULL, 'Extended Sites Hub', NULL, 1);
insert into storeentds values (-24, 10051, 'CAS_AS', NULL, 'Catalog Asset Store', NULL, 1);
insert into storeentds values (-24, 10101, 'DefaultStorefrontAssetStore', NULL, 'DefaultStorefrontAssetStore Storefront Asset Store entity', NULL, 1);


-- Catalog related entries
insert into catalogdsc values (10001, -24, 'CAT_AS', NULL, 'Catalog Asset Store', NULL, NULL, 1); 

My Writings........

Salesforce | Administration | Email-to-Case | Create Cases using Email-to-Case

Email to Case Setup ·        Click on Email-to-Case ·         Enable the following flags, ·        Provide the Routing Addres...