tamingtext / book

Taming Text Book Source Code
http://www.tamingtext.com
380 stars 207 forks source link

Windows: failed tests and broken sample #9

Closed developmentalmadness closed 10 years ago

developmentalmadness commented 11 years ago

I get the following test failures when building on Windows 7 x64, JDK 7.0_17, MVN 3.0.5. I get the same errors regardless of using the windows command line or buidling from cygwin.

https://gist.github.com/developmentalmadness/5110401 https://gist.github.com/developmentalmadness/5110276 https://gist.github.com/developmentalmadness/5110299

I wouldn't worry too much except I can't run the first example, frankenstein.cmd either:

C:\dev\github\tamingtextbook>"C:\Program Files\Java\jdk1.7.0_17\bin\java" -Xms512m -Xmx1024m -classpath ";.\target\test- classes" com.tamingtext.frankenstein.Frankenstein Exception in thread "main" java.lang.NoClassDefFoundError: opennlp/tools/sentdetect/SentenceDetector at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2451) at java.lang.Class.getMethod0(Class.java:2694) at java.lang.Class.getMethod(Class.java:1622) at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486) Caused by: java.lang.ClassNotFoundException: opennlp.tools.sentdetect.SentenceDetector at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) ... 6 more

C:\dev\github\tamingtextbook>ENDLOCAL

developmentalmadness commented 11 years ago

I fixed two of the broken tests by renaming the index.* files to .idx and the data. files to *.dat. Now the only failing test is ExtractTrainingDataTest:

java.io.IOException: Failed to set permissions of path: \tmp\hadoop-MMiller\mapred\staging\MMiller-1897775905.staging to 0700

https://gist.github.com/developmentalmadness/5111753

Is this because the hadoop samples don't work on Windows?

As for the broken sample, I haven't spent a lot of time with Java. I can tell the class path has been set to ./target/test-classes and I tried manually adding ./target/dependency to the frankenstein.cmd file but it fails with the same error as before.

drewfarris commented 10 years ago

Yes, it looks like this looks like Windows brokenness from the hadoop perspective has been reported in a number of places on the internet. Unfortunately, I'm not capable of reporting back on whether any of the solutions work because I don't have a widows machine to test on.

Filenames for Wordnet seem to be different on windows, trying to track this down in the jwnl code, but not having much luck. If you could send me the exact commands you ran to rename the wordnet files, I'll include them in the readme verbatim.

If there are other fixes you would be able to contribute to the windows scripts, they would be much appreciated. Please re-open this issue or send a pull request.

drewfarris commented 10 years ago

(And thanks!)