Posts

LdapAdapter getDateString(Object) WIMSystemException CWWIM1998E Unparseable date

After LDAP integration in toolkit environment while testing integration we came across following exception. com.ibm.ws.wim.adapter.ldap.LdapAdapter getDateString(Object)                                  com.ibm.websphere.wim.exception.WIMSystemException: CWWIM1998E  Durante l'elaborazione si รจ verificato il seguente errore di sistema: 'java.text.ParseException: Unparseable date: "20190610101654.793-0000Z"'. at com.ibm.ws.wim.adapter.ldap.LdapAdapter.getDateString(LdapAdapter.java:4000) at com.ibm.ws.wim.adapter.ldap.LdapAdapter.setPropertyValue(LdapAdapter.java:4047) at com.ibm.ws.wim.adapter.ldap.LdapAdapter.populateEntity(LdapAdapter.java:3906) at com.ibm.ws.wim.adapter.ldap.LdapAdapter.createEntityFromLdapEntry(LdapAdapter.java:1527) at com.ibm.ws.wim.adapter.ldap.LdapAdapter.get(LdapAdapter.java:1629) at com.ibm.ws.wim.ProfileManager.getImpl(ProfileManager.java:1756) at com.ibm.ws.wim.ProfileManager.genericProfileManagerMethod(ProfileManager.

IBM WebSphere Commerce - Payment related debugging - AEDPPIEditCtrlCmdImpl getOrderIdByEDPPIID

Here I am going to share my recent experience in debugging a payment related issue. This issue started occurring all of a sudden without any recent changes to the code. All the orders were failing after entering the payment information. Error log for the issue was as below. [9/27/17 0:31:23:137 EST] 0000002e CommerceSrvr A AEDPPIEditCtrlCmdImpl getOrderIdByEDPPIID Object of type payment instruction with primary key 79,172 could not be found in the database. [9/27/17 0:31:23:139 EST] 0000002e ExtendedInfo I CWXFR9010I: Extended information : [URL=http://localhost/webapp/wcs/stores/servlet/webapp/wcs/stores/servlet/XPaymentProcessCmd] [parameters=signature=+Yuun7p7fwRo6hgHvdf4CBz2lNvrKUN/BtKbQZgFsue= encryptedparameters=2SDSwUkztXgotmmLbKuB+P2ZoiX1Rd65ai3932yezsdHLI2wb1deUvHoNKzaP9KvXsedZd0SgLBWjv+COHyZXTLyFEDXBcfCcYBFzkgTc2JdTl3XAjKai4KbGp0sJ8haesjbeZKIavF6AK7LjdsF05guWvsEkQ6ymn7OvK9UvLrIQDTT1/UNW4i9G/qXJ3WIYp3H8E1BCHS+HfFj/1wS/ORpartRTNxwYCloHwT4qjPVr/toH2LWtzNTICMEdgJ4We+SzSS

IBM WebSphere Commerce - PriceRule related debugging - ResolveOrderItemPriceCmdImpl handleNullPriceException

Image
Couple of months back in my work I was assigned with an issue of Add to cart not working in our toolkit environment. The error logs was like below. [8/1/17 16:43:34:296 CEST] 0000015c CommerceSrvr A com.ibm.commerce.orderitems.commands.ResolveOrderItemPriceCmdImpl handleNullPriceException CMN1011E: Unable to retrieve the price for catEntry 420472, quantity: 1.0, unit of measure: C62, and currency: null. [8/1/17 16:43:34:297 CEST] 0000015c ExtendedInfo I CWXFR9010I: Extended information : [URL=http://localhost/webapp/wcs/stores/servlet/AjaxOrderChangeServiceItemAdd] [parameters=calculationUsage=-1,-2,-3,-4,-5,-6,-7 orderId=. quantity=1 catalogId=15451 langId=-1 catEntryId=420472 storeId=11352 ] [userId=-1002] [8/1/17 16:43:34:298 CEST] 0000015c MessageMappin C com.ibm.commerce.foundation.server.command.soi.MessageMappingCmdImpl createBusinessObjectDocumentResponse(CommandProperty, ControllerCommand) No customized message mapping error or response cmd found for errorCommand:

Adding new cookie from controller command - IBM WebSphere Commerce

In a previous post we have seen how to fetch a cookie value in controller command . Here in this post we will see how to add a new cookie from a controller command. For fetching the cookie value in controller command we first obtained the http servlet request object from the command context. But in order to add a new cookie we need to get the http servlet response object. Below is sample code to get the http servlet response object from command context, create a new cookie and to add the cookie to the response. RuntimeHttpServletResponseWrapper httpServletRes = (RuntimeHttpServletResponseWrapper) ((CacheProxyResponse) (((ViewCommandContext) getCommandContext()).getResponse())) .getResponse(); Cookie cookie = new Cookie("MyCookie", "MyCookieValue"); //optionally you may use these methods to set other parameters as required //cookie.setDomain() //cookie.setMaxAge() //cookie.setPath() httpServletRes.addCookie(cookie); Hope t

Generating JAXB classes from an XML using RAD

Java Architecture for XML Binding (JAXB) is a framework that allows Java developers to map Java classes to XML representations. JAXB provides two main features: the ability to marshal Java objects into XML and the inverse, i.e. to unmarshal XML back into Java objects. Below are the steps for generating JAXB classes: Create a new folder under ServerExtensionsLogic project and copy the XML to it. Right click on XML > Generate > XML Schema. Step 2 will create a schema definition file in the specified folder. Right click the newly created xsd file > Generate > Java. From the XSD to Java dialog, select Generator 'Schema to JAXB Java Classes' and click Next. Select Target Java Container (java project inside which the newly created classes to be placed) and specify value for Target Package (package for the newly created classes). Click Finish. Refresh the Target Java Container project you mentioned in the previous step and navigate to the package you specifi

Enabling the shipment notification e-mail - IBM WebSphere Commerce

In WebSphere Commerce you need to make following configuration change for enabling shipment notification e-mail. The default command registry entry is mapped to ReleaseShipNotifyDummyImpl which does nothing. If you change the mapping to ReleaseShipNotifyCmdImpl it will enable the application to send notification message when the order release is shipped. Procedure Update the CMDREG mapping for ReleaseShipNotifyCmd: update cmdreg set classname='com.ibm.commerce.messaging.commands.ReleaseShipNotifyCmdImpl' where interfacename='com.ibm.commerce.messaging.commands.ReleaseShipNotifyCmd' By default, the Release_WCS_ShipmentNotify message is disabled by using ReleaseShipNotifyDummyImpl as the CLASSNAME in the CMDREG database table. The ReleaseShipNotifyDummyImpl is a dummy implementation which does nothing. The default JSP, ReleaseShipNotify.jsp, for the XML message is located in the following directory: WC_eardir/Stores.war Deploy updates to this file using

Creating and adding elements to a list in JSTL

There are plenty of places in WebSphere Commerce out-of-the-box code where we can see code to iterate over a list in JSTL. But I feel that code to create and add items to list in JSTL are rare and hence lot of developers (atleast beginners) do not know how to do that. I recently came across and used this code to create and add items to an arraylist in JSP using JSTL. And I thought I need to note it down somewhere so I can refer in future. Sample code below: <wcf:useBean var="sampleList" classname="java.util.ArrayList"/> ... <c:set var="sampleVar" value="val"/> <wcf:set target="${sampleList}" value="${sampleVar}"/> Once you created the list, you can iterate through and process it as required. <c:forEach items="${sampleList}" var="eachVal"> <c:out value="${eachVal}" /> </c:forEach> Hope this help someone. Feel free to share t