SAXParseException after installing new update in Eclipse

544 views
Skip to first unread message

coolgoose

unread,
Feb 9, 2011, 1:09:53 AM2/9/11
to testng...@googlegroups.com
I upgraded my TestNG plugin again today on 09-Feb-2011 in Eclipse.

If I run my tests, I am getting the following stack trace:

org.testng.TestNGException: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:24)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10)
at org.testng.xml.Parser.parse(Parser.java:170)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:283)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:90)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:174)
Caused by: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:701)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:1020)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:669)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:954)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17)
... 6 more

Nalin Makar

unread,
Feb 9, 2011, 1:13:45 AM2/9/11
to testng...@googlegroups.com
Are you using an xml to run tests? Can you show the XML? 

-nalin



--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.

Cédric Beust ♔

unread,
Feb 9, 2011, 1:20:10 AM2/9/11
to testng...@googlegroups.com
I made a few changes today that might have caused that, I'll look into it.

On Tue, Feb 8, 2011 at 10:09 PM, coolgoose <dinesh.r...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.



--
Cédric


coolgoose

unread,
Feb 9, 2011, 1:23:55 AM2/9/11
to testng...@googlegroups.com
It was working fine for me till yesterday. I saw a different thread today regarding an issue in ISuiteListener and guess some change might have been done in the plugin. Not sure if that is causing my issue.

Please find the testng.xml below:

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<!-- =============================================
      @file testng.xml
      @author Dinesh
     ============================================= -->
     
<suite name="Automation Tests" verbose="1">
<listeners>
<listener class-name="common.MyListener" />
</listeners>

<test name="XTests">
<classes>
<class name="sas.BuildAcceptanceTests" />
</classes>
</test>

<test name="YTests">
<classes>
<class name="ebe.SampleTests" />
</classes>
</test>
</suite>

coolgoose

unread,
Feb 9, 2011, 1:33:33 AM2/9/11
to testng...@googlegroups.com
FYI,
TestNG 5.14.6.20110207_1250 (Worked fine)

TestNG 5.14.10.20110208_1451 (Causes SAX Exception)

-Dinesh

unguiculus

unread,
Feb 9, 2011, 3:21:19 AM2/9/11
to testng-users
I'm having this problem as well.

Reinhard

coolgoose

unread,
Feb 9, 2011, 3:45:56 AM2/9/11
to testng...@googlegroups.com
Hi Reinhard,

Till the fix is available, you may want to try reverting to this plugin version:

Cédric Beust ♔

unread,
Feb 9, 2011, 12:46:31 PM2/9/11
to testng...@googlegroups.com
This seems to be a pretty widespread exception, so it's not related to just TestNG. I still suspect the changes I made yesterday to have introduced this but I'm at a loss understanding it right now, mostly because I can't reproduce this error at all. I tried running a testng.xml file, an individual class, a group, and all worked fine.

How are you running your test to make this happen exactly?

Could you zip your project (or a small version of it) and email it to me?

Some people on the web suggested that this has to do with extra characters appearing before the <xml prologue, but I'm not even seeing this in your XML file so I'm stumped.

-- 
Cédric


On Tue, Feb 8, 2011 at 10:09 PM, coolgoose <dinesh.r...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.



--
Cédric


Cédric Beust ♔

unread,
Feb 9, 2011, 1:00:22 PM2/9/11
to testng...@googlegroups.com
Ok I think I figured it out, can you update your plug-in and report back?

-- 
Cédric


On Tue, Feb 8, 2011 at 10:09 PM, coolgoose <dinesh.r...@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.



--
Cédric


coolgoose

unread,
Feb 9, 2011, 1:06:14 PM2/9/11
to testng...@googlegroups.com
Hi Cedric,

Saw your reply just now. Will update the plug-in now and get back to you.

-Dinesh

coolgoose

unread,
Feb 9, 2011, 1:20:51 PM2/9/11
to testng...@googlegroups.com
It is working fine now after upgrading the plug-in to the latest version. :)

kcjavaman

unread,
Feb 9, 2011, 1:23:14 PM2/9/11
to testng-users
I was having the same issue this morning. I just got the latest
plugin and the issue is corrected. Thank you for the quick turn
around!

Jailton Jr

unread,
Feb 9, 2011, 2:09:16 PM2/9/11
to testng-users
Hey everybod! It happnes with me! my instaled plugin is: TestNG
5.14.10.20110209_0957 org.testng.eclipse.feature.group

Someone can helpe me?

Jailton Jr

unread,
Feb 9, 2011, 2:30:27 PM2/9/11
to testng-users
Hey KCjavaman, what exactly version you have instaled? I My version is
"TestNG
5.14.10.20110209_0957" probabily the latest version available.

coolgoose

unread,
Feb 9, 2011, 2:35:00 PM2/9/11
to testng...@googlegroups.com
Do you want to give a try with the latest one now,   TestNG5.14.10.20110209_1103?

