cancel
Showing results for 
Search instead for 
Did you mean: 

Enrichment Adapter Exception while using MDM Java API SP06 Patch 3

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

The problem was solved by following the instruction for configuring the NWDS :

For J2EE applications, open the deployment descriptor i.e. application-j2eeengine.

xml and create a reference to the MDM Java APIu2026

Reference target: com.sap.mdm.tech.mdm4j

Reference type: hard

Reference target type: library

Provider name: sap.com

Former Member
0 Kudos

Hi Uday,

You are passing password as "" in registerDataNotification method and using password string variable for createSession method.May be this causing the problem.

Comment registerDataNotification and registerRepository.... methods and check it again .

Thanks & Regards,

Veera.

Former Member
0 Kudos

Hi Veera Pakalapati,

I tried what you told but still its having the same problem.