unclebob / fitnesse

FitNesse -- The Acceptance Test Wiki
fitnesse.org
Other
2.04k stars 715 forks source link

java.lang.RuntimeException: Unable to parse XML from stream 20160515 and later #990

Open pjpark opened 7 years ago

pjpark commented 7 years ago

Receive error "java.lang.RuntimeException: Unable to parse XML from stream" when trying to move a test (?refactor&type=move) in version 20160515 or later.

D:\Fitnesse>java -version java version "1.8.0_111" Java(TM) SE Runtime Environment (build 1.8.0_111-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.111-b14, mixed mode)

amolenaar commented 7 years ago

Does this happen with any page (e.g. when moving a user guide page)?

pjpark commented 7 years ago

Yes.

amolenaar commented 7 years ago

Is this a vanilla FitNesse installation? Can you send me an exampe? I can't reproduce it (Java 1.8.0_102 on macOs).

pjpark commented 7 years ago

Fit + FitSharp + dbFit. We've been using FitNesse for at least 8 years and have a huge amount of tests and test history. 20161106 extracted to a different empty directory on the same servers does not have any issues. 20151230 and before in the production environment do not have any issues. I am attempting to reduce the differences to the minimum required to recreate the issue.

amolenaar commented 7 years ago

Thank you. Does FitNesse also provide a stack trace?

pjpark commented 7 years ago

No, just the error message.

pjpark commented 7 years ago

I was able solve the problem by deleting the FitNesse user guide X:\Fitnesse20161106\FitNesseRoot\FitNesse and replacing it with the user guide from a virgin FitNesse20161106 installation.

Confirmed by doing it twice.

User Guide that will cause java.lang.RuntimeException: Unable to parse XML from stream

pjpark commented 7 years ago

The fix above got rid of the error but the move page is still slow as heck to load. Something got seriously messed up with it between 20151230 and 20160515.

Our FitNesse site has around 1400 directories and 9000 files. That probably has something to do with it.

Edit: Yep, it appears that the code to load the New Location dropdown is performing very badly.

amolenaar commented 7 years ago

Indeed, for our convenience the page names are loaded along with the page. This seemed like a good idea :)

Can you share the FitNesseRoot with faulty page? It explains why you'll see the error, irregardless of where the faulty page content is.

Windows is not very good with many, many small files.

Update: you already shared it, I should have read all comments more carefully.

amolenaar commented 7 years ago

The error was caused by invalid XML in FitNesse/WikiImport/properties.xml. The question is, however, how to deal with this. In this case letting the complete functionality crash is a bit rude.

<?xml version="1.0"?>
<properties>
        <Files/>
        <LastModified>20060717210234</LastModified>
        <LastModifyingUser>docs</LastModifyingUser>
        <RecentChanges/>
        <WhereUsed/>