eclipse 3.2, upgrade to TestNG, tests failed with missing "TreeWalker"

24 views
Skip to first unread message

Gary McWilliams

unread,
Aug 2, 2006, 10:23:33 AM8/2/06
to testng-users
I have eclipse 3.2. I have a set of TestNG tests that have been running
fine under TestNG4.7.

I have now updated the plugin to TestNG 5.0.1 and the test s are now
failing:

java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker
at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:821)
at
org.testng.reporters.JUnitXMLReporter.generateReport(JUnitXMLReporter.java:179)
at
org.testng.reporters.JUnitXMLReporter.onFinish(JUnitXMLReporter.java:105)
at org.testng.TestRunner.fireEvent(TestRunner.java:847)
at org.testng.TestRunner.afterRun(TestRunner.java:699)
at org.testng.TestRunner.run(TestRunner.java:569)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:220)
at org.testng.SuiteRunner.run(SuiteRunner.java:146)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:713)
at org.testng.TestNG.runSuitesLocally(TestNG.java:676)
at org.testng.TestNG.run(TestNG.java:444)
at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:85)
at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:127)


I have checked that I am running under a Java5 environment (if that
matters).

I cannot see why the test has failed simply due to this plugin upgrade.

I am right-clicking and selecting the 'Run as TestNG test' from the
context menu.
I've checked the created TestNG context suite and it all looks correct
to me.
I've also check (as much as I can) in the Eclipse "Configuration
details" and it looks like the 5.0.1 plugin is successfully being used.

Alexandru Popescu

unread,
Aug 2, 2006, 4:03:34 PM8/2/06
to testng...@googlegroups.com

Gary if you take a look at .log you will find the classpath used to
run your tests. Can you identify any problems in there?

./alex
--
.w( the_mindstorm )p.

>
> >
>

Gary McWilliams

unread,
Aug 3, 2006, 4:02:12 AM8/3/06
to testng-users
Not really, it looks fine.

I'm not sure if the 'treewalker' problem is from the plugin or if it's
a dependency in my code.

This problem was initially reported by a colleague.
At that time, I had eclipse 3.2, but using testng4.7.
So I re-built the project and ran the test. It worked fine.
All I then did was run the eclipse updater to get testng5.0.1.
Re-ran the test and it's broken.

I'm not at all sure where the dependency for the "treewalker" is.
Is this a missing testng dependency, or is this a missing dependency in
my code (which 5.0.1 is finding, whereas 4.7 did not). Any ideas?

!MESSAGE
[/D:/tools/eclipse/eclipseplugins/testng/eclipse/plugins/org.testng.eclipse_5.0.1.0/eclipse-testng.jar,
...[snip]...
D:\tools\eclipse\eclipseplugins\testng\eclipse\plugins\org.testng.eclipse_5.0.1.0\lib\testng-jdk15.jar,
...[snip]...]

Gary McWilliams

unread,
Aug 3, 2006, 4:36:33 AM8/3/06
to testng-users
ok. It looks like
org/apache/xml/serializer/TreeWalker
is some dependency issue with xalan. The version of xalan I have within
my project seems to be 2.7.0, which does not have that class (at least
my xalan.jar file doesn't have it, although the documentation seems to
indicate it should).

Does TestNG (for JUnitXMLReporter) require any specific xml libs to be
on the classpath?

Alexandru Popescu

unread,
Aug 3, 2006, 4:57:52 AM8/3/06
to testng...@googlegroups.com
#: Gary McWilliams changed the world a bit at a time by saying (astral date: 8/3/2006 11:36 AM) :#

As far as I know TestNG is not using anything special and it is trying to get its hands on any
available transformer.

Gary McWilliams

unread,
Aug 3, 2006, 7:35:42 AM8/3/06
to testng-users
ok, just to round this of (in case it ever happens again), adding
serializer.jar to the classpath fixes this problem.

Reply all
Reply to author
Forward
0 new messages