|
Home > Archive > WebSphere Commerce suite > March 2006 > contracts
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| Does anyone knows why after creating a new contract for a n organization (where an item is not allowed to be buyed) the following searches that matches this item throws an exception like:
[09/11/05 16:31:41:703 ART] 27ba27ba SystemOut O 2005.11.09 16:31:41.703 com.ibm.commerce.price.commands.SelectContractPricesCmdImpl handlePriceNotFoundException
CMN1011E: Unable to retrieve the price for catEntry 11212, quantity: 1.0, UOM: C62, currency: USD.
2005.11.09 16:31:41.734 com.ibm.commerce.price.commands.SelectContractPricesCmdImpl handlePriceNotFoundException
CMN1011E: Unable to retrieve the price for catEntry 11212, quantity: 1.0, UOM: C62, currency: USD.
2005.11.09 16:31:41.875 HttpForwardViewCommandImpl forwardDocument
CMN1244E: An error occurred when forwarding document /B2BDirectHostedStorefrontAssetStore/ShoppingArea/CatalogSection/SearchSubsection/CatalogSearchResultDisplay.jsp. javax.servlet.ServletException: An error occurred while evaluating custom action attri
bute "value" with value "${item.calculatedContractPrice}": An error occurred while getting property "calculatedContractPrice" from an instance of class com.ibm.commerce.catalog.beans.ItemDataBean (com.ibm.commerce.exception.ECApplicationException)javax.se
rvlet.ServletException: An error occurred while evaluating custom action attribute "value" with value "${item.calculatedContractPrice}": An error occurred while getting property "calculatedContractPrice" from an instance of class com.ibm.commerce.catalog.
beans.ItemDataBean (com.ibm.commerce.exception.ECApplicationException)
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java)
at javax.servlet.ServletException.<init>(ServletException.java:161)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:692)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher. handleWebAppDispatch(WebAppRequestDispat
cher.java)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java)
at com.ibm.commerce.command.HttpForwardViewCommandImpl. forwardDocument(HttpForwardViewCommandIm
pl.java:81)
at com.ibm.commerce.command.HttpForwardViewCommandImpl. performExecute(HttpForwardViewCommandImp
l.java:211)
at com.ibm.commerce.command.AbstractECCommand.execute(AbstractECCommand.java:247)
at com.ibm.commerce.webcontroller.JspExecUnit.execute(JspExecUnit.java:101)
at com.ibm.commerce.webcontroller.WebController.executeTransaction(WebController.java)
at com.ibm.commerce.webcontroller.WebController.processRequest(WebController.java:889)
at com.ibm.commerce.adapter.AbstractHttpAdapter.processRequest(AbstractHttpAdapter.java:330)
at com.ibm.commerce.server.RequestServlet$2.run(RequestServlet.java:1659)
at com.ibm.commerce.server.RequestServlet.service(RequestServlet.java:1751)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher. handleWebAppDispatch(WebAppRequestDispat
cher.java)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:212)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
2005.11.09 16:31:43.562 com.ibm.commerce.catalog.commands.ProductDisplayCmdImpl performExecute
The catalog entry number "11212" is not valid for the current contract.
2005.11.09 16:31:43.906 ECMessageHelper getCorrectiveActionMessageFromUserBundle
CMN0410E: Failed to retrieve from "Missing reource exception" the message with key "{1}".
and fowards to the generic error page?
thanks
| |
| BalajiRaghavan 2005-11-10, 2:49 am |
| Hi,
The error mentions that the item is not valid for the contract (which you have recently setup).
ItemDatabean.getCalculatedContractPrice() method will throw an ECException when there is no valid contract associated.
So, before we obtain the calculatedContractPrice we need to check if that item has calculatedContractPrice or not. This boolean is available using the property ${item.calculatedContractPriced}.
You can use the above boolean property for test before obtaining the value ${item.calculatedContractPrice} in your JSP.
Make the above change to your JSP & let me know if that fixes your problem.
Regards,
Balaji Raghavan
| |
|
| Do you mean it is an error of the Commerce when you exclude an item from a catalog?
Is there a way to avoid this error by accelerator, or another part of the commerce?
Up to now I made several modifications to the jsp and extensions of the code, but I think that the application could not be broken in such a way only by making a contract, a frequently task done by the administrators.
| |
| BalajiRaghavan 2005-11-11, 7:50 am |
| Hi,
I am not sure if its a known problem with commerce code or not. May be it is for the version level you are on & possibly a fix may be available. In the meantime, please try making the changes as suggested & let me know if you still have problems.
Regards,
Balaji Raghavan
| |
|
| I suggest you rebuild your workspace fully. If the server is not supporting hot deployment, you may be still working with old class file even though you have made changes in your Java file by adding the required property.
One more, to make sure, do the following
1. make sure your ItemDataBean is having an attribute calculatedContractPrice and a public access method "public <datatype> getCalculatedContractPrice()" in it.
2. make sure that you are making changes to right class (class com.ibm.commerce.catalog.beans.ItemDataBean)
3. make sure that you import the same bean in your jsp page
4. make sure that you rebuild your entire project before starting the server
Let me know if your problem is resolved
| |
|
| What's happening is you are calling a command which retrieves information about that specific catalog item which currently has the BUYABLE column value set to 0 (At least that's what it sounds like). What seems to be happening is that its either not retr
ieving the price from the OFFERPRICE (May also be that your availability date is set past the current date) table or it's seeing that it's not buyable so it just ignores the price altogether. However, where it says the following:
2005.11.09 16:31:43.562 com.ibm.commerce.catalog.commands.ProductDisplayCmdImpl performExecute
The catalog entry number "11212" is not valid for the current contract.
I would make sure that you've associated that catalog item with the new contract. But the error below:
2005.11.09 16:31:41.875 HttpForwardViewCommandImpl forwardDocument
CMN1244E: An error occurred when forwarding document /B2BDirectHostedStorefrontAssetStore/ShoppingArea/CatalogSection/SearchSubsection/CatalogSearchResultDisplay.jsp. javax.servlet.ServletException: An error occurred while evaluating custom action attribu
te "value" with value "${item.calculatedContractPrice}":
The "${item.calculatedContractPrice}" is nothing more than JSTL expression. So this error is saying that its not able to retrieve the calculatedContractPrice for the variable "item" stored as an attribute within "page" scope.
The first step I would take is to ensure that you've associated the catalog item with the new contract and that the new contract is associated with a store. If you're sure that is correct then make sure that you've correctly associated pricing with t
his product. Even if you have to make a false entry within the OFFERPRICE / LISTPRICE tables, it will be able to calculate the price but will not allow a customer to purchase the product.
|
|
|
|
|