on 2009 Jan 23 12:14 PM
HI All,
I have used java mail API in my Webdynpro(CE7.1)DC. For that , iadded two external jars.
I have added the jars in the build path of the project. The application is running fine .When i do a DC Build the build fails. The Log i get is
java:22: package javax.mail does not exist
[javac] ERROR: import javax.mail.BodyPart;
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:23: package javax.mail does not exist
[javac] ERROR: import javax.mail.MessagingException;
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:24: package javax.mail does not exist
[javac] ERROR: import javax.mail.SendFailedException;
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:25: package javax.mail does not exist
[javac] ERROR: import javax.mail.Session;
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:26: package javax.mail.internet does not exist
[javac] ERROR: import javax.mail.internet.AddressException;
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:27: package javax.mail.internet does not exist
[javac] ERROR: import javax.mail.internet.InternetAddress;
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:28: package javax.mail.internet does not exist
[javac] ERROR: import javax.mail.internet.MimeBodyPart;
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:29: package javax.mail.internet does not exist
[javac] ERROR: import javax.mail.internet.MimeMessage;
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:30: package javax.mail.internet does not exist
[javac] ERROR: import javax.mail.internet.MimeMultipart;
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:219: cannot find symbol
[javac] ERROR: symbol : class Session
[javac] ERROR: location: class com.sap.demo.emaildclatest.emailapplication.comp.EmailApplicationCompView
[javac] ERROR: Session session = Session.getDefaultInstance(properties,null);
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:219: cannot find symbol
[javac] ERROR: symbol : variable Session
[javac] ERROR: location: class com.sap.demo.emaildclatest.emailapplication.comp.EmailApplicationCompView
[javac] ERROR: Session session = Session.getDefaultInstance(properties,null);
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:222: cannot find symbol
[javac] ERROR: symbol : class MimeMessage
[javac] ERROR: location: class com.sap.demo.emaildclatest.emailapplication.comp.EmailApplicationCompView
[javac] ERROR: MimeMessage message = new MimeMessage(session);
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:222: cannot find symbol
[javac] ERROR: symbol : class MimeMessage
[javac] ERROR: location: class com.sap.demo.emaildclatest.emailapplication.comp.EmailApplicationCompView
[javac] ERROR: MimeMessage message = new MimeMessage(session);
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:223: cannot find symbol
[javac] ERROR: symbol : class InternetAddress
[javac] ERROR: location: class com.sap.demo.emaildclatest.emailapplication.comp.EmailApplicationCompView
[javac] ERROR: InternetAddress fromAddress = new InternetAddress();
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:223: cannot find symbol
[javac] ERROR: symbol : class InternetAddress
[javac] ERROR: location: class com.sap.demo.emaildclatest.emailapplication.comp.EmailApplicationCompView
[javac] ERROR: InternetAddress fromAddress = new InternetAddress();
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:224: cannot find symbol
[javac] ERROR: symbol : class InternetAddress
[javac] ERROR: location: class com.sap.demo.emaildclatest.emailapplication.comp.EmailApplicationCompView
[javac] ERROR: InternetAddress toAddress = new InternetAddress();
[javac] ERROR: ^
[javac] ERROR: E:\itpo_backUpworkspace2.jdi\LocalDevelopment\t\14C13E6A69D51EC3120D8140CB9B1F69\gen_wdp\packages\com\sap\demo\emaildclatest\emailapplication\comp\EmailApplicationCompView.java:224: cannot find symbol
[javac] ERROR: symbol : class InternetAddress
[javac] ERROR: location: class com.sap.demo.emaildclatest.emailapplication.comp.EmailApplicationCompView
[javac] ERROR: InternetAddress toAddress = new InternetAddress();
After going through many blogs and threads, i added the jars in a Enterprise portal project . Created public parts of type assembly and compilation .and added the public parts to A EAR and deployed on the server.and then added this EAR in my WEbdynpro project . I stil lget the same error.. What am i missing out.
Thanks in Advance,
Regards,
Divya
Thanks for your replies
Referred Some blogs..
Regards,
Divya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ..
Thanks for your reply.
I tried adding the jar files as mentioned in the blog /people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components by Bertram Ganz.
I will mention the steps i have done till now.
I am using Webdynpro CE7.1
I have:
1) Created a Webdynpro DC which has to use the jar files.
2) i have added the jars in the Build path of the Above DC.
3) Created a External library project and added the jars in the Lib folder of the external library DC.
4) Created two public parts i.e assembly and compilation of the External Library and added the Jars to the public parts .
5) since the blog mentions that the public parts of the External library has to be added to the Webdynpro DC created , i have added it in the Component Properties of Dynpro DC -> Dependencies.
5a)After adding the External library inthe Component properties, i am unable to see the Externa library in the Used DC of the Webdynpro DC.
6) Now i created a EAR DC and my problem is should again create a public part of the EAR and then add the jar manually ..
How should i proced further?
Thanks ..
Divya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When adding external jars to the project - during buildtime they are not considered for some reason.
You could also try adding the jar file in question to the "Used DC" section of the using project if they are in the form of .lib files. Also you can add it by "extending" the path variables of your classpath in the Project Properties.
That usually works.
Hope that helps.
Thanks.
p256960.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
If you r working with DCs, and want to add an external Library ( ajar file to your DC ) , you need to create external library DC and a server component DC of library type.
Follow :
1 ) Create External library DC
2) Create its public parts ( both SDA and the other type (I don't remember the name) )
3 ) Go to repository perspective, add external library to the lib folder of the DC.
4 ) right click on jar file just added. development component -> add to Public part . Select the public part u created.
Do step 4 ) for both type of Public parts.
5 ) Create a Server component DC of type Library.
6 ) In used DCs of this server component, add your External Library DC that u created above. You will find you server comp DC in Java perspective.
7) Build xternal library DC.
😎 Build and deploy Server component DC.
9) Deploy .sda file of server component DC.
10 ) Add this server compDC in the USed DCs of your main DC in which you wanted to add the externaly library ( jar file ) .
Build it now . If steps followed correctly, it will build fine
Cheers !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
71 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.