Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-9496

Deploy fails when using an XStream annotation with "Array component type byte is not handled" RE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 6.1.0
    • Deployers
    • None
    • Hide

      Annotate a class with @XStreamConverter and then attempt to deploy it.

      Show
      Annotate a class with @XStreamConverter and then attempt to deploy it.

    Description

      XStream 1.4.2 provides an annotation called @XStreamConverter - this includes an array of bytes (see http://xstream.codehaus.org/javadoc/com/thoughtworks/xstream/annotations/XStreamConverter.html)

      Annotating a class with this causes a deployment failure with this error:

      Caused by: java.lang.RuntimeException: Error visiting resource: VFSResourceContext @ uk/co/liss/underwriting/beans/visualisation/ProcessAttribute.class / BaseClassLoader@78ee75e7

      {vfs:///C:/JBoss/jboss-6.1.0.Final/server/default/deploy/liss-workflow.ear/liss-workflow.war/}

      , visitor: org.jboss.scanning.annotations.plugins.GenericAnnotationVisitor@317375ed
      at org.jboss.scanning.plugins.visitor.IgnoreSetErrorHandler.handleError(IgnoreSetErrorHandler.java:56) [:1.0.0.GA]
      at org.jboss.scanning.plugins.visitor.ReflectResourceVisitor.visit(ReflectResourceVisitor.java:91) [:1.0.0.GA]
      at org.jboss.scanning.annotations.plugins.AnnotationsScanningPlugin.visit(AnnotationsScanningPlugin.java:89) [:1.0.0.GA]
      at org.jboss.scanning.spi.helpers.ScanningPluginWrapper.visit(ScanningPluginWrapper.java:112) [:1.0.0.GA]
      at org.jboss.classloading.plugins.visitor.FederatedResourceVisitor.visit(FederatedResourceVisitor.java:101) [jboss-classloading.jar:2.2.1.GA]
      at org.jboss.classloading.plugins.vfs.VFSResourceVisitor.visit(VFSResourceVisitor.java:264) [jboss-classloading-vfs.jar:2.2.1.GA]
      ... 61 more
      Caused by: java.lang.RuntimeException: Error retrieving annotation attribute values
      at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:124) [jboss-reflect.jar:2.2.1.SP1]
      at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.createAnnotationValue(IntrospectionTypeInfoFactoryImpl.java:124) [jboss-reflect.jar:2.2.1.SP1]
      at org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactoryImpl.getAnnotations(IntrospectionTypeInfoFactoryImpl.java:117) [jboss-reflect.jar:2.2.1.SP1]
      at org.jboss.reflect.plugins.InheritableAnnotationHolder.getDeclaredAnnotations(InheritableAnnotationHolder.java:96) [jboss-reflect.jar:2.2.1.SP1]
      at org.jboss.reflect.plugins.ClassInfoImpl.getAnnotations(ClassInfoImpl.java:181) [jboss-reflect.jar:2.2.1.SP1]
      at org.jboss.reflect.plugins.AbstractAnnotatedInfo.getUnderlyingAnnotations(AbstractAnnotatedInfo.java:63) [jboss-reflect.jar:2.2.1.SP1]
      at org.jboss.scanning.plugins.visitor.ClassHierarchyResourceVisitor.handleClass(ClassHierarchyResourceVisitor.java:76) [:1.0.0.GA]
      at org.jboss.scanning.plugins.visitor.ReflectResourceVisitor.doVisit(ReflectResourceVisitor.java:108) [:1.0.0.GA]
      at org.jboss.scanning.plugins.visitor.ReflectResourceVisitor.visit(ReflectResourceVisitor.java:86) [:1.0.0.GA]
      ... 65 more
      Caused by: java.lang.RuntimeException: Array component type byte is not handled
      at org.jboss.reflect.plugins.AnnotationValueFactory.getArray(AnnotationValueFactory.java:220) [jboss-reflect.jar:2.2.1.SP1]
      at org.jboss.reflect.plugins.AnnotationValueFactory.createValue(AnnotationValueFactory.java:61) [jboss-reflect.jar:2.2.1.SP1]
      at org.jboss.reflect.plugins.AnnotationValueFactory.createAnnotationValue(AnnotationValueFactory.java:119) [jboss-reflect.jar:2.2.1.SP1]
      ... 73 more

      Likely because an array of bytes isn't handled in http://grepcode.com/file/repository.jboss.org/nexus/content/repositories/releases/org.jboss/jboss-reflect/2.2.1.GA/org/jboss/reflect/plugins/AnnotationValueFactory.java

      Any reason all the other primitive types (boolean/char/short/int/long/float/double) are handled but bytes aren't? Can you fix please? XSteam is really useful so to have it breaking this way isn't good...

      Attachments

        Activity

          People

            ajustin@redhat.com Ales Justin
            jonliss Jon Liss (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: