From: <tr...@do...> - 2011-12-10 06:21:41
|
The following issue has been added to a project that you are monitoring. Title: SparqlRemoteUpdateEndpoint fails with Invalid URI: The Uri string is too long. Project: Core Library (dotNetRDF.dll) Created By: http://koos-strydom.myopenid.com/ Milestone: none Category: Core API Priority: High Type: Bug Description: HI, The error occurs when a sparql update is submitted to any SparqlRemoteUpdateEndpoint when more than 250 triples is in the update query here is a code snippet var endpoints = http://192.168.1.10:8000/; _endpointQuery = new SparqlRemoteEndpoint(new Uri(endpoints + sparql/)); _endpointQuery.Credentials = GetCredentials(); _endpointQuery.Timeout = 90000; var endpointUpdate = new SparqlRemoteUpdateEndpoint(new Uri(endpoints + update/)); endpointUpdate.Credentials = GetCredentials(); ...... ...... StringBuilder sb = new StringBuilder(); foreach (var pre in _workGraph.NamespaceMap.Prefixes) { sb.AppendLine(string.Format(PREFIX {0}: <{1}>, pre, _workGraph.NamespaceMap.GetNamespaceUri(pre))); } sb.AppendLine(string.Format(INSERT DATA {{ GRAPH <{0}>, scope.NamespaceURI)); sb.AppendLine({ foreach (var t in _workGraph.Triples) { sb.AppendLine(t.ToString(true)); } sb.AppendLine(} sb.AppendLine(} SparqlUpdateParser parser = new SparqlUpdateParser(); SparqlUpdateCommandSet cmds = parser.ParseFromString(sb.ToString()); endpoint.Update(cmds[0].ToString()); ........ and the stack trace at System.Uri.EscapeString(String input, Int32 start, Int32 end, Char[] dest, Int32 destPos, Boolean isUriString, Char force1, Char force2, Char rsvd) at System.Uri.EscapeDataString(String stringToEscape) at VDS.RDF.Update.SparqlRemoteUpdateEndpoint.Update(String sparqlUpdate) at ScopeList.Service.DataTransferService.PostSparqlCommands(Scope scope, SparqlRemoteUpdateEndpoint endpoint) in E:\ARD\trunk\iPas.ScopeList\ScopeList.Service\DataTransfers\DataTransferService.cs:line 335 at ScopeList.Service.DataTransferService.StartDataTransfers() in E:\ARD\trunk\iPas.ScopeList\ScopeList.Service\DataTransfers\DataTransferService.cs:line 395 More information on this issue can be found at http://www.dotnetrdf.org/tracker/Issues/IssueDetail.aspx?id=156 If you no longer wish to receive notifications, please visit http://www.dotnetrdf.org/tracker/UserProfile.aspx and change your notifications options. |