we are using TeaCommerce for one of our clients. It worked well for over 1.5 years, but a few days ago it started creating strange error messages.
Everything works fine (adding products to the cart, setting address, ...) until the final order-confirmation. At that point we get the following exception:
===========================================
MESSAGE: Exception has been thrown by the target of an invocation.
STACKTRACE: at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) at TeaCommerce.Presentation.TeaCommerceBase.RequestModule.invokeMethod(restExtension myExtension, Object[] paras)
INNEREXCEPTION: System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: order, orders. Line 59, position 895330. at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseAttributes() at System.Xml.XmlTextReaderImpl.ParseElement() at System.Xml.XmlTextReaderImpl.ParseElementContent() at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r) at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o) at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options) at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options) at TeaCommerce.Data.Order.get_OrdersXmlCache() at TeaCommerce.Data.Order.UpdateOrdersXmlCache() at TeaCommerce.Data.Order.Save() at TeaCommerce.Data.Order.Finalize(CallbackInfo callbackInfo) at TeaCommerce.Base.PaymentCallback(String alias, String encryptedOrderId) at TeaCommerce.Base.PaymentContinue(String alias, String encryptedOrderId)
===========================================
As mentioned before, this error has not occurred until a few days ago. The server has since been restarted, but no change on any code (neither the Umbraco backend code nor the JavaScript, Templates, XSLT, ...) has been made for several months.
We are using Umbraco 4.7. The problem occurred no matter which browser was used (firefox, chrome, opera). The Server uses Windows 2008 Server (64 bit) with IIS 7 and .Net 4.0.
I actually sounds like there's a problem with the xml cache file. Try going to the Tea Commerce section and right click the "Orders" node in the left side. Choose the "Refresh order xml" option. It might take a little time if you have a lot of orders.
Is this the file at App_Data\TeaCommerce\Orders.xml? It ends abrubtly with paymentTransactionId="" inside aelement. It looks like the process failed to write the file or was aborted while doing so.
Is it possible to recreate the file from the database by deleting it and doing the refresh?
Exception in PaymentContinue
Hi,
we are using TeaCommerce for one of our clients. It worked well for over 1.5 years, but a few days ago it started creating strange error messages.
Everything works fine (adding products to the cart, setting address, ...) until the final order-confirmation. At that point we get the following exception:
===========================================
MESSAGE:
Exception has been thrown by the target of an invocation.
STACKTRACE:
at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at TeaCommerce.Presentation.TeaCommerceBase.RequestModule.invokeMethod(restExtension myExtension, Object[] paras)
INNEREXCEPTION:
System.Xml.XmlException: Unexpected end of file has occurred. The following elements are not closed: order, orders. Line 59, position 895330.
at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
at TeaCommerce.Data.Order.get_OrdersXmlCache()
at TeaCommerce.Data.Order.UpdateOrdersXmlCache()
at TeaCommerce.Data.Order.Save()
at TeaCommerce.Data.Order.Finalize(CallbackInfo callbackInfo)
at TeaCommerce.Base.PaymentCallback(String alias, String encryptedOrderId)
at TeaCommerce.Base.PaymentContinue(String alias, String encryptedOrderId)
===========================================
As mentioned before, this error has not occurred until a few days ago. The server has since been restarted, but no change on any code (neither the Umbraco backend code nor the JavaScript, Templates, XSLT, ...) has been made for several months.
We are using Umbraco 4.7. The problem occurred no matter which browser was used (firefox, chrome, opera). The Server uses Windows 2008 Server (64 bit) with IIS 7 and .Net 4.0.
Hi Andreas,
I actually sounds like there's a problem with the xml cache file. Try going to the Tea Commerce section and right click the "Orders" node in the left side. Choose the "Refresh order xml" option. It might take a little time if you have a lot of orders.
/Rune
Hi Rune,
Refreshing the cache file raises the same exception.
- Andreas
Could you try and look at what is at Line 59, position 895330?
Is it a specific order that is creating the error?
/Rune
Is this the file at App_Data\TeaCommerce\Orders.xml? It ends abrubtly with paymentTransactionId="" inside aelement. It looks like the process failed to write the file or was aborted while doing so.
Is it possible to recreate the file from the database by deleting it and doing the refresh?
It's the correct file yes. You can try deleting the contents of the file and then do the refresh. Don't delete the file.
/Rune
Ok, removing all contents except the <?xml ...> and the root element <orders></orders> worked and refreshing the file from inside umbraco worked.
Thank you very much for the help!
- Andreas
No problem. Glad it worked.
Just for our statistics:
1. How large are your orders.xml
2. How long did it take (aprox) to refresh it?
/Rune
The file is about 3 megabytes big. Refreshing it took less than 30 seconds.
Thanks. Good thing to know if anyone else is experiencing problems like this.
Please mark the correct answer, for others to see and have a very nice weekend :)
/Rune
is working on a reply...