Probleem
23:32:36 margusja@IRack> vimjava -classpath target/my-app-1.0-SNAPSHOT.jar com.mycompany.app.App
Exception in thread “main” java.lang.NoClassDefFoundError: org/apache/mahout/cf/taste/model/DataModel
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.getMethod0(Class.java:2685)
at java.lang.Class.getMethod(Class.java:1620)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:492)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:484)
Caused by: java.lang.ClassNotFoundException: org.apache.mahout.cf.taste.model.DataModel
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
Lahendus
Puudus viide org/apache/mahout/cf/taste/model/DataModel, mida saab häda pärast täpsustada:
00:06:39 margusja@IRack> javjava -classpath target/my-app-1.0-SNAPSHOT.jar:target/mahout-core-0.8-20121116.235610-121.jar com.mycompany.app.App