Skip to Content
0
Former Member
Apr 21, 2009 at 10:25 AM

Enrichment Adapter Exception while using MDM Java API SP06 Patch 3

35 Views

Hi Experts,

I am trying to Protect certain number of MDM records based on an arbitrary search criteria using MDM Java API running within the Enrichment Adapter ejb.

I am getting the following error on the polling screen:

Adapter Exception - com/sapportals/connector/connection/ConnectionFailedException com.sap.mdm.enrichment.adapter.skeleton.EnrichmentAdapterException: com/sapportals/connector/connection/ConnectionFailedException

On careful inspection I found that the code breaks on this line:

metDM.registerDataNotifications(context,"");

Following is the code snippet I am using for creating the connection:

//Create a user session context
		UserSessionContext context = new UserSessionContext(serverName, repositoryName, regionName, user);
				
		//Get an instance of the session manager
		SessionManager sessionManager = SessionManager.getInstance();
		
		//Create a user session
		sessionManager.createSession(context, SessionTypes.USER_SESSION_TYPE, password);
		
		MetadataManager metDM = MetadataManager.getInstance();
		
		//NOTE:  CODE BREAKS ON THIS LINE
		metDM.registerDataNotifications(context,"");
		
		
		metDM.registerRepositoryNotifications(context,null,"");
		
		
		CRUDDataProgram.setMetDM(metDM);
		
		
		program.setContext(context);
		
		
		program.setLoginRegion(getRegion(context));
		
		
		program.setRepositorySchema(metDM.getRepositorySchema(context));
		
		program.setAttributeSchema(metDM.getAttributeSchema(context));
		
		//execute the program from the list above
		program.execute();

The code is working fine on a standalone java application but it fails when deployed on the SAP WAS.

Please provide any suggestions/solutions that might help me solve this.

Thank You