Content is not allowed in prolog error message

Hi Received this message when trying to open my file, can’t seem to find a solution. please help!

Content not allowed in prolog

C:\Users\Jonathan\ganttproject.log

GanttProject 3.1.3103
Settings file:
location: C:\Users\Jonathan.ganttproject
size:6421
is readable: true
java.class.path: eclipsito.jar;C:\Program Files (x86)\GanttProject-3.1
java.home: C:\Program Files (x86)\GanttProject-3.1\runtime
java.ext.dirs: null
java.io.tmpdir: C:\Users\Jonathan\AppData\Local\Temp
java.runtime.version: 11.0.11+9-LTS
java.vendor: BellSoft
java.vm.name: OpenJDK 64-Bit Server VM
java.vm.vendor: BellSoft
java.vm.version: 11.0.11+9-LTS
os.arch: amd64
os.name: Windows 10
os.version: 10.0
sun.java.command: com.bardsoftware.eclipsito.Launch --verbosity 1 --version-dirs plugins;~/.ganttproject.d/updates --app net.sourceforge.ganttproject.GanttProject C:\Users\Jonathan\Documents\GanttProject\Status on Harold.gan
user.country: ZA
user.dir: C:\Program Files (x86)\GanttProject-3.1
user.home: C:\Users\Jonathan
user.language: en
user.timezone: Africa/Harare

[Fatal Error] :1:1: Content is not allowed in prolog.
or
SEVERE: Can’t set awtAppClassName (needed on Linux to show app name in the top panel)
Jul 12, 2022 6:27:21 PM net.sourceforge.ganttproject.GPLogger log
INFO: Deleting old auto-save files
Jul 12, 2022 6:27:22 PM biz.ganttproject.LoggerImpl debug
FINE: Creating main frame…
Jul 12, 2022 6:27:22 PM biz.ganttproject.LoggerImpl debug
FINE: 1. loading look’n’feels
Jul 12, 2022 6:27:24 PM biz.ganttproject.LoggerImpl debug
FINE: 2. loading options
Jul 12, 2022 6:27:24 PM biz.ganttproject.LoggerImpl debug
FINE: 3. creating menus…
Jul 12, 2022 6:27:24 PM biz.ganttproject.LoggerImpl debug
FINE: 4. creating views…
Jul 12, 2022 6:27:24 PM net.sourceforge.ganttproject.GPLogger logToLogger
WARNING: File=C:\Program Files (x86)\GanttProject-2.8\GanttProject-2.8 does not exist or is not readable
Jul 12, 2022 6:27:24 PM net.sourceforge.ganttproject.GPLogger logToLogger
WARNING: File=C:\Program Files (x86)\GanttProject-2.8\GanttProject-2.8 does not exist or is not readable
Jul 12, 2022 6:27:24 PM biz.ganttproject.LoggerImpl debug
FINE: 5. calculating size and packing…
Jul 12, 2022 6:27:25 PM biz.ganttproject.LoggerImpl debug
FINE: 6. changing language …
Jul 12, 2022 6:27:25 PM biz.ganttproject.LoggerImpl debug
FINE: 7. first attempt to restore bounds
Jul 12, 2022 6:27:25 PM biz.ganttproject.LoggerImpl debug
FINE: 8. finalizing…
Jul 12, 2022 6:27:26 PM net.sourceforge.ganttproject.GPLogger logToLogger
WARNING: Content is not allowed in prolog.
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at java.xml/com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at java.xml/javax.xml.parsers.SAXParser.parse(Unknown Source)
at net.sourceforge.ganttproject.io.XmlParser.parse(XmlParser.java:119)
at net.sourceforge.ganttproject.io.GanttXMLOpen.doLoad(GanttXMLOpen.java:99)
at net.sourceforge.ganttproject.io.GanttXMLOpen.load(GanttXMLOpen.java:93)
at net.sourceforge.ganttproject.document.ProxyDocument$ParsingState.enter(ProxyDocument.java:370)
at net.sourceforge.ganttproject.document.ProxyDocument.read(ProxyDocument.java:188)
at net.sourceforge.ganttproject.importer.ImporterFromGanttFile.run(ImporterFromGanttFile.java:108)
at net.sourceforge.ganttproject.importer.ImporterFromGanttFile$2.run(ImporterFromGanttFile.java:95)
at net.sourceforge.ganttproject.undo.UndoableEditImpl.(UndoableEditImpl.java:48)
at net.sourceforge.ganttproject.undo.UndoManagerImpl.undoableEdit(UndoManagerImpl.java:72)
at net.sourceforge.ganttproject.importer.ImporterFromGanttFile.run(ImporterFromGanttFile.java:92)
at net.sourceforge.ganttproject.gui.CommandLineProjectOpenStrategy.tryImportDocument(ProjectOpenStrategy.kt:503)
at net.sourceforge.ganttproject.gui.CommandLineProjectOpenStrategy.access$tryImportDocument(ProjectOpenStrategy.kt:462)
at net.sourceforge.ganttproject.gui.CommandLineProjectOpenStrategy$openStartupDocument$2.invokeSuspend(ProjectOpenStrategy.kt:479)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

