Issue Type: Bug Bug
Affects Versions: JiBX 1.2.5
Assignee: Unassigned
Attachments: RuntimeSupport.patch
Components: core
Created: 09/Jan/14 3:02 AM
Description:

The current implementation takes the context loader into consideration, but only for finding the StAX and XMLPullParser factories. However, when either is found the loaded class is checked for implementation of the IXMLReaderFactory. The problem is, that the aforementioned interface is not loaded via the previously determined classloader that was used to load the xml reader implementation class, i.e. potentially the context class loader. Instead, interface is directly referred to, which means it is loaded with the current classloader.

Effectively this will lead to failure when the context class loader is used to find the implementation classes, but the interface is provided by a different loader.

A real world example is our JEE environment, where JiBX is used in several submodules, which each provide their own JiBX implementation. Due to class loader isolation, the classes must be loaded via the Context Loader. But this fails due to the aforementioned problem.

I have attached a suggested patch that uses the loader that was determined during the lookup of the implementation class to also load the interface.

Project: JiBX
Labels: exception classloader jee
Priority: Major Major
Reporter: Michael Heß
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to