Skip to Content
author's profile photo Former Member
Former Member

Runtime Error while adding configurable products to the shopping basket

Hi All,

We have implemented ERP B2B ECommerce 6.0 using IPC 6.0 for the pricing and configuration needs. On the B2B webshop, I can configure the configurable products using Knowledge Base in IPC. I can add non-configurable products to the shopping basket and can create a sales order in ECC via Ecommerce. But, if I try to add the configurable products to the shopping basket before or after the configuration then I get the following Runtime Error. The entire error log for the runtime error is as follows:

Please let me know the steps in detail to fix this error.

Thanks in advance.

--R D

-


Error Log

Runtime Errors

Contact the administrator

java.lang.NullPointerException

at com.sap.isa.core.eai.sp.jco.BackendBusinessObjectBaseSAP.getDefaultJCoConnection(BackendBusinessObjectBaseSAP.java:48)

at com.sap.isa.backend.r3.salesdocument.BasketServiceR3.convertMaterialNumber(BasketServiceR3.java:528)

at com.sap.isa.backend.r3.catalog.CatalogTree.searchExact(CatalogTree.java:574)

at com.sap.isa.backend.r3.catalog.CatalogTree.searchSingleArgument(CatalogTree.java:371)

at com.sap.isa.backend.r3.catalog.R3CatalogFilterVisitor.visitAttrEqualFilter(R3CatalogFilterVisitor.java:106)

at com.sap.isa.catalog.filter.CatalogFilterAttrEqual.assign(CatalogFilterAttrEqual.java:59)

at com.sap.isa.catalog.filter.CatalogFilterVisitor.start(CatalogFilterVisitor.java:220)

at com.sap.isa.backend.r3.catalog.R3CatalogFilterVisitor.evaluate(R3CatalogFilterVisitor.java:56)

at com.sap.isa.backend.r3.catalog.R3MemCatalogBuilder.buildQueryInternal(R3MemCatalogBuilder.java:612)

at com.sap.isa.catalog.impl.CatalogBuilder.buildQuery(CatalogBuilder.java:661)

at com.sap.isa.catalog.impl.CatalogQuery.submit(CatalogQuery.java:287)

at com.sap.isa.catalog.webcatalog.WebCatItemList.createResultIterator(WebCatItemList.java:535)

at com.sap.isa.catalog.webcatalog.WebCatItemList.populate(WebCatItemList.java:990)

at com.sap.isa.catalog.webcatalog.WebCatItemList.populate(WebCatItemList.java:952)

at com.sap.isa.catalog.webcatalog.WebCatItemList.setQuery(WebCatItemList.java:1162)

at com.sap.isa.catalog.webcatalog.WebCatItemList.(WebCatItemList.java:167)

at com.sap.isa.businessobject.SalesDocument.searchItemInCatalog(SalesDocument.java:696)

at com.sap.isa.businessobject.SalesDocument.populateItemsFromCatalog(SalesDocument.java:554)

at com.sap.isa.backend.db.SalesDocumentDB.updateInBackend(SalesDocumentDB.java:4515)

at com.sap.isa.businessobject.SalesDocument.update(SalesDocument.java:1304)

at com.sap.isa.isacore.action.order.AddToBasketAction.isaPerform(AddToBasketAction.java:678)

at com.sap.isa.isacore.action.IsaCoreBaseAction.isaPerform(IsaCoreBaseAction.java:417)

at com.sap.isa.isacore.action.IsaCoreBaseAction.ecomPerform(IsaCoreBaseAction.java:343)

at com.sap.isa.isacore.action.EComBaseAction.doPerform(EComBaseAction.java:356)

at com.sap.isa.core.BaseAction.execute(BaseAction.java:211)

at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)

at com.sap.isa.core.RequestProcessor.processActionPerform(RequestProcessor.java:684)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)

at com.sap.isa.core.RequestProcessor.process(RequestProcessor.java:401)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at com.sap.isa.core.ActionServlet.process(ActionServlet.java:243)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)

at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)

at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)

at com.sap.isa.core.RequestProcessor.processForwardConfig(RequestProcessor.java:277)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)

at com.sap.isa.core.RequestProcessor.process(RequestProcessor.java:401)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at com.sap.isa.core.ActionServlet.process(ActionServlet.java:243)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)

at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)

at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)

at com.sap.isa.core.RequestProcessor.processForwardConfig(RequestProcessor.java:277)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)

at com.sap.isa.core.RequestProcessor.process(RequestProcessor.java:401)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at com.sap.isa.core.ActionServlet.process(ActionServlet.java:243)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)

at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)

at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)

at com.sap.isa.core.RequestProcessor.processForwardConfig(RequestProcessor.java:277)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)

at com.sap.isa.core.RequestProcessor.process(RequestProcessor.java:401)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at com.sap.isa.core.ActionServlet.process(ActionServlet.java:243)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.doWork(RequestDispatcherImpl.java:321)

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:377)

at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)

at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)

at com.sap.isa.core.RequestProcessor.processForwardConfig(RequestProcessor.java:277)

at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)

at com.sap.isa.core.RequestProcessor.process(RequestProcessor.java:401)

at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)

at com.sap.isa.core.ActionServlet.process(ActionServlet.java:243)

at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.runServlet(FilterChainImpl.java:117)

at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:62)

at com.tealeaf.capture.LiteFilter.doFilter(Unknown Source)

at com.sap.isa.isacore.TealeafFilter.doFilter(TealeafFilter.java:61)

at com.sap.engine.services.servlets_jsp.server.runtime.FilterChainImpl.doFilter(FilterChainImpl.java:58)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:384)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(AccessController.java:219)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 26, 2010 at 05:33 AM

    Hi,

    I had similar (in fact a lot of) issues with the BasketServiceR3 class. After several rounds of debugging, I have found some interesting points and the way SAP has implemented this class.

    There is an object "context" within this class. This object primarily holds most of the necesary data that is needed for the application to work smoothly. However, if you step into the debug mode and set a breakpoint within this class and method converMaterialNumbers(...), you can see that the above object is null after the first sucessfull login into the application.

    i.e

    1. Application is restared and user logs in.

    2. context object is not null

    3. Log out and log in again, this time, the context obj is null in BasketServiceR3 class. (dont know why it is that way...i asked SAP and they do not have an answer)

    Now the reason why you are getting a NullPointerException is that, when the getDefaultJCoConnection() is called, a jco connection object from the conFactory will be retrieved. If in case, this connection is invalid, it tries to pull it out from the context object. As your context object is null, you get the above error.

        public JCoConnection getDefaultJCoConnection() {
            JCoConnection connection = (JCoConnection)conFactory.getDefaultConnection();
            if (!connection.isValid()) {
                Properties conProps = new Properties();
                String language = (String) context.getAttribute(BackendObjectManager.LANGUAGE);
                if (language != null && language.length() > 0) {
                    conProps.setProperty(JCoManagedConnectionFactory.JCO_LANG, language);
                }
                .....more code
    

    I had to change the ConnectionFactory.java standard class to add in more methods to retrieve the jco connection reliably from the conFactory / managed factory config rather than depending on the context object. At least it is working well so far. However, you need to make sure that you do not disturb any other functionality (dont add setter methods). You can refer to the above mentioned method for more details.

    PS: Try it at your own risk. Changing standard java classes will impact during upgrades.

    Pradeep

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.