Use Weka Library in bnd

Hi all
I have a problem with a class in weka when I use it on bnd in openems ,
most of class found in resolve and run but classification not defined in build and I get this error:

org.osgi.framework.BundleException: Unable to resolve io.openems.edge.controller.ess.inteligentcontroller [217](R 217.0): missing requirement [io.openems.edge.controller.ess.inteligentcontroller [217](R 217.0)] osgi.wiring.package; (osgi.wiring.package=weka.classifiers.trees) Unresolved requirements: [[io.openems.edge.controller.ess.inteligentcontroller [217](R 217.0)] osgi.wiring.package; (osgi.wiring.package=weka.classifiers.trees)]

and my pom file:

	<dependency>
		<groupId>nz.ac.waikato.cms.weka.thirdparty</groupId>
		<artifactId>java-cup-11b</artifactId>
		<version>2015.03.26</version>
	</dependency>
	<!--
	https://mvnrepository.com/artifact/nz.ac.waikato.cms.weka.thirdparty/java-cup-11b-runtime -->
	<dependency>
		<groupId>nz.ac.waikato.cms.weka.thirdparty</groupId>
		<artifactId>java-cup-11b-runtime</artifactId>
		<version>2015.03.26</version>
	</dependency>
	<dependency>
		<groupId>nz.ac.waikato.cms.weka</groupId>
		<artifactId>scriptingClassifiers</artifactId>
		<version>1.0.2</version>
	</dependency>
	<dependency>
		<groupId>nz.ac.waikato.cms.weka</groupId>
		<artifactId>kfPMMLClassifierScoring</artifactId>
		<version>1.0.3</version>
	</dependency>
	<!--
	https://mvnrepository.com/artifact/nz.ac.waikato.cms.weka.thirdparty/bounce -->
	<dependency>
		<groupId>nz.ac.waikato.cms.weka.thirdparty</groupId>
		<artifactId>bounce</artifactId>
		<version>0.18</version>
	</dependency>
	<dependency>
		<groupId>nz.ac.waikato.cms.weka</groupId>
		<artifactId>weka-dev</artifactId>
		<version>3.9.6</version>
	</dependency>

anyone can guide me to resolve this? thanks.

The missing package seems to be weka.classifiers.trees which is used by the bundle io.openems.edge.controller.ess.inteligentcontroller

Verify that that package is actually exported by a bundle on your class path … In the workspace model we have the resolution view but I do not think it works in the maven world.

1 Like