Skip to Content
0
Former Member
Oct 10, 2006 at 10:33 AM

Error while deploying MDM Java Connector for EP

21 Views

Hi,

i am a newbie to MDM.i am trying to develop a portal component with the blog "Using MDM5.5 Java Connector with SAP Enterprise Portal 6.0" as reference.

i created an MDM system in portal and the connection tests passed.

But when i deploy the code i get the following exception-

java.lang.NullPointerException

at com.sap.mdm.connector.connection.MdmConnectionFactory.getConnectionEx(MdmConnectionFactory.java:170)

at com.sap.portal.ivs.internalconnector.ConnectionProvider.getConnection(ConnectionProvider.java:304)

at com.sap.portal.ivs.internalconnector.ConnectionProvider.getConnection(ConnectionProvider.java:258)

at com.sapportals.portal.ivs.cg.ConnectorService.getConnection(ConnectorService.java:478)

at com.sapportals.portal.ivs.cg.ConnectorService.getConnection(ConnectorService.java:85)

at com.cts.mdm.MDMtestcomp.doContent(MDMtestcomp.java:36)(this points to the line <b>connection = cgService.getConnection("MDM_SYSTEM_ALIAS", prop);</b>)

at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)

at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)

This is my code-

 
IConnectorGatewayService cgService = (IConnectorGatewayService) 
			PortalRuntime.getRuntimeResources().getService(IConnectorService.KEY);
		ConnectionProperties prop =
		new ConnectionProperties(request.getLocale(), request.getUser());
		
			IConnection connection = null;
		
			connection = cgService.getConnection("MDM_SYSTEM_ALIAS", prop);
	INative nativeInterface = connection.retrieveNative();
				CatalogData catalog = new CatalogData();
					catalog = (CatalogData)
			nativeInterface.getNative(CatalogData.class.getName());
				ResultSetDefinition rsd = new ResultSetDefinition("Customers");
		rsd.AddField("Name");
		Search search = new Search("Customers");
		A2iResultSet rs = null;
					rs = catalog.GetResultSet(search,rsd,"Name",true,0);
				

response.write(rs.GetFields().toString());

Have i missed anything?

Should i deploy any .jar file? (i've already deployed MDM4J.jar) and referenced it in portalapp!

Thanks in advance

SwarnaDeepika