I was not able to reproduce this error. Are you using SimpleQueryRunner as-is, or have you made modifications to it?
What version of .NET are you using? What version of XCC.net are you using? And which MarkLogic Server version? Is there more to the error message "The type initializer for 'java.net.URI' threw an exception", e.g. a more complete stack trace? From: [email protected] [mailto:[email protected]] On Behalf Of Farshad Farzan Sent: Friday, May 06, 2011 2:26 PM To: [email protected] Subject: [MarkLogic Dev General] The type initializer for 'java.net.URI' threw an exception I can not get the xcc for .net working , I can test the server using the xcc java example below , java -classpath "d:/temp/xcc/examples/marklogic-xcc-4.2.3.jar;d:/temp/xcc/examples/marklogic-xcc-examples-4.2.3.jar" com.marklogic.xcc.examples.ContentFetcher xcc://admin:pass@localhost:8003/CDADatabase /CDA/foo.xml -o d:/temp/xcc/foo_out.xml But the the .net code throws exception at the following line: ContentSource cs = ContentSourceFactory.NewContentSource(serverUri); With the following debug message: The type initializer for 'java.net.URI' threw an exception Where: using System; using Marklogic.Xcc; Uri serverUri = new Uri("xcc://admin:pass@localhost:8003/CDADatabase"); SimpleQueryRunner sqr = new SimpleQueryRunner(serverUri); SimpleQueryRunner uses : ContentSource cs = ContentSourceFactory.NewContentSource(serverUri) And this throughs exception: and I get the following error: System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1. at System.Xml.XmlTextReaderImpl.Throw(Exception e) at System.Xml.XmlTextReaderImpl.Throw(String res, String arg) at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace() at System.Xml.XmlTextReaderImpl.ParseDocumentContent() at System.Xml.XmlTextReaderImpl.Read() at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) at System.Xml.XmlDocument.Load(XmlReader reader) at System.Xml.XmlDocument.LoadXml(String xml)
_______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
