Commerce Server General - error

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > September 2005 > error





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author error
nirsivak

2005-09-07, 5:52 pm

I am getting this error in my production box any input is appreciated

An error occured while processing the request. Request Url:
https://www.jwod.com/payment.aspx? ...D123F282012BBE0
0C93DF3F583BE99057661ADBB9CF38D96BCE2832
B829A1076488187930361B81EAFFE00E7701C3F9
8749B2E69B9F3AED4D381B2975448DB1005C44F5
28B8
Stack Trace: System.Web.HttpUnhandledException: Exception of type
System.Web.HttpUnhandledException was thrown. --->
Microsoft.CommerceServer.Runtime.Orders.CommerceOrderSystemException:
Failed to retrieve item #0 from the line item collection. --->
Microsoft.CommerceServer.Runtime.CommerceException: GetItemInfo
Failed. ---> System.Runtime.InteropServices.COMException
(0x8002000B): Invalid index.
at Microsoft.CommerceServer.Runtime.ISimpleList.get_Item(Int32
Index)
at
Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.GetItemInfo(Int32
nItemIndex, Object strOrderFormName)
--- End of inner exception stack trace ---
at
Microsoft.CommerceServer.Internal.Common.Util.ThrowCommerceException(String
message, Exception inner, String source)
at
Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.GetItemInfo(Int32
nItemIndex, Object strOrderFormName)
at
Microsoft.CommerceServer.Runtime.Orders.LineItemCollection.get_Item(Int32
itemIndex)
--- End of inner exception stack trace ---
at Microsoft.CommerceServer.Site.Payment.btnPurchase_Click(Object
sender, EventArgs e)
at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
at
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument)
at System.Web.UI.Page. RaisePostBackEvent(IPostBackEventHandler

sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
postData)
at System.Web.UI.Page.ProcessRequestMain()
--- End of inner exception stack trace ---
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain()
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.CallHandlerExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
Boolean& completedSynchronously)

Ravi Shankar

2005-09-08, 7:52 am

You're using a "0" as an index into the LineItems collection... either use a
for each lineitem in orderform.lineitems or start from 1.
--
Ravi Shankar


"nirsivak" wrote:

> I am getting this error in my production box any input is appreciated
>
> An error occured while processing the request. Request Url:
> https://www.jwod.com/payment.aspx? ...82D123F282012BB

E00C93DF3F583BE99057661ADBB9CF38D96BCE28
32B829A1076488187930361B81EAFFE00E7701C3
F98749B2E69B9F3AED4D381B2975448DB1005C44
F528B8
> Stack Trace: System.Web.HttpUnhandledException: Exception of type
> System.Web.HttpUnhandledException was thrown. --->
> Microsoft.CommerceServer.Runtime.Orders.CommerceOrderSystemException:
> Failed to retrieve item #0 from the line item collection. --->
> Microsoft.CommerceServer.Runtime.CommerceException: GetItemInfo
> Failed. ---> System.Runtime.InteropServices.COMException
> (0x8002000B): Invalid index.
> at Microsoft.CommerceServer.Runtime.ISimpleList.get_Item(Int32
> Index)
> at
> Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.GetItemInfo(Int32
> nItemIndex, Object strOrderFormName)
> --- End of inner exception stack trace ---
> at
> Microsoft.CommerceServer.Internal.Common.Util.ThrowCommerceException(String
> message, Exception inner, String source)
> at
> Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.GetItemInfo(Int32
> nItemIndex, Object strOrderFormName)
> at
> Microsoft.CommerceServer.Runtime.Orders.LineItemCollection.get_Item(Int32
> itemIndex)
> --- End of inner exception stack trace ---
> at Microsoft.CommerceServer.Site.Payment.btnPurchase_Click(Object
> sender, EventArgs e)
> at System.Web.UI.WebControls.Button.OnClick(EventArgs e)
> at
> System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
> eventArgument)
> at System.Web.UI.Page. RaisePostBackEvent(IPostBackEventHandler

> sourceControl, String eventArgument)
> at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection
> postData)
> at System.Web.UI.Page.ProcessRequestMain()
> --- End of inner exception stack trace ---
> at System.Web.UI.Page.HandleError(Exception e)
> at System.Web.UI.Page.ProcessRequestMain()
> at System.Web.UI.Page.ProcessRequest()
> at System.Web.UI.Page.ProcessRequest(HttpContext context)
> at System.Web.CallHandlerExecutionStep.Execute()
> at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
> Boolean& completedSynchronously)
>
>

Zoe Hart [MVP]

2005-09-08, 5:52 pm

0 should be a valid index for the LineItems collection. I have plenty of
code that loops from 0 to LineItems.Count-1 to index through the LineItems
collection. I wonder if it's possible that for some reason your LineItems
collection is empty - maybe because the basket pipeline removed some items?

--
Zoe Hart
Commerce Server MVP

"Ravi Shankar" <shankycheil@newsgroup.nospam> wrote in message
news:270C46AA-3939-41B2-B4FF-801FFF6DB2A7@microsoft.com...[vbcol=seagreen]
> You're using a "0" as an index into the LineItems collection... either use
> a
> for each lineitem in orderform.lineitems or start from 1.
> --
> Ravi Shankar
>
>
> "nirsivak" wrote:
>
BE00C93DF3F583BE99057661ADBB9CF38D96BCE2
832B829A1076488187930361B81EAFFE00E7701C
3F98749B2E69B9F3AED4D381B2975448DB1005C4
4F528B8[vbcol=seagreen]


