Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

workspace.xml file corrupted (Error on line 1: Content is not allowed in prolog) in IntelliJ, how can I fix it?

I am experimenting a very annoying issue using IntelliJ.

I was working on my project (a webapp deployed on a local instance of BEA weblogic application server) and suddenly my PC crash and I restarted it.

Coming back to my project I obtained this error:

Cannot convert project: C:\projects\Main\MyProject\workspace.xml: Error on line 1: Content is not allowed in prolog.

and looking inside the workspace.xml file of my project it contains something like it:

nulnulnulnulnul....

So, I delete it and I restart IntelliJ (I read onlyne that I have to do in this way) so IntelliJ create it and I can open my project again inside IntelliJ but now the problem is that I can't run it (the Run and Debug icons are disabled).

What could be the problem? and how can I try to solve this issue?

Tnx

like image 955
AndreaNobili Avatar asked Apr 13 '15 11:04

AndreaNobili


People also ask

How add XML to IntelliJ?

In the Project tool window, select the directory, where the build file should be created. Right-click the directory and from the context menu, select New | File ( Alt+Insert ). In the New File dialog, specify the name of the new file with the xml extension, for example, build. xml.

Does IntelliJ support XML?

IntelliJ IDEA brings powerful support for XML that includes structure validation, formatting ( Ctrl+Alt+L ) and indentation ( Ctrl+Alt+I according to the XML code style, importing unbound namespaces, viewing code structure, unwrapping and removing tags ( Ctrl+Shift+Delete ), generating DTD files and schemas from ...


2 Answers

I experienced the same error. I deleted the workspace.xml and started 'Invalid Caches/Restart" under "File". Then I had to recreate my Run/Debug Configuration. Then everything works like before.

like image 169
0x44656E6E79 Avatar answered Oct 20 '22 14:10

0x44656E6E79


I experienced same problem.you can solve it by deleting ant.xml, then everything will be fine.

like image 43
Siddharth Patel Avatar answered Oct 20 '22 13:10

Siddharth Patel