got a error when run "ant test"

19 views
Skip to first unread message

Johnny Zhang

unread,
Mar 2, 2012, 6:45:57 PM3/2/12
to DataFu
Hi, all:
I got below when run "ant test"

[testng] FAILED: wilsonTest
[testng] java.lang.NullPointerException
[testng] at datafu.test.pig.PigTests.getJarPath(PigTests.java:95)
[testng] at datafu.test.pig.PigTests.getDefaultArgs(PigTests.java:
25)
[testng] at
datafu.test.pig.PigTests.getDefaultArgsAsList(PigTests.java:33)
.......

look at the code near 95 of test/pig/datafu/test/pig/PigTests.java
....
String jarDirPath = new File(System.getProperty("user.dir"),
jarDir).getAbsolutePath();

File userDir = new File(jarDirPath);

String[] files = userDir.list(new FilenameFilter() {

@Override
public boolean accept(File dir, String name)
{
return name.endsWith(".jar") && !name.contains("sources") && !
name.contains("javadoc");
}

});

if (files.length == 0)
.....
looks like user.dir is not set up, but when I run "ant test -
Duser.dir=<current working dir>", the same error, any idea? Thanks.

Johnny Zhang

unread,
Mar 2, 2012, 7:05:01 PM3/2/12
to DataFu
has been resolved, never mind, thanks
Reply all
Reply to author
Forward
0 new messages