Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » JavaMail and JAX-WS in Eclipse Scout(Broken JavaMail due to integration of JAX-WS in Eclipse Scout. This article addresses the problems encountered and presents a solution to still have JavaMail and JAX-WS seamlessly aside.)
JavaMail and JAX-WS in Eclipse Scout [message #647259] Wed, 05 January 2011 12:51
Daniel Wiehl is currently offline Daniel WiehlFriend
Messages: 1
Registered: May 2016
Junior Member
In the past, we encountered trouble with JAX-WS 2.1.6 in combination with JavaMail 1.4.3 and JMS 1.1.0.

Historical note:
In order to make use of JavaMail in other plug-ins, we encapsulated the orginal mail and jms Jars within our custom plug-ins javax.mail.jre16_1.4.3.jar, javax.mail.jre15_1.4.1.jar and javax.jms_1.1.0.jar, respectively. After integration JAX-WS into Scout, mailing did not work properly afterwards. It very depended whether JAX-WS was booting prior or after to JavaMail to initialize some handlers in a factory. When JAX-WS was first, if was not aware of a general configuration file located in javax.mail.jre1x_x.x.x.jar plug-in with proper default values. This is because JAX-WS is part of JRE distribution which cannot see our Scout plug-ins a layer above. So in term, mailing was broken.

We did lot of investigation in solving this problem with the only practicable solution of moving the respective mail and jms Jars directly into jre/lib/endorsed directory to become part of JRE itself. Therefore, JAX-WS is now able to recognize the config file to do its initialization work properly. It does not matter anymore whether JAX-WS or JavaMail are loaded first.

What does that mean for you?
If using JavaMail in your product, download the request jar from Oracle and put it into the endorsed directory of the JRE used by Eclipse IDE. It can be downloaded from Afterwards, in order to make use of its contained classes, you have to adapt the build path of your eclipse projects. In the build properties, you can find a tab 'JRE System library'. Click the node 'Access rules' and add a new entry with the pattern 'javax/**' and visibility 'Accessible'. Afterwards, feel free to use JavaMail in your product.
Note: This change in build path is only required for development time to compile sources referring to classes in endorsed directory. When installing the product, those Jars are either already included in the application container or must be added manually to the respective endorsed directory. Please refere to the documentation of the application server in use.
Previous Topic:Utility for arrays?
Next Topic:Scout still alive?
Goto Forum:

Current Time: Sun May 28 04:40:44 GMT 2023

Powered by FUDForum. Page generated in 0.01774 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top