Error from Select Server

Discussions related to SoftPro Select Server development.

Moderator: Phil Barton

Post Reply
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Error from Select Server

Post by roteague »

I'm trying to import my contact table (which is very big) into SoftPro using the Lookups API. I'm getting the following error:
Event Type: Error
Event Source: SoftPro Select Server (DEVELOPMENT)
Event Category: None
Event ID: 0
Date: 11/2/2009
Time: 9:50:16 AM
User: N/A
Computer: 7S0PYB1
Description:
Error occured on service boundary.
Error: There was an error while trying to serialize parameter http://tempuri.org/:QueryTableResult. The InnerException message was 'Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota. '. Please see InnerException for more details.
Stack Trace:
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.SerializeParameterPart(XmlDictionaryWriter writer, PartInfo part, Object graph)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.SerializeParameter(XmlDictionaryWriter writer, PartInfo part, Object graph)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.SerializeBody(XmlDictionaryWriter writer, MessageVersion version, String action, MessageDescription messageDescription, Object returnValue, Object[] parameters, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.SerializeBodyContents(XmlDictionaryWriter writer, MessageVersion version, Object[] parameters, Object returnValue, Boolean isRequest)
at System.ServiceModel.Dispatcher.OperationFormatter.OperationFormatterMessage.OperationFormatterBodyWriter.OnWriteBodyContents(XmlDictionaryWriter writer)
at System.ServiceModel.Channels.BodyWriter.WriteBodyContents(XmlDictionaryWriter writer)
at System.ServiceModel.Channels.BodyWriterMessage.OnWriteBodyContents(XmlDictionaryWriter writer)
at System.ServiceModel.Channels.Message.WriteBodyContents(XmlDictionaryWriter writer)
at System.ServiceModel.Security.SecurityAppliedMessage.WriteBodyToSignThenEncryptWithFragments(Stream stream, Boolean includeComments, String[] inclusivePrefixes, EncryptedData encryptedData, SymmetricAlgorithm algorithm, XmlDictionaryWriter writer)
at System.ServiceModel.Security.WSSecurityOneDotZeroSendSecurityHeader.ApplyBodySecurity(XmlDictionaryWriter writer, IPrefixGenerator prefixGenerator)
at System.ServiceModel.Security.SecurityAppliedMessage.OnWriteMessage(XmlDictionaryWriter writer)
at System.ServiceModel.Channels.Message.WriteMessage(XmlDictionaryWriter writer)
at System.ServiceModel.Channels.BufferedMessageWriter.WriteMessage(Message message, BufferManager bufferManager, Int32 initialOffset, Int32 maxSizeQuota)
at System.ServiceModel.Channels.TextMessageEncoderFactory.TextMessageEncoder.WriteMessage(Message message, Int32 maxMessageSize, BufferManager bufferManager, Int32 messageOffset)
at System.ServiceModel.Channels.HttpOutput.SerializeBufferedMessage(Message message)
at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout)
at System.ServiceModel.Channels.HttpRequestContext.OnReply(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestContextBase.Reply(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.SecurityChannelListener`1.SecurityRequestContext.OnReply(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestContextBase.Reply(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestContextBase.Reply(Message message)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Reply(MessageRpc& rpc)
XML Log:
<ILExceptionData>
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter" methodName="SerializeParameterPart" methodSignature="Void SerializeParameterPart(System.Xml.XmlDictionaryWriter, PartInfo, System.Object)" methodToken="0x6005b0d" ILOffset="82" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter" methodName="SerializeParameter" methodSignature="Void SerializeParameter(System.Xml.XmlDictionaryWriter, PartInfo, System.Object)" methodToken="0x6005b0c" ILOffset="73" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter" methodName="SerializeBody" methodSignature="Void SerializeBody(System.Xml.XmlDictionaryWriter, System.ServiceModel.Channels.MessageVersion, System.String, System.ServiceModel.Description.MessageDescription, System.Object, System.Object[], Boolean)" methodToken="0x6005b0a" ILOffset="103" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Dispatcher.OperationFormatter" methodName="SerializeBodyContents" methodSignature="Void SerializeBodyContents(System.Xml.XmlDictionaryWriter, System.ServiceModel.Channels.MessageVersion, System.Object[], System.Object, Boolean)" methodToken="0x6005159" ILOffset="48" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Dispatcher.OperationFormatter+OperationFormatterMessage+OperationFormatterBodyWriter" methodName="OnWriteBodyContents" methodSignature="Void OnWriteBodyContents(System.Xml.XmlDictionaryWriter)" methodToken="0x6005182" ILOffset="13" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.BodyWriter" methodName="WriteBodyContents" methodSignature="Void WriteBodyContents(System.Xml.XmlDictionaryWriter)" methodToken="0x6002de8" ILOffset="95" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.BodyWriterMessage" methodName="OnWriteBodyContents" methodSignature="Void OnWriteBodyContents(System.Xml.XmlDictionaryWriter)" methodToken="0x6005177" ILOffset="0" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.Message" methodName="WriteBodyContents" methodSignature="Void WriteBodyContents(System.Xml.XmlDictionaryWriter)" methodToken="0x6001027" ILOffset="189" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Security.SecurityAppliedMessage" methodName="WriteBodyToSignThenEncryptWithFragments" methodSignature="Void WriteBodyToSignThenEncryptWithFragments(System.IO.Stream, Boolean, System.String[], System.ServiceModel.Security.EncryptedData, System.Security.Cryptography.SymmetricAlgorithm, System.Xml.XmlDictionaryWriter)" methodToken="0x6003b15" ILOffset="124" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Security.WSSecurityOneDotZeroSendSecurityHeader" methodName="ApplyBodySecurity" methodSignature="Void ApplyBodySecurity(System.Xml.XmlDictionaryWriter, System.IdentityModel.IPrefixGenerator)" methodToken="0x60038b8" ILOffset="121" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Security.SecurityAppliedMessage" methodName="OnWriteMessage" methodSignature="Void OnWriteMessage(System.Xml.XmlDictionaryWriter)" methodToken="0x6003b0f" ILOffset="77" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.Message" methodName="WriteMessage" methodSignature="Void WriteMessage(System.Xml.XmlDictionaryWriter)" methodToken="0x6001039" ILOffset="185" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.BufferedMessageWriter" methodName="WriteMessage" methodSignature="System.ArraySegment`1[System.Byte] WriteMessage(System.ServiceModel.Channels.Message, System.ServiceModel.Channels.BufferManager, Int32, Int32)" methodToken="0x6000603" ILOffset="93" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.TextMessageEncoderFactory+TextMessageEncoder" methodName="WriteMessage" methodSignature="System.ArraySegment`1[System.Byte] WriteMessage(System.ServiceModel.Channels.Message, Int32, System.ServiceModel.Channels.BufferManager, Int32)" methodToken="0x6006478" ILOffset="177" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.HttpOutput" methodName="SerializeBufferedMessage" methodSignature="System.ArraySegment`1[System.Byte] SerializeBufferedMessage(System.ServiceModel.Channels.Message)" methodToken="0x60010bb" ILOffset="15" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.HttpOutput" methodName="Send" methodSignature="Void Send(System.TimeSpan)" methodToken="0x60010c1" ILOffset="82" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.HttpRequestContext" methodName="OnReply" methodSignature="Void OnReply(System.ServiceModel.Channels.Message, System.TimeSpan)" methodToken="0x6000ad7" ILOffset="27" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.RequestContextBase" methodName="Reply" methodSignature="Void Reply(System.ServiceModel.Channels.Message, System.TimeSpan)" methodToken="0x600056a" ILOffset="35" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.SecurityChannelListener`1+SecurityRequestContext" methodName="OnReply" methodSignature="Void OnReply(System.ServiceModel.Channels.Message, System.TimeSpan)" methodToken="0x6003ec1" ILOffset="38" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.RequestContextBase" methodName="Reply" methodSignature="Void Reply(System.ServiceModel.Channels.Message, System.TimeSpan)" methodToken="0x600056a" ILOffset="35" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Channels.RequestContextBase" methodName="Reply" methodSignature="Void Reply(System.ServiceModel.Channels.Message)" methodToken="0x6000569" ILOffset="0" />
<Point module="System.ServiceModel.dll" classFull="System.ServiceModel.Dispatcher.ImmutableDispatchRuntime" methodName="Reply" methodSignature="Boolean Reply(System.ServiceModel.Dispatcher.MessageRpc ByRef)" methodToken="0x600551d" ILOffset="371" />
</ILExceptionData>
***********************************************************************************
Error: Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Change the object graph or increase the MaxItemsInObjectGraph quota.
Stack Trace:
at System.Runtime.Serialization.XmlObjectSerializerContext.IncrementItemCount(Int32 count)
at WriteArrayOfLookupValueToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )
at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerializeReference(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
at WriteLookupRowToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , ClassDataContract )
at System.Runtime.Serialization.ClassDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.InternalSerialize(XmlWriterDelegator xmlWriter, Object obj, Boolean isDeclaredType, Boolean writeXsiType, Int32 declaredTypeID, RuntimeTypeHandle declaredTypeHandle)
at WriteArrayOfLookupRowToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract )
at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle)
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph)
at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph)
at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph)
at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter writer, Object graph)
at System.ServiceModel.Dispatcher.DataContractSerializerOperationFormatter.SerializeParameterPart(XmlDictionaryWriter writer, PartInfo part, Object graph)
XML Log:
Error in creating ILExceptionData: System.NullReferenceException: Object reference not set to an instance of an object.
at SoftPro.ServerModel.Utils.CreateXmlLog(Exception ex)

