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

ms sql server 2005 - isolation level probl ?

Started by lrkwz, January 15, 2010, 11:39:39 am

Previous topic - Next topic

lrkwz

Hello,
    I'm developing for a new luxory eshop deployed in ms windows with ms sql server 2005.
Orders can be placed and are correclty saved into the db but when I checkout to the payment gateway I receive an exceltion


Exception Name = com.konakart.app.KKException
Exception Message = Cannot find order for Id = 9
Exception Stack Trace =
at com.konakart.bl.EmailMgr.sendOrderConfirmationEmail1(Unknown Source)
at com.konakart.app.KKEng.sendOrderConfirmationEmail1(Unknown Source)
at com.konakart.al.OrderMgr.sendOrderConfirmationEmail(Unknown Source)
at com.konakart.al.OrderMgr.saveOrder(Unknown Source)


The log states:


15-gen 10:56:18 INFO  (OrderIntegrationMgr.java:saveOrder:64) The order with id = 9 has just been saved
15-gen 10:56:18 ERROR (BaseAction.java:handleException:230) A customer has received the following exception message:
Exception Name = com.konakart.app.KKException
Exception Message = Cannot find order for Id = 9
Exception Stack Trace =
   at com.konakart.bl.EmailMgr.sendOrderConfirmationEmail1(Unknown Source)
   at com.konakart.app.KKEng.sendOrderConfirmationEmail1(Unknown Source)
   at com.konakart.al.OrderMgr.sendOrderConfirmationEmail(Unknown Source)
   at com.konakart.al.OrderMgr.saveOrder(Unknown Source)
   at com.konakart.actions.CheckoutConfirmationSubmitAction.execute(CheckoutConfirmationSubmitAction.java:133)
   at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
   at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
   at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
   at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   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 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419)
   at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:378)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1509)
   at java.lang.Thread.run(Unknown Source)
15-gen 10:56:18 ERROR (BaseAction.java:handleException:231) The full exception is:
com.konakart.app.KKException: Cannot find order for Id = 9
at com.konakart.bl.EmailMgr.sendOrderConfirmationEmail1(Unknown Source)
...



The connection url is:

torque.database.store1.adapter              = mssql
torque.dsfactory.store1.connection.driver   = net.sourceforge.jtds.jdbc.Driver
torque.dsfactory.store1.connection.url      = jdbc:jtds:sqlserver://DBSERVER:2410/dodoshop/\ISENGARDSQL2005;SelectMethod=cursor
torque.dsfactory.store1.connection.user     = dodoshop
torque.dsfactory.store1.connection.password = dodoshop

Database instance is a default ms sqlserver 2005:
* snapshopt_isolation_state = OFF
* is_read_committed_snapshot_on = 0

Any hint?

THANK YOU

lrkwz

Connection was OK
It was a "simple" matter of default language.
I have set the default language to Italian BEFORE having translated the order statuses.
As an other "side effect" the predefined products disappeared from the app (they where still in the catalog).

SUGGESTION: use outer join when joining with localized values from database (e.g. Orders with orders_status as in this case); a sensitive default could be "TO BE TRANSLATED" instead of null: easily undersandable and safe.

I'll post the italia translation (Messages_it.properties, KonakartAdminMessages_it.properties and various SQL inserts) asap; ask me if you need it urgently

heidi

Hi,

Thanks for posting your own solution and your suggestion.

Thanks also for the Italian translations.  Translations are always very welcome - please post to our Contributions board, thanks.

--Heidi