cancel
Showing results for 
Search instead for 
Did you mean: 

create portal user from web dynpro java

Former Member
0 Kudos

Hi experts!!!

I am trying to create a portal user from a web dynpro java apploication.

Below is the code i am using.

I get the following exception

No data source feels responsible for principal. Please check the data source configuration

I checked the various exceptions of IUserMaint & IUserFactory but could not find a solution for that..

Please help!!

try{

String uid = "iria2";

IUserMaint newUser = UMFactory.getUserFactory().newUser(uid);

newUser.setFirstName("iria1234");

newUser.setLastName("Kouts");

newUser.setEmail("xxxxx");

newUser.commit();

}catch (Exception e){

wdComponentAPI.getMessageManager().reportSuccess(e.getLocalizedMessage());

}

try{

IUserFactory userfact = UMFactory.getUserFactory();

IUserMaint userMaint = userfact.newUser("TestUser");

userMaint.setDisplayName("Any Name");

userMaint.setFirstName("Name");

userMaint.setLastName("Last Name");

userMaint.save();

userMaint.commit();

} catch (Exception e){

wdComponentAPI.getMessageManager().reportSuccess(e.getLocalizedMessage());

}

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member254270
Participant
0 Kudos

Hi Iria,

Try this link and follow the procedure accordingly and see that you have all the required jar files.I tried this procedure and I got the result.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40d562b7-1405-2a10-dfa3-b03148a9...

Rewards points if helpful.

Former Member
0 Kudos

Hi durga!!!

I tried it but i still get the same exception...

any other ideas???