Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-1554

Tapestry fails on OpenJDK with a java.lang.reflect.GenericSignatureFormatError

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.3
    • Fix Version/s: 5.3
    • Component/s: plastic, tapestry-core
    • Labels:
      None

      Description

      The Environment

      java version "1.6.0_20"
      OpenJDK Runtime Environment (IcedTea6 1.9.7) (6b20-1.9.7-0ubuntu1~10.04.1)
      OpenJDK 64-Bit Server VM (build 19.0-b09, mixed mode)

      The Exception

      org.apache.tapestry5.ioc.internal.OperationException: Exception
      assembling root component of page admin/Index: Could not convert
      'list' into a component parameter binding: Exception generating
      conduit for expression 'list':
      java.lang.reflect.GenericSignatureFormatError

      The Property:

      @Property
      private List<Config> list;

      The TML:

      <t:loop source="list" value="item">...</t:loop>

      The meat of the exception.

      java.lang.reflect.GenericSignatureFormatError
      at sun.reflect.generics.parser.SignatureParser.error(SignatureParser.java:121)
      at sun.reflect.generics.parser.SignatureParser.parseFormalParameters(SignatureParser.java:462)
      at sun.reflect.generics.parser.SignatureParser.parseMethodTypeSignature(SignatureParser.java:454)
      at sun.reflect.generics.parser.SignatureParser.parseMethodSig(SignatureParser.java:159)
      at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:55)
      at sun.reflect.generics.repository.ConstructorRepository.parse(ConstructorRepository.java:43)
      at sun.reflect.generics.repository.AbstractRepository.<init>(AbstractRepository.java:74)
      at sun.reflect.generics.repository.GenericDeclRepository.<init>(GenericDeclRepository.java:48)
      at sun.reflect.generics.repository.ConstructorRepository.<init>(ConstructorRepository.java:51)
      at sun.reflect.generics.repository.MethodRepository.<init>(MethodRepository.java:46)
      at sun.reflect.generics.repository.MethodRepository.make(MethodRepository.java:59)
      at java.lang.reflect.Method.getGenericInfo(Method.java:112)
      at java.lang.reflect.Method.getGenericParameterTypes(Method.java:300)
      at java.beans.FeatureDescriptor.getParameterTypes(FeatureDescriptor.java:385)
      at java.beans.MethodDescriptor.setMethod(MethodDescriptor.java:116)
      at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:74)
      at java.beans.MethodDescriptor.<init>(MethodDescriptor.java:58)
      at java.beans.Introspector.getTargetMethodInfo(Introspector.java:1196)
      at java.beans.Introspector.getBeanInfo(Introspector.java:423)
      at java.beans.Introspector.getBeanInfo(Introspector.java:189)
      at org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.buildAdapter(PropertyAccessImpl.java:87)
      at org.apache.tapestry5.ioc.internal.services.PropertyAccessImpl.getAdapter(PropertyAccessImpl.java:68)

        Activity

        Hide
        hudson Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #381 (See https://builds.apache.org/job/tapestry-trunk-freestyle/381/)

        Show
        hudson Hudson added a comment - Integrated in tapestry-trunk-freestyle #381 (See https://builds.apache.org/job/tapestry-trunk-freestyle/381/ )
        Hide
        mlusetti Massimo Lusetti added a comment -

        Kudos Josh.... Pretty nice catch!

        Show
        mlusetti Massimo Lusetti added a comment - Kudos Josh.... Pretty nice catch!
        Hide
        joshcanfield Josh Canfield added a comment -

        PlasticClassImpl is generating invalid setter signatures in createAccessors so any code that uses @Property fails on openJDK.

        It's generating invalid signature in both JDKs, but the OpenJDK implementation of the bean Introspector seems to be parsing the signature instead of using the compiled Method object to determine parameter types.

        Turns out it's a typo, the raw field signature was used instead of the generated signature.

        Show
        joshcanfield Josh Canfield added a comment - PlasticClassImpl is generating invalid setter signatures in createAccessors so any code that uses @Property fails on openJDK. It's generating invalid signature in both JDKs, but the OpenJDK implementation of the bean Introspector seems to be parsing the signature instead of using the compiled Method object to determine parameter types. Turns out it's a typo, the raw field signature was used instead of the generated signature.

          People

          • Assignee:
            joshcanfield Josh Canfield
            Reporter:
            joshcanfield Josh Canfield
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development