• Welcome to KonaKart Community Forum. Please login or sign up.
 
May 15, 2024, 02:31:10 am

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - xzistance

1
Hey guys-

I'm trying to track down a case where I'm getting an exception when saving an order. This isn't happening all of the time, but on occasion.

Exception msg:
Exception Name = com.konakart.app.KKException<br>Exception Message = java.lang.ArithmeticException: Non-terminating decimal expansion; no exact representable decimal result.

Server log output:
WARN  (OrderMgr.java:saveOrder:471) Exception saving an order: Query details:
Criteria:: orders_products.products_model<=>orders_products.products_model='pallet':  orders_products.orders_id<=>orders_products.orders_id=103397:  orders_products.products_type<=>orders_products.products_type=0:  orders_products.products_price_0<=>orders_products.products_price_0=2.38:  orders_products.products_id<=>orders_products.products_id=1319:  orders_products.products_price<=>orders_products.products_price=2.38:  orders_products.products_name<=>orders_products.products_name='JFC White Shirataki Noodles 16.0 oz': 
Current Query SQL (may not be complete or applicable): SELECT  FROM orders_products WHERE orders_products.products_model='pallet' AND orders_products.orders_id=103397 AND orders_products.products_type=0 AND orders_products.products_price_0=2.38 AND orders_products.products_id=1319 AND orders_products.products_price=2.38 AND orders_products.products_name='JFC White Shirataki Noodles 16.0 oz'

I did some research on the Arithmetic exception, and it has to do with BigDecimal, usually when the divide function is trying to be used. I know for sure I'm not doing a divide function on any of my BigDecimal order values before I attempt to save. I am doing a couple of multiply functions, however. I've tried following the suggestions here: http://www.jroller.com/nwinkler/entry/the_trouble_with_bigdecimal

They suggest always passing a string to the BigDecimal constructor when creating a new BigDecimal to work with. I get the same error either way.

Is there something on/around line 471 in the saveOrder method that could be helpful in diagnosing why this is happening?

Thanks in advance..
2
Hey guys-

We recently upgraded our Konakart to the latest version and are getting a bug when trying to print an Order Invoice and Packing Slip.

On the printed page it just shows:

[object HTML TableElement]


Are you guys having that problem at all or is there a place you can point me in the right direction to fix?
Thanks,
Andy
3
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?
4
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?
5
Hey Julie (or anyone else that can help) -

I'm trying to do the logic for getting a CustomerIf object by doing some sort of search. I haven't been able to find methods in the CustomerMgr() that seem to do this, other than getting a Customer by passing in their sessionId. I know I could do a manual query, but my problem then is, how do I decrypt the password for that user so I can log them in to get the sessionId?

I hope this makes sense..

Thanks in advance,
Andy
6
Thanks Julie-

I'll use this strategy going forward.
7
Hmm, even if I wanted to, it seems that kkAppEng.getSessionId() returns null at the cart page anyway. Any idea when it's supposed to get set or how to generate one based on the current customer?
8
As far as I can tell, no, without figuring out some custom way of putting it in there and retrieving it.
9
So, I'm working on implementing Google Checkout, which has a Notification API that sends an XML string to a URL I specify to handle. So, a customer would go through the site and add the products they want to their cart, and then instead of doing the normal KK checkout, they'd hit the Google Checkout button which sends them off to Google with their cart info. They complete the order via Google.

When the order has been placed on Google, they send a new order notification to the URL I mentioned above.
I'm working on parsing that XML and creating a new order in KK so Google Checkout orders are still trackable in the KK system.

I've made pretty good progress, but am hitting a snag with the sessionId when trying to snag. Basically, it requires a session, and the session has to be a valid session in order for the order to save, using kkAppEng.getOrderMgr().saveOrder(/*send email?*/false);

Is there a way to get around this session issue or maybe a different way to save the order? I'm trying to avoid doing manual SQL queries to insert the order and its info..

Thanks for your help in advance,
Andy
10
Programming of KonaKart / Re: Setting up redirects
December 23, 2008, 03:42:39 pm
Nevermind guys, I figured it out by creating a new Servlet class and setting it up in web.xml to handle url-mappings for *.asp
11
Programming of KonaKart / Setting up redirects
December 22, 2008, 06:54:26 pm
Hey everyone-

I'm trying to figure out where and how in the main KK struts definitions I can setup redirects. For example, the KK app I'm developing for a client needs to handle old URLs and then forward to its new appropriate KK URL.

So, for example, most of the old URLs use the URL:
index.asp?PageAction=xxxetcxxx

I'm just trying to set up a simple example of putting in a wild card where the app catches every URL attempt to /index.asp and has some class handle it and forward.

Can anyone help me get started/point me in the right direction? I'm pretty new to struts and have been researching and doing some trial-and-error tests, but no luck thus far.

Thanks a lot in advance!
12
Programming of KonaKart / Admin Custom Panel headers
December 16, 2008, 12:10:23 am
Hey everyone-

I'm trying to rename the custom panel names, on both the left-hand navigation and where it says 'Custom1 Header' once you click on one.

Can someone point me in the right direction?

Thanks in advance!
13
Configuration of KonaKart / Re: Admin order editing
December 11, 2008, 10:36:04 pm
Cool. Yea, the comment field seems to make the most sense for us.

Thanks for your help Trevor.
14
Configuration of KonaKart / Re: Admin order editing
December 11, 2008, 06:36:40 pm
Thanks Trevor, that was very helpful.

My only question is about using the custom field(s) for an Order. Where can I add data to the custom field(s) via the Admin App?

I only see an ability to edit the status, put in a note, and a checkbox to notify customer or not.

Is this something that would have to be done via a custom panel?

Thanks again. Cheers!
15
Configuration of KonaKart / Admin order editing
December 10, 2008, 11:00:05 pm
Hey Guys-

I'm trying to verify a few questions I'm having about the KonaKart Admin side of the application.

Can you edit an order's items after it's been purchased? A client of ours needs the ability to add/remove items and/or change item quantities. Is this possible other than creating a Custom Panel page?

Is there a built-in way via the UI to manage the order statuses? I know they're in the database and that's easily editable, but I'm wondering if this functionality is possible via the current UI.

There doesn't seem to be a specific field for a tracking number once an order is shipped. I'm surprised this didn't make the application. I think we'll be able to get around it by putting something like: "Tracking Number: 1234567890" in to the comments field. I think it'd be a pretty useful addition, however.

Thanks for your help in advance!