[SWS-550] Jaxb2Marshaller.createJaxbContext() doesn't respect provided classloader when checking JAXB version Created: 11/Aug/09  Updated: 04/May/12  Resolved: 12/Aug/09

Status: Closed
Project: Spring Web Services
Component/s: OXM
Affects Version/s: 1.5.7
Fix Version/s: 1.5.8

Type: Bug Priority: Major
Reporter: Miguel Vargas Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 5m
Original Estimate: Not Specified


 Description   

Jaxb2Marshaller.createJaxbContext() checks the JAXB version using JaxbUtils

if (JaxbUtils.getJaxbVersion() < JaxbUtils.JAXB_2)

{ throw new IllegalStateException( "Cannot use Jaxb2Marshaller in combination with JAXB 1.0. Use Jaxb1Marshaller instead."); }

But this is incorrect because JaxbUtils is checking the version by seeing if it can load javax.xml.bind.Binder using the ClassUtils' getDefaultClassLoader. Instead it should use the supplied classloader set via setBeanClassLoader in Jaxb2Marshaller.



 Comments   
Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Mon Dec 11 00:15:23 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.