Notices



Reply
 
LinkBack Thread Tools Display Modes

Old 05-02-2008, 05:23 AM   #1 (permalink)
custom.part

digitalslacker's Avatar

Join Date: Oct 2006
Location: Annapolis, MD
Posts: 376
Downloads: 0
Uploads: 0
Rep Power: 3 digitalslacker is on a distinguished road

COMException 0x80010105 when retrieving participant event data

We have been having a growing problem with a custom events registration form that we use. This is a sporadic problem, happens about 1 in every 5 page loads


Here is the error…
System.Runtime.InteropServices.COMException (0x80010105): The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT)) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Runtime.InteropServices.CustomMarshalers.EnumeratorViewOfEnumVariant.MoveNext() at USNAWebservices.MasterService.getParticipantEvents(Int32 REID)

And here is my code
<WebMethod()> _
Public Function getParticipantEvents(ByVal REID As Integer) As ParticipantData
Dim RE7 As REAPI = initAPI()
Dim oEventParticipants As Blackbaud.PIA.RE7.BBREAPI.CRecord
oEventParticipants = New Blackbaud.PIA.RE7.BBREAPI.CRecord
Dim oParticipant As Blackbaud.PIA.RE7.BBREAPI.CParticipant
Try
If RE7 Is Nothing Then
RE7 = initAPI()
End If
If Not RE7 Is Nothing Then
Dim i As Integer
Dim oData As New ParticipantData
With oEventParticipants
.Init(RE7.SessionContext)
.Load(REID)
Dim oParticipantInfo As New ArrayList
For Each oParticipant In .Participants
If CType(oParticipant.EventObject.Fields(ESpecialEventFields.SPECIAL_EVENT_fld_START_DATE), Date) > Date.Today Then
Dim results As New ParticipantInfo
results = getParticipantEventsInfo(oParticipant.Fields(EParticipantsFields.Participants_fld_ID))
oParticipantInfo.Add(results)
End If
Next
oData.Data = CType(oParticipantInfo.ToArray(GetType(ParticipantInfo)), ParticipantInfo())
End With
Return oData
Else
SendNotif("Unable to getParticipantEvents: API failed to initialize.")
End If
Catch ex As Exception
SendError("ERROR: webservices: getParticipantEvents " & Now(), "Garrett.Keating@usna.com", ex.ToString, True)
Finally
oEventParticipants.CloseDown()
End Try
End Function


I found this article (BB330194) in the KB that says I should check to see if re7 is nothing and then re-init. That’s doesn’t seem to help.
The above code is designed to check the logged in constits future events and then pass that back to the custom part so it can pre-populate info if they have already signed up for the current event
This code resides in a webservice
any suggestions would be greatly appreciated!
__________________
Garrett Keating
Senior Web Developer
U.S. Naval Academy Alumni Association & Foundation
www.usna.com
customizingNetCommunity.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 05-02-2008, 05:45 AM   #2 (permalink)
Likes to customize RE!

DavidZ's Avatar

Join Date: Jul 2006
Location: London, UK
Posts: 421
Downloads: 6
Uploads: 0
Rep Power: 3 DavidZ is on a distinguished road

As a participant is a top level object you may need to close it down after each iteration of your for next loop. I know that this is counter intuitive as you did not initialise it but this is the case with top level objects that are also child objects to another top level objects. This is the same when you look at the gifts a constituent has.

See my blog article: RE-Decoded » Blog Archive » Close down or crash

I am not sure if this is the cause of your problem but it will at least get rid of memory leaks and locking errors.

David
__________________
David Zeidman
Zeidman Development
http://www.zeidman.info

Check out my RE API blog
http://www.re-decoded.com

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 05-02-2008, 05:59 AM   #3 (permalink)
custom.part

digitalslacker's Avatar

Join Date: Oct 2006
Location: Annapolis, MD
Posts: 376
Downloads: 0
Uploads: 0
Rep Power: 3 digitalslacker is on a distinguished road

Quote:
Originally Posted by DavidZ View Post
As a participant is a top level object you may need to close it down after each iteration of your for next loop. I know that this is counter intuitive as you did not initialise it but this is the case with top level objects that are also child objects to another top level objects. This is the same when you look at the gifts a constituent has.

See my blog article: RE-Decoded » Blog Archive » Close down or crash

I am not sure if this is the cause of your problem but it will at least get rid of memory leaks and locking errors.

David
yup no clue why you'd shut down something you are still working with but what you are saying does make sense
we have been seeing a few instances of locks too
I'm going to hack at it and if it fixes it i'll be sure to let you know
and buy u a beer if you ever get into the Annapolis area
thanks!
__________________
Garrett Keating
Senior Web Developer
U.S. Naval Academy Alumni Association & Foundation
www.usna.com
customizingNetCommunity.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 05-02-2008, 06:33 AM   #4 (permalink)
custom.part

digitalslacker's Avatar

Join Date: Oct 2006
Location: Annapolis, MD
Posts: 376
Downloads: 0
Uploads: 0
Rep Power: 3 digitalslacker is on a distinguished road

no go on this one....
I added in
For Each oParticipant In .Participants
If CType(oParticipant.EventObject.Fields(ESpecialEventFields.SPECIAL_EVENT_fld_START_DATE), Date) > Date.Today Then
Dim results As New ParticipantInfo
results = getParticipantEventsInfo(oParticipant.Fields(EParticipantsFields.Participants_fld_ID))
oParticipantInfo.Add(results)
End If
oParticipant.CloseDown()
Next
same problem though....
thanks for the suggestion...i learned something
__________________
Garrett Keating
Senior Web Developer
U.S. Naval Academy Alumni Association & Foundation
www.usna.com
customizingNetCommunity.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

Old 05-02-2008, 08:38 AM   #5 (permalink)
custom.part

digitalslacker's Avatar

Join Date: Oct 2006
Location: Annapolis, MD
Posts: 376
Downloads: 0
Uploads: 0
Rep Power: 3 digitalslacker is on a distinguished road

got it thanks to Tom Demille and Ron from DS Support
i wasn't releasing the COMObject....

System.Runtime.InteropServices.Marshal.ReleaseComObject(oEventParticipants)
System.Runtime.InteropServices.Marshal.ReleaseComObject(RE7)

System.Runtime.InteropServices.Marshal.ReleaseComObject(oParticipant)

I thought garbage collect would do that for me but apparently it's not reliable.

seems to have stopped the error and sped up the app a lot...

thanks for all the help guys
__________________
Garrett Keating
Senior Web Developer
U.S. Naval Academy Alumni Association & Foundation
www.usna.com
customizingNetCommunity.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
api, bbnc, events


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump



All times are GMT -6. The time now is 07:07 PM.

Miscellaneous


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 Copyright 2008 Blackbaud User SocietyAd Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79