Tuesday, October 9, 2007

Seam and TestNG and a missing rar file

Generated a new project with seam-gen.

Had a problem with the build.xml's "test" task. I got the error "You need to specify at least one testng.xml or one class"

I downloaded last night's snapshot from JBoss. (On a side note, I've started using Hudson after seeing it used by JBoss, and its very nice. I like it more than Continuum and CruiseControl.) Same error.

I added a testng.xml file to src/test directory.

I changed buildxml :
added "<include name="**/*.class"/>" to line 282
added "<copy tofile="${test.dir}/testng.xml" file="${src.test.dir}/testng.xml" overwrite="true"/>" to line 296.
changed line 320 (324 after adding the above) to "<xmlfileset dir="${test.dir}" includes="testng.xml" />"

The test ran, which was good; however, there were errors in the output.
"Error parsing meta data jboss-local-jdbc.rar"

Looking through the output I noticed that there was an io.FileNotFound for "C:\Documents%20%and%20%Settings." The actual file was referenced correctly in several of the other lines, but I decided to start over with seam-gen and put the folder directly on the C drive with no spaces.

It worked.

The moral : put my Eclipse workspaces on the C drive.

Blogged with Flock

3 comments:

Alex said...

At work with rar file there is a good tool-repair winrar file,which has free status as far as I know,software repair corrupted archives of RAR format, when it is not possible to redownload these files or other copies are absent,works with Windows 98, Windows Me, Windows NT 4.0, Windows 2000, Windows XP, Windows XP SP2, Windows 2003 and Windows Vista, i.e. this software for repair Winrar file header works with all supported versions of this operating system,program will ask to choose a file of rar format, that will be opened and analyzed for errors,opens even corrupted archives with rar extension.

Alex said...

Of all files which I use more rar files,consequently I had many problems with them,for work out like issues some time ago I started to use this tool-rar file header fix,it has many pluses such as,it is free as is known,utiltiy has many features,besides that it can process RAR files, that were corrupted as a result of virus infections, hardware failures, media errors and other problems,program is a good alternative to expensive data recovery services, it saves a lot of time, providing the same effectiveness,was developed to reconstruct corrupted archives in RAR format, this program provides good chances for successful recovery even from seriously damaged RAR files,effectively works with RAR archives up to 4 Gb.

ajay said...

I ran my testng test from eclipse and it was succesfull but i am facing difficulty when i am running my testng test from ant.
so could you plz tell me how exactly and the order we follow to run from ant without using eclipse.and i would really appreciate if u can post a simple example of how to run a testng test from ant script.