Hi,we're trying to run a junittest case for a method which is using saxon9-dom.jar.In eclipse,we just right click on the test class/run as junit (no ant script),and it throws the error "DOMSource cannot be processed: check that saxon9-dom.jar is on the classpath
The method is working when called from the main class on a normal run.The saxon9-dom.jar was/is in the project classpath(checked both,in eclipse and opening the .classpath file) .It has been added again separately under 'libraries'.It's on the 'run configurations/classpath' too.It was even put within the classpath for the 'environment variables' of the PC...nothing works,always the same result/error.
Welcome to CodeRanch! I've linked to the StackOverflow crosspost so people posting here can see if it has already been answered. (We ask for this so people don't waste time answering a question that's already been answered.)
On to your question. You are using the built in JUnit, right? The following shouldn't happen, but it would explain the behavior you are seeing:
Do you have the JUNIT_HOME variable set by any chance? Either within Eclipse or on the command line. If so, does the lib folder contain a competing jar?
thanks for the reply and the link.Actually I posted that one on stackOverFlow forum,but I wasn't getting any answers so I posted here too.
JUNIT_HOME variable is not set on environment variables.I haven't got a different installation for junit,just using the in built one in the plugins.
Junit4 has been added to the classpath of the project,and all the other junit tests on other classes/methods are working fine.The jar we have
is the "saxon-18.104.22.168.jar"...I can only think of getting exactly the saxon9-dom.jar,just in caseJunit4 only recognizes that one and not the one we've got...
author & internet detective