Skip to Content
0
Former Member
Jan 15, 2008 at 04:22 PM

InterfaceNotSupportedException at MDM Java API

17 Views

I wrote very simple SAP EP-application, which connects to MDM Repository:

public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)

{

try {

Context ctx = new InitialContext();

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

IConnectionSpec spec = connectionFactory.getConnectionSpec();

spec.setPropertyValue("Server", "mdm2");

spec.setPropertyValue("Port", "5678");

spec.setPropertyValue("UserName", "Admin");

spec.setPropertyValue("Password", "");

IConnection connection = connectionFactory.getConnectionEx(spec);

INative nativeInterface = connection.retrieveNative();

ConnectionAccessor connAccessor = nativeInterface.getNative(ConnectionAccessor.class.getName());

....

And I got strange exception:

com.sapportals.connector.connection.InterfaceNotSupportedException: Interface com.sap.mdm.net.ConnectionAccessor is not supported

at line "ConnectionAccessor connAccessor = nativeInterface.getNative(ConnectionAccessor.class.getName());".

I found out that if I pass a2i.common.CatalogData class instead of ConnectionAccessor to getNative method it works fine, but I need ConnectionAccessor!

I have following system configuration:

SAP EP 7.00 SP9

SAP MDM 5.5 SP5 (5.5.40.83)

What's wrong?

Thanks in advance.