jaxb
  1. jaxb
  2. JAXB-490

IllegalAccessError accessing com.sun.xml.bind.v2.runtime.reflect.opt.Const

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.6
    • Fix Version/s: 2.1.13
    • Component/s: runtime
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      490

      Description

      When unmarshalling incorrect (e.g. letter characters when float is expected)
      data , JAXB tries to consult com.sun.xml.bind.v2.runtime.reflect.opt.Const for
      acceptable default values to set, which results in IllegalAccessError because
      the access is done from what appears to byte-enhanced code in the customer's
      class/package, and Const is package protected.
      Was able to solve the problem by making Const and its properties public.
      See http://forums.java.net/jive/thread.jspa?messageID=260342 for some additional
      details, including the stack trace.

        Activity

        Hide
        Martin Grebac added a comment -

        Will look at this one for 2.2. A standalone testcase here would help and make
        things faster.

        Show
        Martin Grebac added a comment - Will look at this one for 2.2. A standalone testcase here would help and make things faster.
        Hide
        Martin Grebac added a comment -

        Fixed in trunk and all branches, it would help if anyone could verify. Thanks.

        Show
        Martin Grebac added a comment - Fixed in trunk and all branches, it would help if anyone could verify. Thanks.
        Show
        Martin Grebac added a comment - https://jaxb2-sources.dev.java.net/source/browse/jaxb2-sources/jaxb-ri/runtime/src/com/sun/xml/bind/v2/runtime/reflect/opt/Const.java?r1=1.2&r2=1.3

          People

          • Assignee:
            Martin Grebac
            Reporter:
            alexkos
          • Votes:
            14 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: