It looks that I have wrong set of libs or so. Any attempt to make echo using <result echo="true"> tag leads to the string
...
[sqlunit] sqlunit-ant: org.jdom.Element.addContent(Lorg/jdom/Element;)Lorg/jdom/Element;
...
in console. The same string is printed as a result of any test failure.
It seems that something goes wrong with either logging or XML processing inside sqlunit.
SQLUnit Version 5.0 and all the included libs is used.
what's wrong? Any help is much appreciated.
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
We did upgrade from JDOM-b8 to JDOM 1.0 and the error message looks suspiciously like an error from JDOM. Will take a look and get back on this thread. Thanks for the test case, that should make figuring this out easier.
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When the C:/Java/SQLUnit/lib directory mentioned in the
....
<fileset dir="C:/Java/SQLUnit/lib">
<include name="*.jar" />
</fileset>
....
contains the set of jars included in version 4.9 (13 jars 3,022,577
bytes total) everything is OK, but when this directory contains the
version 5.0 set (17 jars for 4,727,817 bytes total volume) the string
The classpath for Ant itself includes the standard Ant 1.6.5 set (30
jars, 3,068,331 bytes total). I expect the problem is in the wrong
mixing the jars - the probles looks the same both when SQLUnit is
runned from Eclipse and from command line.
Thanks in advance,
Yaroslav
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Its hard for me to find out where it is getting the CCE because I cannot reproduce it locally, but if you are able to run the code in debug mode with a single test that is giving you this error (to keep the log volume down and readable) and send me the output, it may help me in narrowing it down.
-sujit
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I experienced this problem, too. I resolved it by simply rebuilding the sqlunit-5.0.jar file using the "ant install" command. I built 2 versions, one using jdk1.5.0_12 and another using jdk1.4.2_09. Both of them worked OK (I got the expected error output instead of the weird JDOM message) running with jdk1.5.0_12.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi Sujit and all,
It looks that I have wrong set of libs or so. Any attempt to make echo using <result echo="true"> tag leads to the string
...
[sqlunit] sqlunit-ant: org.jdom.Element.addContent(Lorg/jdom/Element;)Lorg/jdom/Element;
...
in console. The same string is printed as a result of any test failure.
It seems that something goes wrong with either logging or XML processing inside sqlunit.
SQLUnit Version 5.0 and all the included libs is used.
what's wrong? Any help is much appreciated.
Thanks in advance
We did upgrade from JDOM-b8 to JDOM 1.0 and the error message looks suspiciously like an error from JDOM. Will take a look and get back on this thread. Thanks for the test case, that should make figuring this out easier.
-sujit
This problem doesn't exists with version 4.9
I just tried the following test case with the existing code this morning (Sorry, I recently changed jobs, so dont have much time).
<test name="Test of result.echo attribute">
.<call>
..<stmt>aSimpleResult</stmt>
.</call>
.<result echo="true" />
</test>
and I was able to run it without problems. Here is a cut and paste of the trace.
[sujit@cyclone sqlunit]$ ant sqlunit-flat -Dtestfile=test/mock/testecho.xml
sqlunit-flat:
[sqlunit] *** Running SQLUnit file: test/mock/testecho.xml
[sqlunit] Getting connection(DEFAULT)
[sqlunit] Setting up test...
[sqlunit] Running test[1]: Test of result.echo attribute
[sqlunit] echo: (<result>
[sqlunit] <resultset id="1">
[sqlunit] <row id="1">
[sqlunit] <col id="1" name="col1" type="INTEGER">1</col>
[sqlunit] </row>
[sqlunit] </resultset>
[sqlunit] </result>) (0ms)
[sqlunit] Tearing down test...
Can you provide a test case for which you are seeing the problem?
-sujit
Sorry for long silence.
The problem emerge only with the version 4.9 set of libraries. I
believe that the list of testAll.xml file would help in understanding:
------ testAll.xml - central ANT project file -------------
<project name="Hello World" default="run-all-tests" basedir=".">
<target name="run-all-tests" depends="def">
<sqlunit haltOnFailure="false" debug="false">
<fileset dir="packages">
<include name="**/*.xml" />
</fileset>
</sqlunit>
</target>
<target name="def">
<taskdef name="sqlunit"
classname="net.sourceforge.sqlunit.ant.SqlunitTask">
<classpath>
<pathelement
location="C:/oracle/product/10.2.0/db_1/jdbc/lib/ojdbc14.jar" />
<pathelement
location="." />
<fileset dir="C:/Java/SQLUnit/lib">
<include name="*.jar" />
</fileset>
</classpath>
</taskdef>
</target>
</project>
---------------------------
When the C:/Java/SQLUnit/lib directory mentioned in the
....
<fileset dir="C:/Java/SQLUnit/lib">
<include name="*.jar" />
</fileset>
....
contains the set of jars included in version 4.9 (13 jars 3,022,577
bytes total) everything is OK, but when this directory contains the
version 5.0 set (17 jars for 4,727,817 bytes total volume) the string
[sqlunit] sqlunit-ant: org.jdom.Element.addContent(Lorg/jdom/Element;)Lorg/jdom/Element;
emerges in the output instead of any echo.
The classpath for Ant itself includes the standard Ant 1.6.5 set (30
jars, 3,068,331 bytes total). I expect the problem is in the wrong
mixing the jars - the probles looks the same both when SQLUnit is
runned from Eclipse and from command line.
Thanks in advance,
Yaroslav
The problem is with the newer version of JDOM described here:
http://www.jdom.org/pipermail/jdom-interest/2004-March/013627.html
Its hard for me to find out where it is getting the CCE because I cannot reproduce it locally, but if you are able to run the code in debug mode with a single test that is giving you this error (to keep the log volume down and readable) and send me the output, it may help me in narrowing it down.
-sujit
I experienced this problem, too. I resolved it by simply rebuilding the sqlunit-5.0.jar file using the "ant install" command. I built 2 versions, one using jdk1.5.0_12 and another using jdk1.4.2_09. Both of them worked OK (I got the expected error output instead of the weird JDOM message) running with jdk1.5.0_12.