Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-550

Jaxb2Marshaller.createJaxbContext() doesn't respect provided classloader when checking JAXB version

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.7
    • Fix Version/s: 1.5.8
    • Component/s: OXM
    • Labels:
      None

      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.

        Activity

        miguel Miguel Vargas created issue -
        arjen.poutsma Arjen Poutsma made changes -
        Field Original Value New Value
        Fix Version/s 1.5.8 [ 11236 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        arjen.poutsma Arjen Poutsma logged work - 12/Aug/09 10:32 PM
        • Time Spent:
          5m
           
          <No comment>
        arjen.poutsma Arjen Poutsma made changes -
        Time Spent 5m [ 300 ]
        Remaining Estimate 0d [ 0 ]
        arjen.poutsma Arjen Poutsma made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing old issues

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing old issues
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        1d 15h 55m 1 Arjen Poutsma 12/Aug/09 10:27 PM
        In Progress In Progress Resolved Resolved
        6m 11s 1 Arjen Poutsma 12/Aug/09 10:33 PM
        Resolved Resolved Closed Closed
        995d 8h 29m 1 Arjen Poutsma 04/May/12 7:03 AM

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            miguel Miguel Vargas
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0d
              0d
              Logged:
              Time Spent - 5m
              5m