on 04-21-2009 11:25 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.