This discussion is archived
14 Replies Latest reply: Dec 17, 2012 8:34 AM by Gautam Singh RSS

CONTAINER:atg.servlet.jsp.ContainerJspException

AVM Newbie
Currently Being Moderated
Hi,
In crs, when i am attempting "guest checkout" i am getting the following error.

14:37:48,273 ERROR [DynamoServlet]
CAUGHT AT:
CONTAINER:atg.servlet.jsp.ContainerJspException: Can't find property: initSingleShippingForm in class atg.commerce.order.purchase.ShippingGroupFormHandler; SOURCE:atg.droplet.DropletException: Can't find property: initSingleShippingForm in class atg.commerce.order.purchase.ShippingGroupFormHandler

pls help.

Edited by: 973657 on Dec 8, 2012 12:28 AM
  • 1. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    GopinathRamasamy Journeyer
    Currently Being Moderated
    Hi,

    Guest checkout is working perfectly fine for me with CRS.

    Is it always occurring even after restarting the application?

    Thanks,
    Gopinath Ramasamy
  • 2. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    Gautam Singh Journeyer
    Currently Being Moderated
    This seems like a defect in CRS as I didn't see any getter/setter or handle method for initSingleShippingForm in ShippingGroupFormHandler.
    Do you see any functional impact of this? This exception is thrown if a property is referenced in JSP but cannot be found though it should not stop page from rendering.
  • 3. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    AVM Newbie
    Currently Being Moderated
    I have just extended the ShippingInfoFormHandler and override the handleCreateAndMoveToBilling method. After that only i am facing this issue.

    _My class which extends ShippingInfoFormHandler_

    public class MyShippingFormHandler extends ShippingInfoFormHandler {

    public boolean handleCreateAndMoveToBilling(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
                   throws ServletException, IOException {
                        
                        
                        System.out.println(" handleCreateAndMoveToBilling**************");
                        
         
                   return super.handleCreateAndMoveToBilling(pRequest, pResponse);
                   }
    }

    The poperty file (config/atg/commerce/order/purchase/ShippingGroupFormHandler.properties)

    # @version $Id: //hosting-blueprint/B2CBlueprint/version/10.0.2/EStore/config/atg/commerce/order/purchase/ShippingGroupFormHandler.properties#2 $$Change: 635969 $


    $class=com.shp.MyShippingFormHandler

    repriceOrderChainId=repriceOrder

    shippingHelper=/atg/store/order/purchase/ShippingProcessHelper
    checkoutOptionSelections=/atg/store/order/purchase/CheckoutOptionSelections
    placeUtils=/atg/commerce/util/PlaceUtils

    shippingGroupInitializers=\
    hardgoodShippingGroup=/atg/commerce/order/purchase/HardgoodShippingGroupInitializer

    # consolidate all commerce item infos prior to apply the information to the order.
    consolidateShippingInfosBeforeApply=true

    # Valid values'true' or 'false'. If 'true' shipping restrictions are validated using the component defined against 'shippingRestrictionComponent' property
    validateShippingRestriction=true

    # Component used to validate shipping restrictions. Component declared here should implement ShippingRestrictionInterface interface.

    checkoutProgressStates=/atg/store/states/CheckoutProgressStates
    couponCode^=/atg/store/order/purchase/CouponFormHandler.couponCode
  • 4. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    GopinathRamasamy Journeyer
    Currently Being Moderated
    Hi,

    initSingleShippingForm is not a property and so it does not have any getter and setter. It actually refers to the handle method, handleInitSingleShippingForm in<PATH_TO_CRS>/Store/EStore/src/atg/projects/store/order/purchase/ShippingInfoFormHandler.java

    In CRS, in <PATH_TO_CRS>/Store/Storefront/j2ee-apps/Storefront/store.war/checkout/gadgets/shippingInitialize.jsp,

    the below code refer to this.

    <c:if test='${initSingleShippingForm == "true"}'>
    <dsp:setvalue bean="ShippingGroupFormHandler.initSingleShippingForm" value=""/>
    </c:if>

    One of the hidden use of <dsp:setvalue> tag is to call a handle method without clicking anything in a jsp (on page load etc.,). This is what is being done here.

    ShippingInfoFormHandler's handleInitSingleShippingFormis called here via ShippingGroupFormHandler.initSingleShippingForm from the jsp on the page load itself after checking the param.

    When you try to extend or customize, you must use this a handle method. If you treat it as a property you would end up in property npt found execption (which you have encountered).

    Hope this helps.

    Keep posting your updates/questions.

    Thanks,
    Gopinath Ramasamy.
  • 5. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    AVM Newbie
    Currently Being Moderated
    I have tried using the handle 'handleInitSingleShippingForm' and 'handleInitMultipleShippingForm' within while customizing the formhandler.
    Still i am getting the same errors as earlier.
  • 6. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    GopinathRamasamy Journeyer
    Currently Being Moderated
    Hi,

    Can you post the code in the jsp where you are referring to this init method?

    Thanks,
    Gopinath Ramasamy
  • 7. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    AVM Newbie
    Currently Being Moderated
    This is the page :
    shippingInitialize.jsp

    <%-- This page will initialize the data object needed to organize shipping --%>
    <%-- It takes the following parameters: --%>
    <%-- 1. init - true or false: --%>
    <%-- 2. oneInfoPerUnit: true or false --%>
    <%-- 3. initSingleShippingForm: true or false: --%>
    <%-- 4. initMultipleShippingForm: true or false: --%>

    <dsp:page>

    <dsp:importbean bean="/atg/commerce/order/purchase/ShippingGroupDroplet"/>
    <dsp:importbean bean="/atg/commerce/order/purchase/ShippingGroupFormHandler"/>

    <dsp:getvalueof var="init" param="init"/>
    <c:if test='${init == "true"}'>
    <dsp:droplet name="ShippingGroupDroplet">
    <dsp:param name="createOneInfoPerUnit" param="oneInfoPerUnit"/>
    <dsp:param name="clearShippingInfos" param="init"/>
    <dsp:param name="clearShippingGroups" param="init"/>
    <dsp:param name="shippingGroupTypes" value="hardgoodShippingGroup"/>
    <dsp:param name="initShippingGroups" param="init"/>
    <dsp:param name="initBasedOnOrder" param="init"/>
    <dsp:oparam name="output"/>
    </dsp:droplet>
    </c:if>


    <dsp:getvalueof var="initSingleShippingForm" param="initSingleShippingForm"/>
    <c:if test='${initSingleShippingForm == "true"}'>
    <dsp:setvalue bean="ShippingGroupFormHandler.initSingleShippingForm" value=""/>
    </c:if>

    <dsp:getvalueof var="initMultipleShippingForm" param="initMultipleShippingForm"/>
    <c:if test='${initMultipleShippingForm == "true"}'>
    <dsp:setvalue bean="ShippingGroupFormHandler.initMultipleShippingForm" value=""/>
    </c:if>

    </dsp:page>

    <%-- @version $Id: //hosting-blueprint/B2CBlueprint/version/10.0.2/Storefront/j2ee/store.war/checkout/gadgets/shippingInitialize.jsp#2 $$Change: 635969 $--%>
  • 8. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    GopinathRamasamy Journeyer
    Currently Being Moderated
    Hi,

    I believe this is the jsp from the CRS application. This is working fine for me.

    Are you trying to use any custom jsp?

    Also, please check whether this jsp and the guest checkout flow is working fine when you remove your customizations (by making the ShippingGroupFormHandler to point to ShippingiInfoFormHandler).

    Thanks,
    Gopinath Ramasamy
  • 9. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    Gautam Singh Journeyer
    Currently Being Moderated
    Can you browse to ShippingGroupFH in Dynamo admin component browser and make sure it is using you class which as you said extends CRS class ShippingInfoFormHandler
    http://localhost:8080/dyn/admin/nucleus/atg/commerce/order/purchase/ShippingGroupFormHandler

    In the page the fist line after component path will tell you which class it is using. If its different then your class it means your configuration for ShippingGroupFormHandler is not picked up.
    Share content of ShippingGroupFormHandler.properties
  • 10. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    AVM Newbie
    Currently Being Moderated
    @ Gopinath Ramasamy

    I have not customized the jsp page. If I remove my customization (ShippingGroupFormHandler to point to MyShippingFormHandler) it works fine. But i actually wish to customize "handleCreateAndMoveToBilling" method of ShippingInfoFormHandler.

    @ Gautam Singh      

    I have browsed through that link, it shows :

    ###########################

    Service /atg/commerce/order/purchase/ShippingGroupFormHandler/
    Class atg.commerce.order.purchase.ShippingGroupFormHandler
    Canonical Path: /atg/dynamo/servlet/pipeline/RequestScopeManager/RequestScope-12/atg/commerce/order/purchase/ShippingGroupFormHandler

    ###########################

    ShippingGroupFormHandler.properties_

    The poperty file (config/atg/commerce/order/purchase/ShippingGroupFormHandler.properties)

    # @version $Id: //hosting-blueprint/B2CBlueprint/version/10.0.2/EStore/config/atg/commerce/order/purchase/ShippingGroupFormHandler.properties#2 $$Change: 635969 $

    $class=com.shp.MyShippingFormHandler

    repriceOrderChainId=repriceOrder

    shippingHelper=/atg/store/order/purchase/ShippingProcessHelper
    checkoutOptionSelections=/atg/store/order/purchase/CheckoutOptionSelections
    placeUtils=/atg/commerce/util/PlaceUtils

    shippingGroupInitializers=\
    hardgoodShippingGroup=/atg/commerce/order/purchase/HardgoodShippingGroupInitializer

    # consolidate all commerce item infos prior to apply the information to the order.
    consolidateShippingInfosBeforeApply=true

    # Valid values'true' or 'false'. If 'true' shipping restrictions are validated using the component defined against 'shippingRestrictionComponent' property
    validateShippingRestriction=true

    # Component used to validate shipping restrictions. Component declared here should implement ShippingRestrictionInterface interface.

    checkoutProgressStates=/atg/store/states/CheckoutProgressStates
    couponCode^=/atg/store/order/purchase/CouponFormHandler.couponCode
  • 11. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    GopinathRamasamy Journeyer
    Currently Being Moderated
    Hi,

    If you want to just customize that handle method alone, it is enough to make your ShippingGroupFormHandler.properties to point to MyShippingGroupFormHandler. So, in your ShippingGroupFormHandler.properties file, having the below line itself is enough.

    $class=com.shp.MyShippingFormHandler

    Rest of the properties are picked up as per config layering from the OOTB file.

    Please try with this approach. Keep posting the updates.

    Thanks,
    Gopinath Ramasamy
  • 12. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    AVM Newbie
    Currently Being Moderated
    Hi Gopinath Ramasamy,

    I have tried the same. Still i am getting errors:

    15:53:53,296 ERROR [DynamoServlet]
    java.lang.NullPointerException
    at atg.projects.store.order.purchase.ShippingInfoFormHandler.getGiftShippingGroups(ShippingInfoFormHandler.java:699)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at atg.droplet.DropletDescriptor.getPropertyValue(DropletDescriptor.java:469)
    at atg.droplet.DropletDescriptor.getPropertyValue(DropletDescriptor.java:585)
    at atg.taglib.dspjsp.GetValueOfTag.calculateValue(GetValueOfTag.java:232)
    at atg.taglib.dspjsp.GetValueOfTag.doStartTag(GetValueOfTag.java:275)
    at org.apache.jsp.checkout.shipping_jsp._jspx_meth_dsp_005fgetvalueof_005f5(shipping_jsp.java:1036)
    at org.apache.jsp.checkout.shipping_jsp._jspx_meth_dsp_005fpage_005f1(shipping_jsp.java:585)
    at org.apache.jsp.checkout.shipping_jsp._jspService(shipping_jsp.java:144)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:322)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:249)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at atg.servlet.ForwardFilter.doFilter(ForwardFilter.java:234)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444)
  • 13. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    GopinathRamasamy Journeyer
    Currently Being Moderated
    Hi,

    Can you please check your shipping helper component is initialized? If not, please add the below line in your ShippingGroupFormHandler.properties

    shippingHelper=/atg/store/order/purchase/ShippingProcessHelper

    Keep posting the updates / questions.

    Thanks,
    Gopinath Ramasamy
  • 14. Re: CONTAINER:atg.servlet.jsp.ContainerJspException
    Gautam Singh Journeyer
    Currently Being Moderated
    The issue is your config is not picked by ATG. Make sure that you have you config path defined correctly in your module which seems like
    //hosting-blueprint/B2CBlueprint/version/10.0.2/EStore/
    in //hosting-blueprint/B2CBlueprint/version/10.0.2/EStore/META-INF/MANIFEST.MF
    define ATG config path as
    ATG-Config-Path: config/config.jar config/

    Also it seems like you are modifying the CRS module directly(ideally you create your own module with depenedency on CRS), so I guess you still have to define other properties in your properties file as you mentioned in earlier post.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points