Weka running via Spring Boot Jar errors with "Can't find a permissible class called: weka.clusterers.Canopy"

时间:2018-03-23 00:03:47

标签: spring-boot weka

I start "java -jar .../my-spring-boot-jar-with-weka-jar-inside.jar", the app is up, however when I hit my use case (via rest endpoint) I get the following. It all works fine if I start the app via Eclipse. I suspect it is due to classloading diff between what's in my Eclipse project (expanded classes, etc) and the Spring Boot's "uber-jar" it creates. I verified the weka jar inside the SB jar has the exact class "weka.clusterers.Canopy".

java.lang.Exception: Can't find a permissible class called: weka.clusterers.Canopy
at weka.core.Utils.forName(Utils.java:1122) ~[weka-stable-3.8.1.jar!/:na]
at weka.clusterers.AbstractClusterer.forName(AbstractClusterer.java:276) ~[weka-stable-3.8.1.jar!/:na]
at weka.filters.unsupervised.attribute.AddCluster.setOptions(AddCluster.java:440) ~[weka-stable-3.8.1.jar!/:na]
at com.abc.ace.predictive.outlier.ClusterDetector.calculateClusterCentroids(ClusterDetector.java:56) ~[classes!/:0.0.1-SNAPSHOT]
at com.abc.ace.predictive.api.PredictiveController.getClusterCentroids(PredictiveController.java:53) ~[classes!/:0.0.1-SNAPSHOT]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_144]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_144]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_144]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_144]

0 个答案:

没有答案