Action=http://tempuri.org/ILookups/QueryTable, ReplyTo=http://schemas.microsoft.com/2005/12/Se ... /Anonymous, FaultTo=

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Obviously, I'm attempting to import more than the service can handle.

Any thoughts,
Robert
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Error from Select Server

Post by roteague »

Followup, I can no longer connect to the SelectServer (even after rebooting). I get the following error:
Error: An error occurred while receiving the HTTP response to http://7s0pyb1:8080/OrderTracking/v1/Lookups.svc. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
Robert
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Error from Select Server

Post by roteague »

Ignore the last message.

Here is the line it is crashing on:

Code: Select all

DataTable table = lookupSvc.GetTable(tableName);
Robert
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Error from Select Server

Post by roteague »

Followup: this only seems to happen when trying to get the "Order Contact - Person" table.
Robert
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Error from Select Server

Post by roteague »

Seems to be a data related issue. I restored the database from another backup, then tried to reimport the data again. I got further, but eventually got the same original error. Restarting my import program causes the program to crash at the same line as before ("DataTable table = lookupSvc.GetTable(tableName);). It looks like the data may be getting corrupted during the import, causing any subsequent lookup to throw an error. Also, when I query the DataMap table before the error there is some 28000 records, after the error only 12000 records. It looks like I am just trying to import more than the server can handle.
Robert
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Error from Select Server

Post by John Morris »

The current lookup api is limited to the amount of data any one server call can retrieve. Try setting the LookupQuerySpec's maximum record count property to a resonable number (500?).
John Morris
Sr. Software Architect
SoftPro
Post Reply