5.14.10.20110209_0957 worked fine for me though.

-Dinesh

kcjavaman

unread,
Feb 9, 2011, 2:39:35 PM2/9/11
to testng-users
I used the same version you tried (5.14.10.20110209_0957), but it has
been working fine for me. I am running in MyEclipse Blue Edition. I
have not moved up to the latest edition yet since there may be issues
with it. Let me know if that one seems to be working okay.

Thanks!

Jailton Jr

unread,
Feb 9, 2011, 2:43:07 PM2/9/11
to testng-users
I'm updating my plugin version to: " TestNG 5.14.10.20110209_1103
org.testng.eclipse.feature.group" and the erro happens! My eclipse is:
Galileo

org.testng.TestNGException: org.xml.sax.SAXParseException: The
processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:24)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10)
at org.testng.xml.Parser.parse(Parser.java:170)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:283)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:90)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:174)
Caused by: org.xml.sax.SAXParseException: The processing instruction
target matching "[xX][mM][lL]" is not allowed.
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:
195)
at
com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:
174)
at
com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:
388)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:
1411)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:
701)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:
1016)
at
com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:
669)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2956)

Jailton Jr

unread,
Feb 9, 2011, 2:45:31 PM2/9/11
to testng-users
My testng.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" parallel="none">
<test name="Test" preserve-order="false">
<classes>
<?xml version="1.0" encoding="UTF-8"?>
<class name="br.com.XXX.testCases.CDU001"/>
<?xml version="1.0" encoding="UTF-8"?>
<class name="br.com.XXX.testCases.CDU002"/>
</classes>
</test>
</suite>

Cédric Beust ♔

unread,
Feb 9, 2011, 2:49:55 PM2/9/11
to testng...@googlegroups.com
Jailton,

Since everyone who upgraded their plug-in no longer have this problem except you, I'm suspecting something wrong with your environment. Can you try this again on a fresh workspace?

If the problem persists, please email me a zipped version of your Eclipse project, trimmed down as much as possible, and let me know how exactly you are running your test.

Thanks.

-- 
Cédric


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.




--
Cédric


Jailton Jr

unread,
Feb 9, 2011, 2:53:29 PM2/9/11
to testng-users
Hey Cédric, I found the bug... TestNG is generated wrong xml, look the
6 line of my XML (<?xml version="1.0" encoding="UTF-8"?> ), It's
generating when i right click in TestClass and Generate TestNG.

Btw, I remove this line and tests running perfectly!

On 9 fev, 17:49, Cédric Beust ♔ <ced...@beust.com> wrote:
> Jailton,
>
> Since everyone who upgraded their plug-in no longer have this problem except
> you, I'm suspecting something wrong with your environment. Can you try this
> again on a fresh workspace?
>
> If the problem persists, please email me a zipped version of your Eclipse
> project, trimmed down as much as possible, and let me know how exactly you
> are running your test.
>
> Thanks.
>
> --
> Cédric
>

Cédric Beust ♔

unread,
Feb 9, 2011, 2:56:50 PM2/9/11
to testng...@googlegroups.com
Yes, I'm aware of what's going on and it's possible that I didn't fix all the occurrences where it's happening.

Can you tell me exactly how you make this happen? I don't know of a "Generate TestNG" menu...

-- 
Cédric

Jailton Jr

unread,
Feb 9, 2011, 3:05:44 PM2/9/11
to testng-users, Cédric Beust ♔
I send for you a print screen, I hope it help u!

Cédric Beust ♔

unread,
Feb 9, 2011, 4:02:38 PM2/9/11
to Jailton Jr, testng-users
Indeed, I had forgotten that one. I just fixed it, can you update and report back?

-- 
Cédric


2011/2/9 Jailton Jr <jailton...@gmail.com>



--
Cédric


Jailton Jr

unread,
Feb 14, 2011, 5:34:04 AM2/14/11
to testng-users
Cédric it's working good now! thanks again!

On 9 fev, 19:02, Cédric Beust ♔ <ced...@beust.com> wrote:
> Indeed, I had forgotten that one. I just fixed it, can you update and report
> back?
>
> --
> Cédric
>
> 2011/2/9 Jailton Jr <jailtonalki...@gmail.com>
>
>
>
> > I send for you a print screen, I hope it help u!
>
> > On 9 fev, 17:56, Cédric Beust ♔ <ced...@beust.com> wrote:
> > > Yes, I'm aware of what's going on and it's possible that I didn't fix all
> > > the occurrences where it's happening.
>
> > > Can you tell me exactly how you make this happen? I don't know of a
> > > "Generate TestNG" menu...
>
> > > --
> > > Cédric
>
> > > On Wed, Feb 9, 2011 at 11:53 AM, Jailton Jr <jailtonalki...@gmail.com
Reply all
Reply to author
Forward
0 new messages