since morning, i try to fix but no result yet. I dont make sense. It was working yesterday but today i got the error. Another interesting thing is that Line 7404, I do not have such a large line of code.
XmlException: Name cannot begin with the '<' character, hexadecimal value 0x3C. Line 7404, position 64.
StackTrace
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Parse(String text, LoadOptions options)
at ESRI.ArcGIS.Client.Toolkit.DataSources.WmsLayer.client_DownloadStringCompleted(Object sender, DownloadStringCompletedEventArgs e)
at System.Net.WebClient.OnDownloadStringCompleted(DownloadStringCompletedEventArgs e)
at System.Net.WebClient.DownloadStringOperationCompleted(Object arg)
The downloaded xml is not valid.
The exception message refers to the returned xml, so you´ll have to go to Line 7404, position 64 of the returned xml and see how the error occured.
I solved it like this.
right click on the settings.settings file under the project and select Open With. select the automatic editor selector (xml) from the pop-up window. The settings.settings file will be opened in the xml editor
Related
When I try to export to disk a crystal report from within asp.net code, crystal report throw an exception. Exception just says "Invalid object format", which means clearly some field in report is failing data type conversion. Now, I can try and resolve the problem, if I know the field name.
Sadly, crystal report is stupid, and never adds the exact field name in exception message. So, I am unable to find which field is causing the problem. Unless I can find that field, there is no way for me to resolve the issue. So, all I want is a way to identify that field.
P.S. This issue happened when we moved all of our reports to latest version of Crystal Reports, and happens only with couple reports, out of the hundreds we have.
Edit:
Stack trace of the error I am receiving
CrystalDecisions.CrystalReports.Engine.InternalException was unhandled by user code
HResult=-2147221760
Message=
Error in File RepairTag {40C68F49-F0B7-46D6-9E89-6E105808B13B}.rpt:
Invalid object format name.
Source=CrystalDecisions.ReportAppServer.DataSetConversion
StackTrace:
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
at FANUC.CSMS.Common.BusinessTier.ReportBC.GenerateReportAndExportToDisk(String strExportFormat, String strMapPath) in d:\FANUC\CSMS\BusinessTier\Common\ReportBC.cs:line 227
at FANUC.CSMS.Common.BusinessTier.ReportBC.GenerateReportWithSelection(String strReportID, String strClause, String strExportFormat, Row objLocalizedNames, String strSortFields, Hashtable htblLocalizedNamesForSubReport, String strFilterString, Row objParamaterFieldsValues, String strMapPath, String strFontOverwriteReqd, String strGroup) in d:\FANUC\CSMS\BusinessTier\Common\ReportBC.cs:line 180
at FANUC.CSMS.Reports.Web.Reports.Page_Load(Object sender, EventArgs e) in d:\FANUC\CSMS\CSMSWeb\Reports\Reports.aspx.cs:line 98
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException: System.Runtime.InteropServices.COMException
HResult=-2147483077
Message=
Error in File RepairTag {40C68F49-F0B7-46D6-9E89-6E105808B13B}.rpt:
Invalid object format name.
Source=rptcontrollers.dll
ErrorCode=-2147483077
StackTrace:
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
InnerException:
I am working on a unit testing for a function in a form call Tester.cs, below is the error:
Error 7/31/2012 10:43:11 PM One of the background threads threw exception:
System.TypeInitializationException: The type initializer for 'Tester.Tester' threw an exception. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: String
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Int32.Parse(String s)
at Tester.Tester..cctor() in E:\Incubator\Tester\Tester\Tester.cs:line 35
--- End of inner exception stack trace ---
at Tester.Tester.Dispose(Boolean disposing)
at System.ComponentModel.Component.Finalize() MY-PC
On line 35 is a code, which basically retrieve value from configuration file and convert it to integer:
private static int _part = int.Parse(ConfigurationManager.AppSettings["Part"]);
What is the error? Thank you.
The likelyhood is that ConfigurationManager.AppSettings["Part"] is returning null. Hense the parse exception.
Does your unit test project have the app setting defined in its configuration?
You should copy your app.config (or web.config) file into test project. Otherwise test project can't find it. Remember config is related to host process, not to the dll itself.
Put the break point in line 35, something there is null which should not be...Null value can not be parsed into INT....
Be ensure that the config file is placed correctly at the directory from which you're running the application
We have an application that we need to begin testing and developing in Windows 7 environment. It works fine compiling under WinXP in VS2008, no problems. However when I went to compile it on a windows 7 machine using VS2008 today I get the following error:
Error 12 The "GenerateResource" task failed unexpectedly.
System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
at System.Drawing.Image.Save(Stream stream, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(MemoryStream stream)
at System.Drawing.Image.System.Runtime.Serialization.ISerializable.GetObjectData(SerializationInfo si, StreamingContext context)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter, SerializationBinder binder)
at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph)
at System.Resources.ResourceWriter.WriteValue(ResourceTypeCode typeCode, Object value, BinaryWriter writer, IFormatter objFormatter)
at System.Resources.ResourceWriter.Generate()
at System.Resources.ResourceWriter.Dispose(Boolean disposing)
at System.Resources.ResourceWriter.Close()
at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(IResourceWriter writer)
at Microsoft.Build.Tasks.ProcessResourceFiles.WriteResources(String filename)
at Microsoft.Build.Tasks.ProcessResourceFiles.ProcessFile(String inFile, String outFile)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.ProcessResourceFiles.Run(TaskLoggingHelper log, ITaskItem[] assemblyFilesList, List`1 inputs, List`1 outputs, Boolean sourcePath, String language, String namespacename, String resourcesNamespace, String filename, String classname, Boolean publicClass)
at Microsoft.Build.Tasks.GenerateResource.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask, Boolean& taskResult)
I cannot for the life of me run this one down. I have visited the msdn forums and find that it is an issue for a lot of people, but no consistent solution has been provided by MS or anyone else.
Has anyone seen this before and fixed it? Please advise is needed!
Thanks
I compiled using the command line msbuild and that identified the problem location.
It was a resx file in a class which had one unused image in it. I removed that and all was good again. Can build fine now.
After hours of troubleshooting, I opened and built the project using the VS 2010 command line prompt using MSBUILD "my solution file path here". This provided a more visible sequence of build events, and I found my project was failing just after it compiled form 16. The forms compiling appeared to be going in order of the objects in the solution explorer. So I checked the next form and found it contained a picture box. I also checked the form after that one and found I could not open the designer without errors(object reference not set to instance of object). So apparently, the problem was now two-fold.
To resolve I had to remove the picture box object from the first form I identified as problematic (it was not being used any way) as it appeared to be corrupted. I found the second form with the null reference exception was using a user control. The code for the constructor of the user control was attempting to pass an object to a container before calling InitializeComponent(). This created the null reference since the container hadn't event been created in InitializeComponent when the problematic code was called.
After resolving the issues in the above paragraph my solution compiled under Windows 7.
There is a GDI update for Windows 7, I think, if I'm not mistaken. Maybe that will solve the issue. Does your solution build using Msbuild on the commsnd line?
Do you use TIFF images in your app?
Some time ago, I also had a problem with TIFF images as part of reports that wouldn't compile under Win7 x64 although it compiled like a charm under Vista x86. The error message also involved GDI+. I saved the images under a different format (PNG) and the problem vanished.
At the time (around March 2011), I first ensured that my Windows was up-to-date but it didn't solve the problem. So maybe there is such an update as mentionned by Erik but it didn't come through Windows Update back then (Maybe it's newer).
Delete the resources from the resource manager (right click on each and delete) then add them back. for me it solve the problem.
i had same problem.
i just used msbuild myProject.sln command and it fixed and built successfully with no errors! now i can manually build my solution.
no need to reAdding my resources
System.ArgumentException was unhandled by user code
Message=Unexpected color space /R11
Source=itextsharp
StackTrace:
at iTextSharp.text.pdf.parser.InlineImageUtils.GetComponentsPerPixel(PdfName colorSpaceName)
at iTextSharp.text.pdf.parser.InlineImageUtils.ComputeBytesPerRow(PdfDictionary imageDictionary)
at iTextSharp.text.pdf.parser.InlineImageUtils.ParseUnfilteredSamples(PdfDictionary imageDictionary, PdfContentParser ps)
at iTextSharp.text.pdf.parser.InlineImageUtils.ParseInlineImageSamples(PdfDictionary imageDictionary, PdfContentParser ps)
at iTextSharp.text.pdf.parser.InlineImageUtils.ParseInlineImage(PdfContentParser ps)
at iTextSharp.text.pdf.parser.PdfContentStreamProcessor.ProcessContent(Byte[] contentBytes, PdfDictionary resources)
at iTextSharp.text.pdf.parser.PdfReaderContentParser.ProcessContent[E](Int32 pageNumber, E renderListener)
at iTextSharp.text.pdf.parser.PdfTextExtractor.GetTextFromPage(PdfReader reader, Int32 pageNumber, ITextExtractionStrategy strategy)
at iTextSharp.text.pdf.parser.PdfTextExtractor.GetTextFromPage(PdfReader reader, Int32 pageNumber)
at PDF_PdfToText.extractText(String src, String dest) in d:\QC\Backup\NRK\Current\QConform nrk - 2010\PDF\PdfToText.aspx.cs:line 29
at PDF_PdfToText.Page_Load(Object sender, EventArgs e) in d:\QC\Backup\NRK\Current\QConform nrk - 2010\PDF\PdfToText.aspx.cs:line 17
at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e)
at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
at System.Web.UI.Control.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
InnerException:
iText's inline image parser has undergone some work recently. If you're not using 5.0.5, you might be missing a relevant bug fix.
The whole .pdf.parser package is still under development unfortunately. OTOH, if you do have the latest-n-greatest, and are still getting this exception, you've got an iText[sharp] bug. Head on over to the itext-questions mailing list and post your stack trace along with the PDF that causes it if at all possible. We'll take care of it.
Alternatively, you can report the bug via the sourceforge tracker. Attached files there aren't Broadcast To The World, so you might be more comfortable with that.
I have CruiseControl(1.5) running in Win2k8R2 and svn(1.6.9) The error happens on a successful build after nant(0.86) Timeout(600 seconds). When I check the build dir everything is built correctly but CruiseControl Dashboard report Exception
Here is the error shown in console:
[:DEBUG] Exception: System.Xml.XmlException: The ',' character, hexadecimal value 0x2C, cannot be included in a name. Line 5544, position 274.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlWriter.WriteNode(XmlReader reader, Boolean defattr)
at ThoughtWorks.CruiseControl.Core.Util.XmlFragmentWriter.WriteNode(XmlReader reader, Boolean defattr)
at ThoughtWorks.CruiseControl.Core.Util.XmlFragmentWriter.WriteNode(String xml)
Generaly, this error happens when ccnet is trying to merge Nant ouput with non-xml info into the build report.
Verify the Nant ouput.
Maybe something similar here:
CruiseControl.Net complaining about xml