Skip to Content
Former Member
Oct 13, 2006 at 02:23 PM

MDM Data Fetch - Java API



I am using the following code to fetch data from a table in MDM.

Context ctx = new InitialContext();

		IConnectionFactory connectionFactory = (IConnectionFactory)ctx.lookup("deployedAdapters/MDM Factory/shareable/MDM Factory");

		IConnectionSpec spec = connectionFactory.getConnectionSpec();

		spec.setPropertyValue("UserName", "");
		spec.setPropertyValue("Password", "");
		spec.setPropertyValue("Server", "");
		spec.setPropertyValue("Port", "");
		spec.setPropertyValue("RepositoryLanguage", "");

		IConnection connection = connectionFactory.getConnectionEx(spec);

		INative nativeInterface = connection.retrieveNative();

		CatalogData catalog = (CatalogData) nativeInterface.getNative(CatalogData.class.getName());

		ResultSetDefinition resultdefenition = new ResultSetDefinition("Products");

		Search search = new Search("Products");

		A2iResultSet rs = catalog.GetResultSet(search, resultdefenition, "Id", true, 0);


I am getting the following exception at design time:

The project was not built since its classpath is incomplete. Cannot find the class file for javax.resource.cci.ConnectionSpec. Fix the classpath then try rebuilding this project.

This compilation unit indirectly references the missing type javax.resource.cci.ConnectionSpec (typically some required class file is referencing a type outside the classpath)

This issue has been bothering me for days now and it doesn't seem to go!