--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Is this related in any way to recent changes that was done to the DTD as part of https://github.com/cbeust/testng/issues/1383 ?
Cedric,
I ran a test locally in the TestNG codebase which re-iterates what you said.
I renamed the TestNG DTD in the codebase to something else and then kicked off a test.
I noticed the below error message
WARNING: couldn't find in classpath http://beust.com/testng/testng-1.0.dtd
Fetching it from the Web site.
org.testng.TestNGException: org.xml.sax.SAXParseException; systemId: http://testng.org/testng-1.0.dtd; lineNumber: 1; columnNumber: 3; The markup declarations contained or pointed to by the document type declaration must be well-formed.
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:324)
We do have an explicit warning in the code (It’s a System.out.println though) which calls out explicitly that its trying to fetch from the website. (This warning has been there for more than 10 years now).
So I think the resolver is working fine here…
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
From: <testng...@googlegroups.com> on behalf of Nikesh Jauhari <nikesh....@gmail.com>
Reply-To: <testng...@googlegroups.com>
Date: Wednesday, March 15, 2017 at 9:20 AM
To: <testng...@googlegroups.com>
Subject: Re: [testng-users] SAXParseException; systemId: http://testng.org/testng-1.0.dtd
ok
we generate tons of testng xml on the fly for execution (and do some parsing) and these generated xml got the dtd reference to "http://testng.org/testng-1.0.dtd"
how do we solve this, lots of our clients are impacted with this change.
Thanks,
Nikesh
On Tue, Mar 14, 2017 at 11:44 PM, Cédric Beust ♔ <ced...@beust.com> wrote:
On Tue, Mar 14, 2017 at 8:32 PM, ⇜Krishnan Mahadevan⇝ <krishnan.ma...@gmail.com> wrote:
Is this related in any way to recent changes that was done to the DTD as part of https://github.com/cbeust/testng/issues/1383 ?
Extremely likely, yes :-(
However, what's weird is that TestNG should be using its internal resolver to use the DTD that ships in the .jar, so theoretically, changing the DTD on the web should have had very little impact. I suspect the resolver might not be working correctly and as a result, each TestNG run is actually fetching that DTD from the web, which is a terrible prospect...
--
Cédric
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
WARNING: couldn't find in classpath http://beust.com/testng/testng-1.0.dtd
Cedric,
Its trying to load just the DTD viz., “/testing-1.0.dtd” and NOT as a URL.
When it fails to load the resource, the error msg prints the publicId that’s passed to us via the resolveEntity() method. So I guess we are fine.
I don’t think there is any problems with the DTD as such as well that is hosted.
Here’s what I did. I deleted src/main/resources/testing-1.0.dtd and then downloaded the dtd
✔ ~/githome/OpenSource/testng/src/main/resources [master L|✚ 1…4⚑ 1]
09:41 $ wget http://testng.org/testng-1.0.dtd
--2017-03-15 09:51:24-- http://testng.org/testng-1.0.dtd
Resolving testng.org... 205.186.183.235
Connecting to testng.org|205.186.183.235|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/cbeust/testng/master/src/main/resources/testng-1.0.dtd [following]
--2017-03-15 09:51:25-- https://raw.githubusercontent.com/cbeust/testng/master/src/main/resources/testng-1.0.dtd
Resolving raw.githubusercontent.com... 151.101.100.133
Connecting to raw.githubusercontent.com|151.101.100.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8337 (8.1K) [text/plain]
Saving to: ‘testng-1.0.dtd’
testng-1.0.dtd 100%[================================================================================================================>] 8.14K --.-KB/s in 0.005s
2017-03-15 09:51:26 (1.72 MB/s) - ‘testng-1.0.dtd’ saved [8337/8337]
Now when I ran my test again, it worked fine.
The only issue seems to be when we don’t find a local dtd version in our Jar, and try to reach to the internet to get a valid one.
Error msg that I am seeing when setting up break-points:
:http://testng.org/testng-1.0.dtd:http://testng.org/testng-1.0.dtd:http://testng.org/testng-1.0.dtd:1:3:6:The markup declarations contained or pointed to by the document type declaration must be well-formed.
And oh btw, I downloaded eclipse, and validated the dtd that was downloaded. There were no errors.
Would this redirection have something to do here?
Thanks & Regards
Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/
From: <cbe...@gmail.com> on behalf of Cédric Beust ♔ <ced...@beust.com>
Reply-To: <testng...@googlegroups.com>
Date: Wednesday, March 15, 2017 at 9:36 AM
To: <testng...@googlegroups.com>
Subject: Re: [testng-users] SAXParseException; systemId: http://testng.org/testng-1.0.dtd
On Tue, Mar 14, 2017 at 8:57 PM, Krishnan Mahadevan <krishnan.ma...@gmail.com> wrote:
WARNING: couldn't find in classpath http://beust.com/testng/testng-1.0.dtd
Is TestNG trying to load the resource as a URL string ("http://...") and not a resource ("/testng-1.0.dtd")?
Also, could the comments at the top of the DTD be the reason for the errors?
--
Cédric
--
--
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users+unsubscribe@googlegroups.com.
Thanks for the detailed analysis, Krishnan, very helpful.I think your hunch about redirection might be correct...
--Cédric
--Cédric
--
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.