cancel
Showing results for 
Search instead for 
Did you mean: 

com.sap.security.api.IUser not found

Former Member
0 Kudos

Hi,

I am getting this errors in my webdynpro Email application.

The project was not built since its classpath is incomplete. Cannot find the class file for com.sap.security.api.IUser. Fix the classpath then try rebuilding this project.

This compilation unit indirectly references the missing type com.sap.security.api.IUser (typically some required class file is referencing a type outside the classpath)

can any one send me the above file to balu_world@yahoo.com.

And please give your valuable suggestions.

Thanks in Advance

Balu

Accepted Solutions (1)

Accepted Solutions (1)

sid_sunny
Contributor
0 Kudos

Hi Balakrishna,

File sent to your ID. Do reward points.

Regards

Sid

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

Hi Balakrishna,

Add <b>com.sap.security.api.jar</b> to your project's classpath. You should be able to find in the NWDS plugin folders.

Thanks,

Raags

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi balakrishna

The Exception is coming due to unhandling the errors in your code.May be the reason is your code is not enclosed in try catch block.Handle MailException and

AddressException in your code

try for the below code

public void onActionSendMail(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionSendMail(ServerEvent)

// get the values entered by the user in the form

try{

String toAddress=wdContext.currentContextElement().getTo();

String ccAddress=wdContext.currentContextElement().getCC();

String bccAddress=wdContext.currentContextElement().getBCC();

String subject=wdContext.currentContextElement().getSubject();

String messageBody=wdContext.currentContextElement().getMessage();

//set the properties of host and port no

Properties p = new Properties();

p.put("mail.transport.protocol","smtp");

p.put("mail.smtp.host","host_system");

p.put("mail.smtp.port","25");

//get the session object or connection to the mail server or host

Session sess=Session.getDefaultInstance(p,null);

//create a MimeMessage and add recipients

MimeMessage message = new MimeMessage(sess);

if(toAddress !=null && toAddress.length()>0){

message.addRecipient(Message.RecipientType.TO, new InternetAddress(toAddress));

}else

{

wdComponentAPI.getMessageManager().reportSuccess("Please Enter the To Address");

}

if(bccAddress !=null && bccAddress.length()>0)

message.addRecipient(Message.RecipientType.BCC, new InternetAddress(bccAddress));

if(ccAddress !=null && ccAddress.length()>0)

message.addRecipient(Message.RecipientType.CC, new InternetAddress(ccAddress));

if(subject!=null && subject.length()>0)

message.setSubject(subject);

message.setFrom(new InternetAddress("senders mail id"));

if((messageBody!=null) && (messageBody.length()>0))

{

message.setContent(messageBody,"text/plain");

}else

{

message.setContent("","text/plain");

}

Transport.send(message);

}

catch(Exception e)

{

e.printStackTrace();

}

Handle your code with try catch block

thanks and regards

kalyan