Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-1905

ASM4 causes the Proxy/Weaving of Xerces, but that then causes validation factories to fail.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.0
    • 2.3.0, 3.0.0
    • karaf
    • None

    Description

      Since the update to ASM 4, if you do:

      features:chooseurl cxf 2.7.1-SNAPSHOT
      features:install cxf
      features:chooseurl camel 2.10.2-SNAPSHOT
      features:install camel
      

      you get the error:

      Error executing command: Illegal UTF8 string in constant pool in class file org/apache/xerces/impl/xpath/regex/ParserForXMLSchema
      

      The problem is that with ASM, Aries proxy is trying to Weave the xerces classes and somehow generating an invalid class.

      Full stack trace:

        199 | 14 - org.apache.karaf.shell.console - 2.3.0.SNAPSHOT | Exception caught while executing command
      java.lang.ClassFormatError: Illegal UTF8 string in constant pool in class file org/apache/xerces/impl/xpath/regex/ParserForXMLSchema
      	at java.lang.ClassLoader.defineClass1(Native Method)[:1.6.0_33]
      	at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)[:1.6.0_33]
      	at java.lang.ClassLoader.defineClass(ClassLoader.java:615)[:1.6.0_33]
      	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2128)
      	at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1432)
      	at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:72)
      	at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1843)
      	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)[:1.6.0_33]
      	at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets(Unknown Source)
      	at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets1(Unknown Source)
      	at org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.createBuiltInTypes(Unknown Source)
      	at org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.<clinit>(Unknown Source)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.6.0_33]
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)[:1.6.0_33]
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)[:1.6.0_33]
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)[:1.6.0_33]
      	at java.lang.Class.newInstance0(Class.java:355)[:1.6.0_33]
      	at java.lang.Class.newInstance(Class.java:308)[:1.6.0_33]
      	at org.apache.xerces.impl.dv.ObjectFactory.newInstance(Unknown Source)
      	at org.apache.xerces.impl.dv.SchemaDVFactory.getInstance(Unknown Source)
      	at org.apache.xerces.impl.dv.SchemaDVFactory.getInstance(Unknown Source)
      	at org.apache.xerces.impl.xs.SchemaGrammar$BuiltinSchemaGrammar.<init>(Unknown Source)
      	at org.apache.xerces.impl.xs.SchemaGrammar.<clinit>(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSAttributeChecker.<clinit>(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.createTraversers(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.prepareForTraverse(Unknown Source)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
      	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
      	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
      	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
      	at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
      	at javax.xml.validation.SchemaFactory.newSchema(Unknown Source)[:2.1.0]
      	at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(Unknown Source)
      	at org.apache.karaf.features.internal.FeatureValidationUtil.validate(FeatureValidationUtil.java:62)
      	at org.apache.karaf.features.internal.FeaturesServiceImpl.validateRepository(FeaturesServiceImpl.java:204)
      	at org.apache.karaf.features.internal.FeaturesServiceImpl.internalAddRepository(FeaturesServiceImpl.java:245)
      	at org.apache.karaf.features.internal.FeaturesServiceImpl.getFeatures(FeaturesServiceImpl.java:1047)
      	at org.apache.karaf.features.internal.FeaturesServiceImpl.getFeature(FeaturesServiceImpl.java:1005)
      	at org.apache.karaf.features.internal.FeaturesServiceImpl.installFeature(FeaturesServiceImpl.java:384)
      	at org.apache.karaf.features.command.InstallFeatureCommand.doExecute(InstallFeatureCommand.java:62)
      	at org.apache.karaf.features.command.FeaturesCommandSupport.doExecute(FeaturesCommandSupport.java:41)
      	at org.apache.karaf.shell.console.OsgiCommandSupport.execute(OsgiCommandSupport.java:38)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at org.apache.felix.gogo.commands.basic.AbstractCommand.execute(AbstractCommand.java:35)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at org.apache.felix.gogo.runtime.CommandProxy.execute(CommandProxy.java:78)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at org.apache.felix.gogo.runtime.Closure.executeCmd(Closure.java:474)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at org.apache.felix.gogo.runtime.Closure.executeStatement(Closure.java:400)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at org.apache.felix.gogo.runtime.Pipe.run(Pipe.java:108)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:183)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at org.apache.felix.gogo.runtime.Closure.execute(Closure.java:120)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at org.apache.felix.gogo.runtime.CommandSessionImpl.execute(CommandSessionImpl.java:89)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at org.apache.karaf.shell.console.jline.Console.run(Console.java:175)[14:org.apache.karaf.shell.console:2.3.0.SNAPSHOT]
      	at java.lang.Thread.run(Thread.java:680)[:1.6.0_33]
      

      Attachments

        1. patch.txt
          0.9 kB
          Daniel Kulp

        Activity

          People

            jbonofre Jean-Baptiste Onofré
            dkulp Daniel Kulp
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: