You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2016/08/11 10:09:21 UTC

[Bug 59973] New: Issue with XML version in JTL files

https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

            Bug ID: 59973
           Summary: Issue with XML version in JTL files
           Product: JMeter
           Version: 3.0
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: apc4@ya.ru

When JMeter writes XML JTL files, it uses header with XML version 1.0
declared
(https://github.com/apache/jmeter/blob/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java#L82)

Here's example that I generated with ResultCollector, reproducing the
issue from one of the users:

<?xml version="1.0" encoding="UTF-8"?>
<testResults version="1.2">
<sample t="0" it="0" lt="0" ts="1469356444856" s="false" lb="" rc=""
rm="&#x9;" tn="" dt="" by="0" ng="0" na="0"/>

</testResults>

If we will use strict XML parser, like http://www.validome.org/validate
or other strict XML reading library, we will get the error for the above
text, because &#x9 is a character entity, only allowed in XML 1.1.
XStream writer that we use generates XML 1.1 data and there is FAQ entry
for this case: http://x-stream.github.io/faq.html#XML_control_char

It is a bug of writing file body as XML 1.1 while
declaration says 1.0.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

--- Comment #6 from Milamber <mi...@apache.org> ---

Test case :

- Compile JMeter from trunk (ant distribution)
- unzip the binary, launch JMeter (with Java8)
- Create a simple test plan:
Thread Group
   |-- HTTP request
   |-- View Results Tree with a file to record into JTL (inside Configure
button select all options)
- Run
- Close JMeter and reopen
- Add a View Results Tree, a try to open the jtl file from the simple test.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

Milamber <mi...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED

--- Comment #2 from Milamber <mi...@apache.org> ---


The first commits introduce a regression I think.

With the trunk version, if I try to open a JTL file (recorded by trunk version
too) into a listenr, I have this error message (the listener dont display the
results) :

2016/08/17 10:11:28 WARN  - jmeter.reporters.ResultCollector: Failed to load
/directory/Results-20160816-1625.jtl using XStream. Error was:
com.thoughtworks.xstream.io.StreamException:  : only 1.0 is supported as <?xml
version not '1.1' (position: START_DOCUMENT seen <?xml version="1.1"... @1:19)

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |58679


Referenced Bugs:

https://bz.apache.org/bugzilla/show_bug.cgi?id=58679
[Bug 58679] Replace the xpp pull parser in xstream with a java6+ standard
solution
-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

--- Comment #11 from Andrey Pokhilko <ap...@ya.ru> ---
Date: Wed Aug 17 20:11:30 2016
New Revision: 1756681

URL: http://svn.apache.org/viewvc?rev=1756681&view=rev
Log:
Bug 59973 - revert all modifications

Modified:
    jmeter/trunk/bin/testfiles/BatchTestLocal.xml
    jmeter/trunk/bin/testfiles/BatchTestLocalRemote.xml
    jmeter/trunk/bin/testfiles/Bug47165.xml
    jmeter/trunk/bin/testfiles/Bug50898.xml
    jmeter/trunk/bin/testfiles/Bug52310.xml
    jmeter/trunk/bin/testfiles/Bug52968.xml
    jmeter/trunk/bin/testfiles/Bug54685.xml
    jmeter/trunk/bin/testfiles/Bug55375.xml
    jmeter/trunk/bin/testfiles/Bug56243.xml
    jmeter/trunk/bin/testfiles/Bug56811.xml
    jmeter/trunk/bin/testfiles/HTMLParserTestFile_2.xml
    jmeter/trunk/bin/testfiles/TEST_HTTPS.xml
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
    jmeter/trunk/xdocs/changes.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

--- Comment #8 from Andrey Pokhilko <ap...@ya.ru> ---
I have reverted the modifications

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

Andrey Pokhilko <ap...@ya.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Andrey Pokhilko <ap...@ya.ru> ---
Date: Thu Aug 11 10:27:45 2016
New Revision: 1755929

URL: http://svn.apache.org/viewvc?rev=1755929&view=rev
Log:
Bug 59973 - Issue with XML version in JTL files

Modified:
    jmeter/trunk/bin/testfiles/BatchTestLocal.xml
    jmeter/trunk/bin/testfiles/BatchTestLocalRemote.xml
    jmeter/trunk/bin/testfiles/Bug47165.xml
    jmeter/trunk/bin/testfiles/Bug50898.xml
    jmeter/trunk/bin/testfiles/Bug52310.xml
    jmeter/trunk/bin/testfiles/Bug52968.xml
    jmeter/trunk/bin/testfiles/Bug54685.xml
    jmeter/trunk/bin/testfiles/Bug55375.xml
    jmeter/trunk/bin/testfiles/Bug56243.xml
    jmeter/trunk/bin/testfiles/Bug56811.xml
    jmeter/trunk/bin/testfiles/HTMLParserTestFile_2.xml
    jmeter/trunk/bin/testfiles/TEST_HTTPS.xml
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
    jmeter/trunk/xdocs/changes.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

--- Comment #10 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
And this https://github.com/x-stream/xstream/issues/51#issuecomment-210155359

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WONTFIX                     |---

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

--- Comment #7 from Andrey Pokhilko <ap...@ya.ru> ---
Thanks for the reproducing case. I have investigated it and found that issue is
in xpp3 library we use. It is 10 years old and has xml 1.0 requirement
hardcoded into it. There are no newer versions of this library that could load
XML 1.1.
So it's a deadlock: we write XML 1.1 as body, we state that it's 1.0 in header
because reading flow is unable to accept 1.1 header. However, it perfectly eats
1.1 body, which means that xpp3 does not conform to XML standard.

From their FAQ (http://x-stream.github.io/faq.html#XML_control_char) I can
assume that the only way is to rollback my changes. Also, we should document
somewhere here
(http://jmeter.apache.org/usermanual/listeners.html#xmlformat2.1) that JTL and
JMX files produced by JMeter do not conform XML 1.0 standard and cannot be read
by strict parsers. Users should be aware of this issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

--- Comment #3 from Andrey Pokhilko <ap...@ya.ru> ---
Funny... Xstream writes XML 1.1, but requires 1.0 declaration... I'll
investigate it more

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

Andrey Pokhilko <ap...@ya.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #12 from Andrey Pokhilko <ap...@ya.ru> ---
Date: Wed Aug 17 20:24:21 2016
New Revision: 1756682

URL: http://svn.apache.org/viewvc?rev=1756682&view=rev
Log:
Bug 59973 - document non-standard XML in docs and code

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/reporters/ResultCollector.java
    jmeter/trunk/xdocs/usermanual/component_reference.xml

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

Philippe Mouawad <p....@ubik-ingenierie.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mouawad@ubik-ingenierie.c
                   |                            |om

--- Comment #9 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
(In reply to Andrey Pokhilko from comment #7)
> Thanks for the reproducing case. I have investigated it and found that issue
> is in xpp3 library we use. It is 10 years old and has xml 1.0 requirement
> hardcoded into it. There are no newer versions of this library that could
> load XML 1.1.
> So it's a deadlock: we write XML 1.1 as body, we state that it's 1.0 in
> header because reading flow is unable to accept 1.1 header. However, it
> perfectly eats 1.1 body, which means that xpp3 does not conform to XML
> standard.
> 
> From their FAQ (http://x-stream.github.io/faq.html#XML_control_char) I can
> assume that the only way is to rollback my changes. Also, we should document
> somewhere here
> (http://jmeter.apache.org/usermanual/listeners.html#xmlformat2.1) that JTL
> and JMX files produced by JMeter do not conform XML 1.0 standard and cannot
> be read by strict parsers. Users should be aware of this issue.

See this Bug 58679 related to this issue, this would be the final fix.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

--- Comment #5 from Milamber <mi...@apache.org> ---

The version from the trunk: xstream-1.4.8.jar

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Bug 59973] Issue with XML version in JTL files

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=59973

--- Comment #4 from Andrey Pokhilko <ap...@ya.ru> ---
Milamber, which version of XStream library do you have? I have 1.4.8 and don't
experience this. Also, I tried searching for this kind of error message in
XStream sources of 1.4.8 and did not find it.

-- 
You are receiving this mail because:
You are the assignee for the bug.