Jul 12, 2022 6:27:26 PM net.sourceforge.ganttproject.GPLogger logToLogger
WARNING: Content is not allowed in prolog.
java.io.IOException: Content is not allowed in prolog.
at net.sourceforge.ganttproject.io.XmlParser.parse(XmlParser.java:124)
at net.sourceforge.ganttproject.io.GanttXMLOpen.doLoad(GanttXMLOpen.java:99)
at net.sourceforge.ganttproject.io.GanttXMLOpen.load(GanttXMLOpen.java:93)
at net.sourceforge.ganttproject.document.ProxyDocument$ParsingState.enter(ProxyDocument.java:370)
at net.sourceforge.ganttproject.document.ProxyDocument.read(ProxyDocument.java:188)
at net.sourceforge.ganttproject.importer.ImporterFromGanttFile.run(ImporterFromGanttFile.java:108)
at net.sourceforge.ganttproject.importer.ImporterFromGanttFile$2.run(ImporterFromGanttFile.java:95)
at net.sourceforge.ganttproject.undo.UndoableEditImpl.(UndoableEditImpl.java:48)
at net.sourceforge.ganttproject.undo.UndoManagerImpl.undoableEdit(UndoManagerImpl.java:72)
at net.sourceforge.ganttproject.importer.ImporterFromGanttFile.run(ImporterFromGanttFile.java:92)
at net.sourceforge.ganttproject.gui.CommandLineProjectOpenStrategy.tryImportDocument(ProjectOpenStrategy.kt:503)
at net.sourceforge.ganttproject.gui.CommandLineProjectOpenStrategy.access$tryImportDocument(ProjectOpenStrategy.kt:462)
at net.sourceforge.ganttproject.gui.CommandLineProjectOpenStrategy$openStartupDocument$2.invokeSuspend(ProjectOpenStrategy.kt:479)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

Status on Harold.gan (44.9 KB)

Please share the project file.

I have attached it already

Status on Harold.gan (44.9 KB)

Hmmm
Does GP use PROLOG language on its components? (just a curiosity)
(or is it just a “logging” component?)

This is not a GanttProject file. This is mostly zero-filled byte array.

This “prolog” comes from XML specification

It was a GanttProject file, not sure how it became corrupted? Just stopped opening and gave me that error message.

I don’t know. There are many reasons why a file may get corrupted, from incomplete sync of the computer memory with disk (what may happen when you extract a USB drive/flash card too early) to bad sectors on disk.

If you have no backup copy, I recommend to look into C:\Users\Jonathan\AppData\Local\Temp and find recently modified files named like _ganttproject_autosave7790626848075965603.gan (digits in the file name will be different). These files are produced when you edit your project, and one of them might be a relatively up to date version of your document.

Copy them all before you start GanttProject again, because it cleans up these files from time to time.