Hi,
I have installed some packages and can run some classifiers with php-weka-wrapper such as libSVM. However, I get some errors when try to show all installed packages in weka. Could anyone help me. ( I attached the code and the errors below)
Thank you very much.
Son Nguyen.
---
import weka.core.jvm as jvm
import weka.core.packages as packages
jvm.start(packages=True)
items = packages.all_packages()
for item in items:
print item.name, item.url
jvm.stop()
---
I get the error like below:
Exception in thread "Thread-1" java.lang.NoClassDefFoundError: Lorg/pentaho/packageManagement/Package;
Caused by: java.lang.ClassNotFoundException: org.pentaho.packageManagement.Package
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
Traceback (most recent call last):
File "/Users/sonnguyen/Bitbucket/conll2016-jaist/implicit-sdp/weka-test/test2.py", line 6, in <module>
items = packages.all_packages()
File "//anaconda/lib/python2.7/site-packages/weka/core/packages.py", line 241, in all_packages
result.append(Package(pkge))
File "//anaconda/lib/python2.7/site-packages/weka/core/packages.py", line 34, in __init__
self.enforce_type(jobject, "org.pentaho.packageManagement.Package")
File "//anaconda/lib/python2.7/site-packages/weka/core/classes.py", line 572, in enforce_type
if not cls.check_type(jobject, intf_or_class, jni_intf_or_class):
File "//anaconda/lib/python2.7/site-packages/weka/core/classes.py", line 556, in check_type
return javabridge.is_instance_of(jobject, jni_intf_or_class)
File "//anaconda/lib/python2.7/site-packages/javabridge/jutil.py", line 806, in is_instance_of
raise JavaException(jexception)
javabridge.jutil.JavaException: Lorg/pentaho/packageManagement/Package;
Failed to get class Lorg/pentaho/packageManagement/Package;