Can't import orders to Stone Edge - Live with Gold

For general questions and discussions specific to the AbleCommerce GOLD ASP.Net shopping cart software.
Post Reply
meer2005
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Feb 09, 2005 2:00 pm

Can't import orders to Stone Edge - Live with Gold

Post by meer2005 » Wed Nov 19, 2014 3:25 pm

Went live but now can't import orders to Stone Edge Order Manager. Stone edge support has sent us the following error and said AbleCommerce will have to fix before it will work. Here is the error:

Code: Select all

SETIError: System.ArgumentException: The value "System.Object[]" is not of type "CommerceBuilder.Orders.OrderItem" and cannot be used in this generic collection.
Parameter name: value
   at System.ThrowHelper.ThrowWrongValueTypeArgumentException(Object value, Type targetType)
   at System.Collections.Generic.List`1.System.Collections.IList.Add(Object item)
   at NHibernate.Util.ArrayHelper.AddAll(IList to, IList from)
   at NHibernate.Impl.SessionImpl.ListCustomQuery(ICustomQuery customQuery, QueryParameters queryParameters, IList results)
   at NHibernate.Impl.SessionImpl.List(NativeSQLQuerySpecification spec, QueryParameters queryParameters, IList results)
   at NHibernate.Impl.SessionImpl.List[T](NativeSQLQuerySpecification spec, QueryParameters queryParameters)
   at NHibernate.Impl.SqlQueryImpl.List[T]()
   at SETIService.Do_DownloadOrders(HttpResponse HttpResponse, XmlDocument& xRespDoc, String OrderDate, String LastOrder, String StartNum, String BatchSize, Boolean CountOnly, String PassPhrase, Store& objStore, Boolean bDSSMode) in D:\www\site-gold\Client\SETIService.ashx:line 1009
   at SETIService.Do_Download(HttpResponse HttpResponse, Store objStore, String Which, String Update, String Count, String OrderDate, String LastOrder, String BatchSize, String StartNum, String PassPhrase, Boolean bDSSMode) in D:\www\site-gold\Client\SETIService.ashx:line 352
   at SETIService.Dispatcher(HttpResponse HttpResponse, Store objStore, String OMFunction, String Update, String Count, String OrderDate, String LastOrder, String OrderNumber, String OrderStatus, String BatchSize, String StartNum, String PassPhrase, Boolean bDSSMode) in D:\www\site-gold\Client\SETIService.ashx:line 289
   at SETIService.ProcessSETIRequest(HttpContext Context) in D:\www\site-gold\Client\SETIService.ashx:line 186

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Can't import orders to Stone Edge - Live with Gold

Post by mazhar » Thu Nov 20, 2014 1:04 am

It seems like you have some custom module with some Nhibernate query. From exception it seems nhibernate query is expecting results of orderitem type but instead something else is returned. Please have a look at maybe line#186 in SETIService.ashx file where you have query returning OrderItems.

User avatar
jmestep
AbleCommerce Angel
Posts: 8164
Joined: Sun Feb 29, 2004 8:04 pm
Location: Dayton, OH
Contact:

Re: Can't import orders to Stone Edge - Live with Gold

Post by jmestep » Thu Nov 20, 2014 4:00 am

It could be because of where the file is located. In Gold, it has to be in the Mobile folder, but I don't remember why. We have a few sites running SE in Gold fine with the SETIService.ashx in the Mobile folder.
Judy Estep
Web Developer
jestep@web2market.com
http://www.web2market.com
708-653-3100 x209
New search report plugin for business intelligence:
http://www.web2market.com/Search-Report ... -P154.aspx

User avatar
Naveed
Rear Admiral (RADM)
Rear Admiral (RADM)
Posts: 611
Joined: Thu Apr 03, 2008 4:48 am

Re: Can't import orders to Stone Edge - Live with Gold

Post by Naveed » Thu Nov 20, 2014 5:29 am

Can you please ask more details about the error and the fix from the Stone Edge?

Or provide the link to download the Stone Edge for AC Gold.

meer2005
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Feb 09, 2005 2:00 pm

Re: Can't import orders to Stone Edge - Live with Gold

Post by meer2005 » Thu Nov 20, 2014 7:24 am

I know it was originally in the mobile folder and then it was moved because there were issues with it not finding the file because the mobile store is not enabled, if i remember right. Initially it was in the mobile directory and we did get this same error. We did get get orders to download 3 separate times, once with it in the mobile directory and and then in different directories. It would work for a couple downloads and then go back to the error.

There is no link to the Stone Edge Gold file without logging in, so I've just attached it.

meer2005
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Feb 09, 2005 2:00 pm

Re: Can't import orders to Stone Edge - Live with Gold

Post by meer2005 » Thu Nov 20, 2014 11:56 am

I think I've drilled down what's causing the errors. It seems to be on kitted items, which is why it's worked and then stopped. It will not import kitted items and once it hits a kitted item, it stops and wont download any orders past that one. I've tried changing the kit invoice display style from bundle to itemized and it still wont get past kitted or import kitted items whether they are set to itemized or bundle.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Can't import orders to Stone Edge - Live with Gold

Post by mazhar » Thu Nov 20, 2014 12:19 pm

meer2005 wrote:I know it was originally in the mobile folder and then it was moved because there were issues with it not finding the file because the mobile store is not enabled, if i remember right. Initially it was in the mobile directory and we did get this same error. We did get get orders to download 3 separate times, once with it in the mobile directory and and then in different directories. It would work for a couple downloads and then go back to the error.

There is no link to the Stone Edge Gold file without logging in, so I've just attached it.
Locate following code in SETIService.ashx file

Code: Select all

colChildren = CommerceBuilder.DomainModel.NHibernateHelper.CreateSQLQuery(sSQL).List(Of CommerceBuilder.Orders.OrderItem)()
and update it like this

Code: Select all

colChildren = CommerceBuilder.DomainModel.NHibernateHelper.CreateSQLQuery(sSQL).AddEntity(GetType(CommerceBuilder.Orders.OrderItem)).List(Of CommerceBuilder.Orders.OrderItem)()
Save the file and now give it a try.

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Can't import orders to Stone Edge - Live with Gold

Post by mazhar » Thu Nov 20, 2014 12:27 pm

meer2005 wrote:I think I've drilled down what's causing the errors. It seems to be on kitted items, which is why it's worked and then stopped. It will not import kitted items and once it hits a kitted item, it stops and wont download any orders past that one. I've tried changing the kit invoice display style from bundle to itemized and it still wont get past kitted or import kitted items whether they are set to itemized or bundle.
It seems to me that no else used the script with similar configuration to what you have hence this code block was never executed. The query seems to have problem due to some missing configurations required by Nhibernate query API. Please give a try to fix I proposed above.

meer2005
Captain (CAPT)
Captain (CAPT)
Posts: 245
Joined: Wed Feb 09, 2005 2:00 pm

Re: Can't import orders to Stone Edge - Live with Gold

Post by meer2005 » Thu Nov 20, 2014 12:33 pm

I think that did it. Kits are now able import. I'll pass this along to Stone Edge so they can update their script. Thank you!

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Can't import orders to Stone Edge - Live with Gold

Post by mazhar » Thu Nov 20, 2014 12:40 pm

meer2005 wrote:I think that did it. Kits are now able import. I'll pass this along to Stone Edge so they can update their script. Thank you!
Great! Yeah please do inform Stone Edge to update script with this change. Thanks!

Post Reply