• Welcome to KonaKart Community Forum. Please login or sign up.
 

Getting Exception Info from ExceptionSummary.jsp

Started by xzistance, February 13, 2009, 11:21:30 pm

Previous topic - Next topic

xzistance

Hey guys-

So I've been playing around with this for a while now and just can't seem to figure it out.
Basically, sometimes if KK errors, I can get it to use an errorPage I have setup, which emails me a report of the error and forwards the page to a 500 friendly page. Other times, mainly when there is an exception in the Action classes (I believe), KK forwards the error to the ExceptionSummary.jsp page, which displays the error on whatever page the error occurred.

The problem I'm having is, I can't see that message in the server logs and I haven't been able to figure out how to configure ExceptionSummary.jsp to email me a copy of the error.

The main reason I need this is because I'm setting up the Google Checkout Merchant Calculations API and Google Checkout sends a request to the action class I have created to handle merchant calculations. Well, I know there is some error being thrown from this call: kkAppEng.getOrderMgr().createShippingQuotes();

But I can't see it. Because Google Checkout sends a request, there's no real page for it to display on, and no log messages show up.

Any ideas or help?

trevor

Have you tried e.printStackTrace() . That should show in the log.

xzistance

Yea, as far as I can tell there is no exception object passed to ExceptionSummary.jsp

The exception is put in to request scope as a message. The current error message I'm getting for trying to kkAppEng.getOrderMgr().createShippingQuotes() is:

Variable: org.apache.struts.action.ERROR = {org.apache.struts.action.GLOBAL_MESSAGE=[exception.detailed.message[<br>Exception Name = com.konakart.app.KKException<br>Exception Message = java.lang.NumberFormatException: null<br>Exception Stack Trace = <br>   at com.konakart.app.KKEng.getShippingQuotes(Unknown Source)<br>   at com.konakart.app.KKEng.getShippingQuotes(Unknown Source)<br>   at com.konakart.al.OrderMgr.createShippingQuotes(Unknown Source)<br>   at com.konakart.actions.GoogleMerchantCalculationsAction.execute(Unknown Source)<br>   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)<br>   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)<br>   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)<br>   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)<br>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)<br>   at javax.servlet.http.HttpSe
rvlet.service(HttpServlet.java:802)<br>   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)<br>   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br>   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)<br>   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)<br>   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)<br>   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)<br>   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)<br>   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)<br>   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)<br>   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)<br>
    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)<br>   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)<br>   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)<br>   at java.lang.Thread.run(Thread.java:595)<br><br>Exception Cause = java.lang.NumberFormatException<br>   at java.lang.Integer.parseInt(Integer.java:415)<br>   at java.lang.Integer.<init>(Integer.java:620)<br>   at com.konakart.app.Order.calculateTotals(Unknown Source)<br>   at com.konakart.bl.modules.shipping.ShippingMgr.getShippingQuotesPrivate(Unknown Source)<br>   at com.konakart.bl.modules.shipping.ShippingMgr.getShippingQuotes(Unknown Source)<br>   at com.konakart.app.KKEng.getShippingQuotes(Unknown Source)<br>   at com.konakart.app.KKEng.getShippingQuotes(Unknown Source)<br>   at com.konakart.al.OrderMgr.createShippingQuotes(Unknown Source)<br>   at com.konakart.actions.GoogleMerchan
tCalculationsAction.execute(Unknown Source)<br>   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)<br>   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)<br>   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)<br>   at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)<br>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)<br>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)<br>   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)<br>   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)<br>   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)<br>   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)<br>   at org.apache.catalina.core.StandardHostValve.invoke(StandardH
ostValve.java:126)<br>   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)<br>   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)<br>   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)<br>   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)<br>   at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)<br>   at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)<br>   at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)<br>   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)<br>   at java.lang.Thread.run(Thread.java:595)]]}


So it looks like I have a null pointer somewhere that it's trying to convert to an int, does that look right to you too?
What is all required to be filled in the OrderIf currentOrder object to generate shipping quotes?

julie

What I suggest is that you look at some example code that creates an order (KonaKart\java_api_examples\src\com\konakart\apiexamples\InsertOrder.java).