[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


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.

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Wed Nov 14 00:20:54 UTC 2018 using JIRA 7.9.2#79002-sha1:3bb15b68ecd99a30eb364c4c1a393359bcad6278.