Open jiangfeng1124 opened 10 years ago
Hi Jiang,
Your Java classpath does not include the GNU Trove library, so the exception is expect. You need to either (1) download the GNU Trove library and include in your classpath, or (2) run "mvn package," which will wrap all of the dependencies in the jar file at target/sspace-2.0.4-jar-with-dependencies.jar , which you can then include in your classpath.
Thanks, David
On Tue, Apr 1, 2014 at 8:47 PM, jiangfeng notifications@github.com wrote:
Dear developers,
I passed the "mvn compile" and "mvn test" step. But I met the following problems while running:
java -cp target/classes edu.ucla.sspace.mains.VsmMain -d data/test.txt data/ -o text
java.lang.NoClassDefFoundError: gnu/trove/map/TObjectIntMap at edu.ucla.sspace.common.GenericTermDocumentVectorSpace.processDocument(GenericTermDocumentVectorSpace.java:199) at edu.ucla.sspace.mains.GenericMain$1.run(GenericMain.java:586) at edu.ucla.sspace.util.WorkQueue$CountingRunnable.run(WorkQueue.java:361) at edu.ucla.sspace.util.WorkerThread.run(WorkerThread.java:110) Caused by: java.lang.ClassNotFoundException: gnu.trove.map.TObjectIntMap 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) ... 4 more
How could I solve it?
Reply to this email directly or view it on GitHubhttps://github.com/fozziethebeat/S-Space/issues/49 .
Thanks a lot David! Not so familiar with maven :-)
In my case (OSX) running "mvn package" builds sspace-2.0.4.jar without any dependencies. Running "mvn assembly:single" builds sspace-2.0.4-jar-with-dependencies.jar which contains gnu.trove classes but not sspace classes.
sspace-2.0.4.jar contains these packages:
sspace-2.0.4-jar-with-dependencies.jar contains only one package:
Also for those who have build issues related to SVD library: 1) create new temp folder, inside run this: 2) git clone https://github.com/lucasmaystre/svdlibc.git 3) cd svdlibc 4) make 5) sudo make install
Dear developers,
I passed the "mvn compile" and "mvn test" step. But I met the following problems while running:
java -cp target/classes edu.ucla.sspace.mains.VsmMain -d data/test.txt data/ -o text
How could I solve it?