cancel
Showing results for 
Search instead for 
Did you mean: 

NoClassDefFoundError when using IsendMailItem

Former Member
0 Kudos

Hi Experts,

I want to send an email form wd using IsendMailService and IsendMailItem.

To have the necessary Interfaces and classes I downloaded

com.sap.netweaver.coll.appl.gw, com.sap.netweaver.coll.shared and com.sap.netweaver.kmc.util

from portal, extracted the jars an put them in external lib dc and added them to the public part of the dc.

In my wd application I included them as used dc.

My code is the following:

try {

sendMailSvc =

(ISendMailService) ResourceFactory.getInstance().getServiceFactory().getService(ISendMailService.SERVICE_ID);

ISendMailItem mailItem = sendMailSvc.createMailItem();

mailItem.setContent("inhalt");

mailItem.setTo(receiver);

IUser ep5User = WPUMFactory.getUserFactory().getEP5User(user);

sendMailSvc.sendMail(mailItem, ep5User);

} catch (Exception e) {

...

}

My problem is that I get

java.lang.NoClassDefFoundError: com/sap/ip/collaboration/gw/api/service/mail/ISendMailItem

when I execute the application.

I guess a reference is missing. But I don't know which or how to find out.

Best Regards Manuel

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks for your hints.

But I've already known these threads. The problem is, since I am using Web Dynpro application, I cannot directly edit the portalapp.xml and if I set the sharing reference via wd project propertys I get following error:

The referenced application com.sap.netweaver.coll.appl.gw cannot be started. Check the causing exception for details. Hint: Is the referenced application deployed correctly on the server?

Any other ideas?

Regards Manuel

Former Member
0 Kudos

Hi,

Kindly have a look at the following answered thread on same problem: /message/683507#683507 [original link is broken]

Also, you may want to have a look at this thread on the IsendMailService: /message/528426#528426 [original link is broken]

Regards,

Anagha

Edited by: Anagha Jawalekar on Dec 17, 2008 4:27 PM

former_member191569
Active Participant
0 Kudos

Hi Manuel,

check this thread -> /message/421767#421767 [original link is broken] , especially Detlev Beutner's posts.

Maybe that helps.