joniles / mpxj

Primary repository for MPXJ library

Home Page:http://www.mpxj.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error At Load XML due Resource Max Units

diegosechin-timenow opened this issue · comments

There is an error in XML document (1991, 14).
System.Private.Xml
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream) at TimeConnect.Schedulers.ReaderXmlFile.HandlerReadXml.Read(Byte[] fileXml) at

PG 1.zip

image

If I use Max Units with a smaller value, like 20.000,00%, The error doesn't occurr.

@diegosechin-timenow thanks for opening the issue, and for attaching the sample file. I'm able to load the MPP file with MPXJ, save it as XML and re-open the XML using MPXJ. I've also tried using "save as" from Microsoft Project to create an XML file, which again I can open OK from MPXJ. I've only used the Java version to try this, but I will use the .Net version of MPXJ when I start work again tomorrow morning to see if that makes any difference.

In the meantime, could you send me a full stack trace, hopefully indicating where in MPXJ's code the exception is being thrown? Thanks!

@diegosechin-timenow I've imported the XML generated by MPXJ back into MPXJ under .Net with no issues.

Looking at the stack trace fragment, I've wondering if your code looks something like this:

XmlSerializer serializer = new XmlSerializer(typeof(ClassRepresentingASchedule));
ClassRepresentingASchedule schedule = serializer.Deserialize(inputStream);

One possibility is that the class you are using to represent a resource uses a type for max units which cannot accommodate the size of the value being deserialized from the XML.

Either way, I'd need to see a more detailed stack trace to be able to dig into this any further.

We will se it in our code.

I will return with more informations and a feedback. Thanks

@joniles Sorry, it was our problem, because it occured after the xml extraction, and we was not using the correct variable type.

Sorry for our mistake.

This issue could be canceled.