on 11-11-2005 1:29 PM
Hi,
I have written an Abstract Portal Component which is using mail.jar file for sending mails.i am able compile and deploy successfully.
When try to execute,it is giving java.lang.NoClassDefFoundError : javax/mail/Message
I am able to see the Class file Message in jar file.
I am not able to resolve why the error is coming up.i am able to deploy and execute other applications Successfully.
Please provide me Help in resolving this issue ASAP.
Thanks
Madhan
Hi Madhan,
This is likely due to a missing reference. The class file may be in the jar, but at runtime the component (your component) needs to have access to the jar file which contains the class. In order for this to be the case, you need to add a reference from your component to the other. How you do this will be determine by what version of the software you are running. More details would help me talk you through this, but that's the gist of what needs to happen to resolve this error.
Cheers,
Steve
-
If you find a post useful, please help keep the community going by setting a good example and rewarding the poster with points.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Madhan,
Sure, but you still didn't provide the version of the software that you are running.
Basically you need to ensure that your component has a runtime reference to the component that contains the jar. These components, and their references are defined in xml files that are contained in the sda files that are deployed to the server. It's been a while, but I believe that provider.xml is the one you're looking for, but check application-j2ee-engine.xml too. You should see a list of references and be able to copy one, and replace the component name with the mail component.
Again, it would be much easier to describe this if you would provide more information about which system you are actually running.
Cheers,
Steve
-
If you find a post useful, please help keep the community going by setting a good example and rewarding the poster with points.
Hi Steve,
I have deployed my abstract portal Component on EP6.4 SP 12.
The mail.jar is simple jar file having all class files like "Message","Session" etc..
I have added mail.jar file to my component,Still it is givingjava.lang.NoClassDefFoundError : javax/mail/Message while executing the application.
In abstract portal Component,i can see only portalapp.xml.
mail.jar don't have any provider.xml or application-j2ee-engine.xml.
I have to use "session","Message" classes of jar file into Abstract Portal Component during runtime.
Thanks
Madhan
As these jar files are already contained in the engine you don't have to add them to your portal application too.
It would suffice to modify your portalapp.xml so that it contains a reference to the mail packages e.g. like this:
<?xml version="1.0" encoding="utf-8"?>
<application>
<application-config>
<property name="SharingReference" value="knowledgemanagement, usermanagement, SAPJ2EE::library:mail"/>
</application-config>
...
</application>
Regards,
Dieter
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.