on 04-05-2007 6:16 AM
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
Hi Balakrishna,
File sent to your ID. Do reward points.
Regards
Sid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.