Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-461

ClassCastException on the same class when install my custom feature

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • 4.0.3, 3.0.11
    • None
    • blueprint
    • None

      Seems like another class loader heisenbug...

      Caused by: java.lang.ClassCastException: org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.distributed.datastore.provider.rev140612.DataStorePropertiesContainer$$$codecImpl cannot be cast to org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.config.distributed.datastore.provider.rev140612.DataStorePropertiesContainer
              at org.opendaylight.controller.cluster.datastore.DatastoreContextIntrospector.<init>(DatastoreContextIntrospector.java:209) ~[?:?]
              at org.opendaylight.controller.cluster.datastore.DatastoreContextIntrospectorFactory.newInstance(DatastoreContextIntrospectorFactory.java:35) ~[?:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
              at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
              at org.apache.aries.blueprint.utils.ReflectionUtils.invoke(ReflectionUtils.java:337) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.invoke(BeanRecipe.java:835) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromFactory(BeanRecipe.java:296) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:279) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:685) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:666) ~[?:?]
              at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81) ~[?:?]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90) ~[?:?]
              at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62) ~[?:?]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:108) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.getFactoryObj(BeanRecipe.java:309) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.getInstanceFromFactory(BeanRecipe.java:289) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:279) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:685) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:666) ~[?:?]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:108) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.getInstance(BeanRecipe.java:268) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate2(BeanRecipe.java:685) ~[?:?]
              at org.apache.aries.blueprint.container.BeanRecipe.internalCreate(BeanRecipe.java:666) ~[?:?]
              at org.apache.aries.blueprint.di.AbstractRecipe$1.call(AbstractRecipe.java:81) ~[?:?]
              at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:90) ~[?:?]
              at org.apache.aries.blueprint.di.RefRecipe.internalCreate(RefRecipe.java:62) ~[?:?]
              at org.apache.aries.blueprint.di.AbstractRecipe.create(AbstractRecipe.java:108) ~[?:?]
              at org.apache.aries.blueprint.container.ServiceRecipe.createService(ServiceRecipe.java:285) ~[?:?]
      

      For some reason, I need to use some older version bundles, here is output of 'feature:install -v odl-custom-feature', and I'm also confused if multiple versions of bundles to be installed causes the refresh:

      Adding features: odl-custom-feature/[0.1.0.SNAPSHOT,0.1.0.SNAPSHOT]
      Changes to perform:
        Region: root
          Bundles to install:
            mvn:com.fasterxml/classmate/1.3.1
            mvn:com.google.guava/guava/18.0
            mvn:org.eclipse.jetty/jetty-continuation/9.4.8.v20171121
            mvn:org.eclipse.jetty/jetty-http/9.4.8.v20171121
            mvn:org.eclipse.jetty/jetty-http/9.4.12.v20180830
            mvn:org.eclipse.jetty/jetty-http/9.4.12.v20180830
            mvn:org.eclipse.jetty/jetty-io/9.4.8.v20171121
            mvn:org.eclipse.jetty/jetty-security/9.4.8.v20171121
            mvn:org.eclipse.jetty/jetty-server/9.4.8.v20171121
            mvn:org.eclipse.jetty/jetty-servlet/9.4.8.v20171121
            mvn:org.eclipse.jetty/jetty-servlets/9.4.8.v20171121
            mvn:org.eclipse.jetty/jetty-util/9.4.8.v20171121
            mvn:org.eclipse.jetty/jetty-webapp/9.4.8.v20171121
            mvn:org.eclipse.jetty.websocket/websocket-common/9.4.12.v20180830
            mvn:org.eclipse.jetty/jetty-xml/9.4.8.v20171121
            mvn:org.hibernate/hibernate-validator/5.4.2.Final
            mvn:org.jboss.logging/jboss-logging/3.3.0.Final
            mvn:org.jboss.spec.javax.interceptor/jboss-interceptors-api_1.2_spec/1.0.0.Final
      Stopping bundles:
        wrap_file__home_sdn_gerrit_integration_karaf_target_assembly_system_org_iq80_leveldb_leveldb_0.10_leveldb-0.10.jar/0.0.0
        org.opendaylight.netconf.restconf-nb-rfc8040/1.10.0.SNAPSHOT
        org.opendaylight.netconf.restconf-nb-bierman02/1.10.0.SNAPSHOT
        org.opendaylight.netconf.restconf-common/1.10.0.SNAPSHOT
        org.opendaylight.controller.sal-remoterpc-connector/1.10.0.SNAPSHOT
        org.opendaylight.controller.sal-clustering-commons/1.10.0.SNAPSHOT
        org.opendaylight.controller.sal-cluster-admin-impl/1.10.0.SNAPSHOT
        org.opendaylight.controller.sal-akka-segmented-journal/1.10.0.SNAPSHOT
        org.opendaylight.controller.sal-akka-raft/1.10.0.SNAPSHOT
        org.opendaylight.controller.cds-access-client/1.6.0.SNAPSHOT
        org.opendaylight.controller.cds-access-api/1.6.0.SNAPSHOT
        org.opendaylight.aaa.web.servlet-api/0.10.0.SNAPSHOT
        org.opendaylight.aaa.authn-api/0.10.0.SNAPSHOT
        org.jboss.netty/3.10.6.Final
        org.glassfish.jersey.media.jersey-media-jaxb/2.25.1
        org.glassfish.jersey.core.jersey-server/2.25.1
        org.glassfish.jersey.core.jersey-common/2.25.1
        org.glassfish.jersey.core.jersey-client/2.25.1
        org.glassfish.jersey.containers.jersey-container-servlet-core/2.25.1
        org.glassfish.jersey.containers.jersey-container-servlet/2.25.1
        org.glassfish.hk2.utils/2.5.0.b32
        org.glassfish.hk2.locator/2.5.0.b32
        org.glassfish.hk2.api/2.5.0.b32
        javax.ws.rs-api/2.0.1
        com.typesafe.akka.stream/2.5.21
        com.typesafe.akka.slf4j/2.5.21
        com.typesafe.akka.remote/2.5.21
        com.typesafe.akka.persistence/2.5.21
        com.typesafe.akka.osgi/2.5.21
        com.typesafe.akka.cluster/2.5.21
        com.typesafe.akka.actor/2.5.21
        org.opendaylight.controller.sal-distributed-datastore/1.10.0.SNAPSHOT
        org.opendaylight.aaa.shiro/0.10.0.SNAPSHOT
        org.opendaylight.aaa.web.servlet-jersey2/0.10.0.SNAPSHOT
        org.ops4j.pax.web.pax-web-jetty/7.2.5
        org.eclipse.jetty.websocket.servlet/9.4.12.v20180830
        org.eclipse.jetty.websocket.server/9.4.12.v20180830
        org.eclipse.jetty.websocket.javax.websocket.server/9.4.12.v20180830
        org.eclipse.jetty.websocket.javax.websocket/9.4.12.v20180830
        org.eclipse.jetty.websocket.common/9.4.12.v20180830
        org.eclipse.jetty.websocket.client/9.4.12.v20180830
        org.eclipse.jetty.websocket.api/9.4.12.v20180830
        org.eclipse.jetty.webapp/9.4.12.v20180830
        org.eclipse.jetty.servlets/9.4.12.v20180830
        org.eclipse.jetty.servlet/9.4.12.v20180830
        org.eclipse.jetty.server/9.4.12.v20180830
        org.eclipse.jetty.security.jaspi/9.4.12.v20180830
        org.eclipse.jetty.security/9.4.12.v20180830
        org.eclipse.jetty.rewrite/9.4.12.v20180830
        org.eclipse.jetty.plus/9.4.12.v20180830
        org.eclipse.jetty.jndi/9.4.12.v20180830
        org.eclipse.jetty.jaas/9.4.12.v20180830
        org.eclipse.jetty.deploy/9.4.12.v20180830
        org.eclipse.jetty.client/9.4.12.v20180830
      Installing bundles:
        mvn:com.fasterxml/classmate/1.3.1
        mvn:com.google.guava/guava/18.0
        mvn:org.eclipse.jetty/jetty-continuation/9.4.8.v20171121
        mvn:org.eclipse.jetty/jetty-http/9.4.8.v20171121
        mvn:org.eclipse.jetty/jetty-http/9.4.12.v20180830
        mvn:org.eclipse.jetty/jetty-http/9.4.12.v20180830
        mvn:org.eclipse.jetty/jetty-io/9.4.8.v20171121
        mvn:org.eclipse.jetty/jetty-security/9.4.8.v20171121
        mvn:org.eclipse.jetty/jetty-server/9.4.8.v20171121
        mvn:org.eclipse.jetty/jetty-servlet/9.4.8.v20171121
        mvn:org.eclipse.jetty/jetty-servlets/9.4.8.v20171121
        mvn:org.eclipse.jetty/jetty-util/9.4.8.v20171121
        mvn:org.eclipse.jetty/jetty-webapp/9.4.8.v20171121
        mvn:org.eclipse.jetty.websocket/websocket-common/9.4.12.v20180830
        mvn:org.eclipse.jetty/jetty-xml/9.4.8.v20171121
        mvn:org.hibernate/hibernate-validator/5.4.2.Final
        mvn:org.jboss.logging/jboss-logging/3.3.0.Final
        mvn:org.jboss.spec.javax.interceptor/jboss-interceptors-api_1.2_spec/1.0.0.Final
      Refreshing bundles:
          com.typesafe.akka.actor/2.5.21 (Wired to com.typesafe.akka.remote/2.5.21 which is being refreshed)
          com.typesafe.akka.cluster/2.5.21 (Wired to com.typesafe.akka.actor/2.5.21 which is being refreshed)
          com.typesafe.akka.osgi/2.5.21 (Wired to com.typesafe.akka.actor/2.5.21 which is being refreshed)
          com.typesafe.akka.persistence/2.5.21 (Wired to wrap_file__home_sdn_gerrit_integration_karaf_target_assembly_system_org_iq80_leveldb_leveldb_0.10_leveldb-0.10.jar/0.0.0 which is being refreshed)
          com.typesafe.akka.remote/2.5.21 (Wired to org.jboss.netty/3.10.6.Final which is being refreshed)
          com.typesafe.akka.slf4j/2.5.21 (Wired to com.typesafe.akka.actor/2.5.21 which is being refreshed)
          com.typesafe.akka.stream/2.5.21 (Wired to com.typesafe.akka.actor/2.5.21 which is being refreshed)
          javax.ws.rs-api/2.0.1 (Wired to org.glassfish.jersey.core.jersey-common/2.25.1 which is being refreshed)
          org.eclipse.jetty.client/9.4.12.v20180830 (Should be wired to: org.eclipse.jetty.http/9.4.12.v20180830 (through [org.eclipse.jetty.client/9.4.12.v20180830] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.eclipse.jetty.http)(version>=9.4.12)(!(version>=10.0.0)))"))
          org.eclipse.jetty.deploy/9.4.12.v20180830 (Wired to org.eclipse.jetty.server/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.jaas/9.4.12.v20180830 (Wired to org.eclipse.jetty.security/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.jndi/9.4.12.v20180830 (Wired to org.eclipse.jetty.server/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.plus/9.4.12.v20180830 (Wired to org.eclipse.jetty.jndi/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.rewrite/9.4.12.v20180830 (Should be wired to: org.eclipse.jetty.http/9.4.12.v20180830 (through [org.eclipse.jetty.rewrite/9.4.12.v20180830] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.eclipse.jetty.http)(version>=9.4.12)(!(version>=10.0.0)))"))
          org.eclipse.jetty.security/9.4.12.v20180830 (Should be wired to: org.eclipse.jetty.http/9.4.12.v20180830 (through [org.eclipse.jetty.security/9.4.12.v20180830] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.eclipse.jetty.http)(version>=9.4.12)(!(version>=10.0.0)))"))
          org.eclipse.jetty.security.jaspi/9.4.12.v20180830 (Wired to org.eclipse.jetty.security/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.server/9.4.12.v20180830 (Should be wired to: org.eclipse.jetty.http/9.4.12.v20180830 (through [org.eclipse.jetty.server/9.4.12.v20180830] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.eclipse.jetty.http)(version>=9.4.12)(!(version>=10.0.0)))"))
          org.eclipse.jetty.servlet/9.4.12.v20180830 (Wired to org.eclipse.jetty.security/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.servlets/9.4.12.v20180830 (Wired to org.eclipse.jetty.server/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.webapp/9.4.12.v20180830 (Wired to org.eclipse.jetty.security/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.websocket.api/9.4.12.v20180830 (Wired to org.eclipse.jetty.websocket.common/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.websocket.client/9.4.12.v20180830 (Wired to org.eclipse.jetty.client/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.websocket.common/9.4.12.v20180830 (Should be wired to: org.eclipse.jetty.websocket.common/9.4.12.v20180830 (through [org.eclipse.jetty.websocket.common/9.4.12.v20180830] osgi.wiring.package; filter:="(&(osgi.wiring.package=org.eclipse.jetty.websocket.common)(version>=9.4.12)(!(version>=10.0.0)))"))
          org.eclipse.jetty.websocket.javax.websocket/9.4.12.v20180830 (Wired to org.eclipse.jetty.client/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.websocket.javax.websocket.server/9.4.12.v20180830 (Wired to org.eclipse.jetty.client/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.websocket.server/9.4.12.v20180830 (Wired to org.eclipse.jetty.server/9.4.12.v20180830 which is being refreshed)
          org.eclipse.jetty.websocket.servlet/9.4.12.v20180830 (Wired to org.eclipse.jetty.websocket.api/9.4.12.v20180830 which is being refreshed)
          org.glassfish.hk2.api/2.5.0.b32 (Wired to org.glassfish.hk2.utils/2.5.0.b32 which is being refreshed)
          org.glassfish.hk2.locator/2.5.0.b32 (Wired to org.glassfish.hk2.api/2.5.0.b32 which is being refreshed)
          org.glassfish.hk2.utils/2.5.0.b32 (Should be wired to: org.hibernate.validator/5.4.2.Final (through [org.glassfish.hk2.utils/2.5.0.b32] osgi.wiring.package; resolution:=optional; filter:="(&(osgi.wiring.package=org.hibernate.validator)(version>=5.2.0)(!(version>=6.0.0)))"))
          org.glassfish.jersey.containers.jersey-container-servlet/2.25.1 (Wired to javax.ws.rs-api/2.0.1 which is being refreshed)
          org.glassfish.jersey.containers.jersey-container-servlet-core/2.25.1 (Wired to javax.ws.rs-api/2.0.1 which is being refreshed)
          org.glassfish.jersey.core.jersey-client/2.25.1 (Wired to javax.ws.rs-api/2.0.1 which is being refreshed)
          org.glassfish.jersey.core.jersey-common/2.25.1 (Wired to org.glassfish.hk2.utils/2.5.0.b32 which is being refreshed)
          org.glassfish.jersey.core.jersey-server/2.25.1 (Wired to org.glassfish.hk2.utils/2.5.0.b32 which is being refreshed)
          org.glassfish.jersey.media.jersey-media-jaxb/2.25.1 (Wired to org.glassfish.jersey.core.jersey-common/2.25.1 which is being refreshed)
          org.jboss.netty/3.10.6.Final (Should be wired to: org.jboss.logging.jboss-logging/3.3.0.Final (through [org.jboss.netty/3.10.6.Final] osgi.wiring.package; resolution:=optional; filter:="(&(osgi.wiring.package=org.jboss.logging)(version>=3.1.0)(!(version>=4.0.0)))"))
          org.opendaylight.aaa.authn-api/0.10.0.SNAPSHOT (Wired to javax.ws.rs-api/2.0.1 which is being refreshed)
          org.opendaylight.aaa.shiro/0.10.0.SNAPSHOT (Wired to org.eclipse.jetty.servlets/9.4.12.v20180830 which is being refreshed)
          org.opendaylight.aaa.web.servlet-api/0.10.0.SNAPSHOT (Wired to javax.ws.rs-api/2.0.1 which is being refreshed)
          org.opendaylight.aaa.web.servlet-jersey2/0.10.0.SNAPSHOT (Wired to org.glassfish.jersey.core.jersey-server/2.25.1 which is being refreshed)
          org.opendaylight.controller.cds-access-api/1.6.0.SNAPSHOT (Wired to com.typesafe.akka.actor/2.5.21 which is being refreshed)
          org.opendaylight.controller.cds-access-client/1.6.0.SNAPSHOT (Wired to com.typesafe.akka.persistence/2.5.21 which is being refreshed)
          org.opendaylight.controller.sal-akka-raft/1.10.0.SNAPSHOT (Wired to com.typesafe.akka.persistence/2.5.21 which is being refreshed)
          org.opendaylight.controller.sal-akka-segmented-journal/1.10.0.SNAPSHOT (Wired to com.typesafe.akka.persistence/2.5.21 which is being refreshed)
          org.opendaylight.controller.sal-cluster-admin-impl/1.10.0.SNAPSHOT (Wired to org.opendaylight.controller.sal-akka-raft/1.10.0.SNAPSHOT which is being refreshed)
          org.opendaylight.controller.sal-clustering-commons/1.10.0.SNAPSHOT (Wired to com.typesafe.akka.persistence/2.5.21 which is being refreshed)
          org.opendaylight.controller.sal-distributed-datastore/1.10.0.SNAPSHOT (Wired to com.typesafe.akka.persistence/2.5.21 which is being refreshed)
          org.opendaylight.controller.sal-remoterpc-connector/1.10.0.SNAPSHOT (Wired to org.opendaylight.controller.sal-clustering-commons/1.10.0.SNAPSHOT which is being refreshed)
          org.opendaylight.netconf.restconf-common/1.10.0.SNAPSHOT (Wired to javax.ws.rs-api/2.0.1 which is being refreshed)
          org.opendaylight.netconf.restconf-nb-bierman02/1.10.0.SNAPSHOT (Wired to org.eclipse.jetty.servlets/9.4.12.v20180830 which is being refreshed)
          org.opendaylight.netconf.restconf-nb-rfc8040/1.10.0.SNAPSHOT (Wired to org.eclipse.jetty.servlets/9.4.12.v20180830 which is being refreshed)
          org.ops4j.pax.web.pax-web-jetty/7.2.5 (Wired to org.eclipse.jetty.security/9.4.12.v20180830 which is being refreshed)
          wrap_file__home_sdn_gerrit_integration_karaf_target_assembly_system_org_iq80_leveldb_leveldb_0.10_leveldb-0.10.jar/0.0.0 (Should be wired to: com.google.guava/18.0.0 (through [wrap_file__home_sdn_gerrit_integration_karaf_target_assembly_system_org_iq80_leveldb_leveldb_0.10_leveldb-0.10.jar/0.0.0] osgi.wiring.package; resolution:=optional; filter:="(osgi.wiring.package=com.google.common.base)"))
      Starting bundles:
        org.jboss.logging.jboss-logging/3.3.0.Final
        com.fasterxml.classmate/1.3.1
        org.hibernate.validator/5.4.2.Final
        org.eclipse.jetty.util/9.4.8.v20171121
        org.eclipse.jetty.io/9.4.8.v20171121
        org.eclipse.jetty.http/9.4.8.v20171121
        org.eclipse.jetty.server/9.4.8.v20171121
        org.eclipse.jetty.security/9.4.8.v20171121
        org.eclipse.jetty.servlet/9.4.8.v20171121
        org.eclipse.jetty.xml/9.4.8.v20171121
        org.eclipse.jetty.webapp/9.4.8.v20171121
        org.eclipse.jetty.continuation/9.4.8.v20171121
        org.eclipse.jetty.servlets/9.4.8.v20171121
        org.jboss.spec.javax.interceptor.jboss-interceptors-api_1.2_spec/1.0.0.Final
        com.google.guava/18.0.0
      Done.
      
      

            JieHan2017 Jie Han
            JieHan2017 Jie Han
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: