Topic
  • 1 reply
  • Latest Post - ‏2012-04-27T16:20:42Z by G3FA_Daniel_Phomphakdy
G3FA_Daniel_Phomphakdy
135 Posts

Pinned topic Error only when browsing as guest - java.lang.NumberFormatException

‏2012-04-27T13:48:12Z |
Hi

I noticed I'm having errors in system.out when using the CalculationCodeListDataBean, but only if I'm a guest shopper. If I'm logged in, I have no errors in the console... What is happenign and how can I fix/trace this?

Thank you

Code throwing an error :

<wcbase:useBean id="discounts" classname="com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean" scope="request">
<c:set property="catalogEntryId" value="${catalogEntry.productID}" target="${discounts}" />
<c:set property="includeParentProduct" value="true" target="${discounts}" />
<c:set property="includeChildItems" value="true" target="${discounts}"/>
<c:set property="userId" value="${CommandContext.userId}" target="${discounts}"/>
<c:set property="calculationUsageId" value="-1" target="${discounts}" />
</wcbase:useBean>

Error in the console :

4/27/12 9:17:55:610 EDT 0000001c CommerceSrvr E com.ibm.commerce.command.ECCommandTarget executeCommand CMN0420E: The following command exception has occurred during processing: "java.lang.NumberFormatException: For input string: """.java.lang.NumberFormatException: For input string: ""
at java.lang.Throwable.<init>(Throwable.java:67)
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:59)
at java.lang.Integer.parseInt(Integer.java:481)
at java.lang.Integer.<init>(Integer.java:671)
at com.ibm.commerce.common.objsrc.LanguageCache.findByPrimaryKey(LanguageCache.java:156)
at com.ibm.commerce.membergroup.commands.CheckUserInMemberGroupCmdImpl.evaluateLocaleCondition(CheckUserInMemberGroupCmdImpl.java:1071)
at com.ibm.commerce.membergroup.commands.CheckUserInMemberGroupCmdImpl.evaluate(CheckUserInMemberGroupCmdImpl.java:517)
at com.ibm.commerce.condition.SimpleCondition.evaluate(SimpleCondition.java:213)
at com.ibm.commerce.condition.AndListCondition.evaluate(AndListCondition.java:89)
at com.ibm.commerce.membergroup.commands.CheckUserInMemberGroupCmdImpl.evaluateSegment(CheckUserInMemberGroupCmdImpl.java:421)
at com.ibm.commerce.membergroup.commands.CheckUserInMemberGroupCmdImpl.performExecute(CheckUserInMemberGroupCmdImpl.java:358)
at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)
at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:138)
at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:172)
at com.ibm.commerce.membergroup.commands.ListMemberGroupsForUserCmdImpl.performExecuteOnCacheMiss(ListMemberGroupsForUserCmdImpl.java:269)
at com.ibm.commerce.membergroup.commands.ListMemberGroupsForUserCmdImpl$Cache$MyDataGenerator.generateCacheableData(ListMemberGroupsForUserCmdImpl.java:402)
at com.ibm.commerce.datatype.AbstractFinderResult.invokeFinder(AbstractFinderResult.java:523)
at com.ibm.commerce.datatype.CacheableFinderResult.invokeFinder(CacheableFinderResult.java:195)
at com.ibm.commerce.datatype.SerializableFinderResult.invokeFinder(SerializableFinderResult.java:119)
at com.ibm.commerce.dynacache.commands.AbstractFinderResultCache.performExecute(AbstractFinderResultCache.java:334)
at com.ibm.websphere.command.LocalTarget.executeCommand(LocalTarget.java:58)
at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)
at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:138)
at com.ibm.commerce.dynacache.commands.AbstractFinderResultCache.myInvokeFinder(AbstractFinderResultCache.java:1148)
at com.ibm.commerce.dynacache.commands.AbstractFinderResultCache.invokeFinder(AbstractFinderResultCache.java:987)
at com.ibm.commerce.membergroup.commands.ListMemberGroupsForUserCmdImpl$Cache.invokeFinder(ListMemberGroupsForUserCmdImpl.java:567)
at com.ibm.commerce.membergroup.commands.ListMemberGroupsForUserCmdImpl$Cache.execute(ListMemberGroupsForUserCmdImpl.java:530)
at com.ibm.commerce.membergroup.commands.ListMemberGroupsForUserCmdImpl$Cache.access$1(ListMemberGroupsForUserCmdImpl.java:427)
at com.ibm.commerce.membergroup.commands.ListMemberGroupsForUserCmdImpl.performExecute(ListMemberGroupsForUserCmdImpl.java:221)
at com.ibm.commerce.command.ECCommandTarget.executeCommand(ECCommandTarget.java:157)
at com.ibm.websphere.command.TargetableCommandImpl.execute(TargetableCommandImpl.java:139)
at com.ibm.websphere.command.CacheableCommandImpl.execute(CacheableCommandImpl.java:138)
at com.ibm.commerce.command.AbstractECTargetableCommand.execute(AbstractECTargetableCommand.java:172)
at com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean.getMemberGroups(CalculationCodeListDataBean.java:1699)
at com.ibm.commerce.fulfillment.beans.CalculationCodeListDataBean.populate(CalculationCodeListDataBean.java:601)
at com.ibm.commerce.beans.DataBeanManager.directActivate(DataBeanManager.java:465)
at com.ibm.commerce.beans.DataBeanManager.activate(DataBeanManager.java:195)
at com.ibm.commerce.beans.DataBeanManager.activate(DataBeanManager.java:383)
at com.ibm.commerce.taglibs.base.tag.UseBean.doEndTag(UseBean.java:99)
at com.ibm._jsp._CategoryOnlyResultsDisplay._jspService(_CategoryOnlyResultsDisplay.java:2527)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:259)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:686)
at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:375)
at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:211)
at com.ibm._jsp._CategoryOnlyDisplay._jspx_meth_c_import_5(_CategoryOnlyDisplay.java:4858)
at com.ibm._jsp._CategoryOnlyDisplay._jspService(_CategoryOnlyDisplay.java:873)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:259)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:686)
at org.apache.taglibs.standard.tag.common.core.ImportSupport.acquireString(ImportSupport.java:375)
at org.apache.taglibs.standard.tag.common.core.ImportSupport.doEndTag(ImportSupport.java:211)
at com.ibm._jsp._CategoriesDisplay._jspx_meth_c_import_5(_CategoriesDisplay.java:11647)
at com.ibm._jsp._CategoriesDisplay._jspService(_CategoriesDisplay.java:1786)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:99)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:259)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:354)
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:215)
at com.ibm.commerce.struts.ECActionServlet.doGet(ECActionServlet.java:157)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
at com.ibm.commerce.campaigns.filter.CampaignsFilter.doFilter(CampaignsFilter.java:148)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.commerce.likeminds.filter.LikeMindsFilter.doFilter(LikeMindsFilter.java:183)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.commerce.dynacache.filter.CacheFilter$2.run(CacheFilter.java:376)
at com.ibm.commerce.dynacache.filter.CacheFilter.doFilter(CacheFilter.java:507)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilterAction(RuntimeServletFilter.java:367)
at com.ibm.commerce.webcontroller.RuntimeServletFilter.access$0(RuntimeServletFilter.java:247)
at com.ibm.commerce.webcontroller.RuntimeServletFilter$1.run(RuntimeServletFilter.java:210)
at com.ibm.commerce.webcontroller.RuntimeServletFilter.doFilter(RuntimeServletFilter.java:231)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:179)
at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1604)
Daniel Phomphakdy
Updated on 2012-04-27T16:20:42Z at 2012-04-27T16:20:42Z by G3FA_Daniel_Phomphakdy
  • G3FA_Daniel_Phomphakdy
    135 Posts

    Re: Error only when browsing as guest - java.lang.NumberFormatException

    ‏2012-04-27T16:20:42Z  
    Hi

    One more note. After further testings, I realized that the error is caused because of the language_id field from the USERS table having a null value for all guest. It seems the CalculationCodeListDataBean is trying to manipulate the users.language_id field, and throws an error for all guest users since this field is empty.

    Any solution on resolving this?

    Thank you
    Daniel Phomphakdy