Ravi Shankar

2005-09-08, 5:52 pm

Thanks for correcting that Zoe. I did not put it properly. The error is
emnating from the "GetItemInfo" call on the Interop Library for OrderGroup
"Microsoft.CommerceServer.Interop.Orders.OrderGroupFreeThreaded.GetItemInfo(Int32
nItemIndex, Object strOrderFormName)" which warrents a Line Number and I
thought that in this context "0" does not make sense.

Nirsivak, if you're running this call in a loop then you should probably run
it like for x = 0 to order.orderforms("default").lineitems.count - 1
or something close ... which will prevent this call if the lineitem count is
0 ..
--
Ravi Shankar


"Zoe Hart [MVP]" wrote:

> 0 should be a valid index for the LineItems collection. I have plenty of
> code that loops from 0 to LineItems.Count-1 to index through the LineItems
> collection. I wonder if it's possible that for some reason your LineItems
> collection is empty - maybe because the basket pipeline removed some items?
>
> --
> Zoe Hart
> Commerce Server MVP
>
> "Ravi Shankar" <shankycheil@newsgroup.nospam> wrote in message
> news:270C46AA-3939-41B2-B4FF-801FFF6DB2A7@microsoft.com...
2BBE00C93DF3F583BE99057661ADBB9CF38D96BC
E2832B829A1076488187930361B81EAFFE00E770
1C3F98749B2E69B9F3AED4D381B2975448DB1005
C44F528B8[vbcol=seagreen]
>
>
>

vensi

2005-09-08, 5:52 pm

Thx Ravishankar for your input.. It does not happen all the time.. it happens
2 to 3 times daily.. in the production server...
any input on this

"Ravi Shankar" wrote:
[vbcol=seagreen]
> You're using a "0" as an index into the LineItems collection... either use a
> for each lineitem in orderform.lineitems or start from 1.
> --
> Ravi Shankar
>
>
> "nirsivak" wrote:
>
BBE00C93DF3F583BE99057661ADBB9CF38D96BCE
2832B829A1076488187930361B81EAFFE00E7701
C3F98749B2E69B9F3AED4D381B2975448DB1005C
44F528B8[vbcol=seagreen]
Ravi Shankar

2005-09-08, 5:52 pm

Hi Vensi,

You should examine the call being made and ensure that you're checking for a
valid number of line items before trying to retreive one. It is possible that
somewhere in the pipeline a lineitems gets removed. If this is happening only
twice or thrice a day then you should still check this out, it is probably
2-3 blank orders you're logging per day

--
Ravi Shankar


"vensi" wrote:
[vbcol=seagreen]
> Thx Ravishankar for your input.. It does not happen all the time.. it happens
> 2 to 3 times daily.. in the production server...
> any input on this
>
> "Ravi Shankar" wrote:
>
12BBE00C93DF3F583BE99057661ADBB9CF38D96B
CE2832B829A1076488187930361B81EAFFE00E77
01C3F98749B2E69B9F3AED4D381B2975448DB100
5C44F528B8[vbcol=seagreen]
nirsivak

2005-09-19, 6:00 pm

Zoe Hart,Ravi Shankar

I am using

for i = 0 to ( oLineItems.Count - 1 )

oLineItemProperties = directCast( oLineItems(i),
Microsoft.CommerceServer.Runtime.Dictionary )

sQty = oLineItemProperties("Quantity").ToString()
sCommCode = TranslateNSN(
oLineItemProperties("_product_NSN").ToString() )
sDesc = oLineItemProperties("_product_Description").ToString()
sUOM = FDMSUOM( oLineItemProperties("_product_Unit of
measure").ToString() )
sCost = oLineItemProperties("cy_unit_price").ToString()
sProdCode = sCommCode
sDiscount = "0"
sAmt = oLineItemProperties("cy_lineitem_total").ToString()
sTax = "0"
sUPC = sCommCode

AddToParmList( orderForm, "L_QTY", i, sQty )
AddToParmList( orderForm, "L_COMMCODE", i, sCommCode )
AddToParmList( orderForm, "L_DESC", i, sDesc )
AddToParmList( orderForm, "L_UOM", i, sUOM )
AddToParmList( orderForm, "L_COST", i, sCost )
AddToParmList( orderForm, "L_PRODCODE", i, sProdCode )
AddToParmList( orderForm, "L_DISCOUNT", i, sDiscount )
AddToParmList( orderForm, "L_AMT", i, sAmt )
AddToParmList( orderForm, "L_TAXAMT", i, sTax )
AddToParmList( orderForm, "L_UPC", i, sProdCode )
AddToParmList( orderForm, "L_CATEGORY", i, "S" )
AddToParmList( orderForm, "L_MANPARTNO", i, "" )
AddToParmList( orderForm, "L_MANUFACTURER", i, "" )
AddToParmList( orderForm, "L_SKU", i, sProdCode )
AddToParmList( orderForm, "L_TYPE", i, "P" )

next

end sub

still i am getting the error..

inputs appreciated..

vensi

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com