1 Reply Latest reply on Sep 16, 2019 3:44 AM by zhurlik

    Invalid method signature publishKeys in AdvancedCacheLoader and JdbcStringBasedStore

    alireza.alallah

      below method :
      public Flowable<K> publishKeys(Predicate<? super K> filter);
      in class JdbcStringBasedStore has invalid signature of parent method in class AdvancedCacheLoader

      https://docs.jboss.org/infinispan/10.0/apidocs/org/infinispan/persistence/spi/AdvancedCacheLoader.html

      https://docs.jboss.org/infinispan/10.0/apidocs/org/infinispan/persistence/jdbc/stringbased/JdbcStringBasedStore.html

      Stacktrace

      Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "org.infinispan.persistence.jpa.JpaStore.publishKeys(Ljava/util/function/Predicate;)Lorg/reactives
      treams/Publisher;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/infinispan/persistence/jpa/JpaStore, and the class loader (instance of org/jboss/modules/ModuleClassLoader)
      for interface org/infinispan/persistence/spi/AdvancedCacheLoader have different Class objects for the type org/reactivestreams/Publisher used in the signature
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Class.java:2688)
      at java.lang.Class.privateGetPublicMethods(Class.java:2814)
      at java.lang.Class.getMethods(Class.java:1602)
      at org.infinispan.commons.util.Util.getFactoryMethod(Util.java:212)
      at org.infinispan.commons.util.Util.getInstanceStrict(Util.java:249)
      at org.infinispan.commons.util.Util.getInstance(Util.java:230)
      at org.infinispan.persistence.factory.LocalClassLoaderCacheStoreFactory.createInstance(LocalClassLoaderCacheStoreFactory.java:25)
      at org.infinispan.persistence.factory.CacheStoreFactoryRegistry.createInstance(CacheStoreFactoryRegistry.java:39)
      at org.infinispan.persistence.manager.PersistenceManagerImpl.createLoadersAndWriters(PersistenceManagerImpl.java:900)
      at org.infinispan.persistence.manager.PersistenceManagerImpl.start(PersistenceManagerImpl.java:158)
      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:483)
      at org.infinispan.commons.util.SecurityActions.lambda$invokeAccessibly$0(SecurityActions.java:79)
      ... 153 more

       

       

      https://issues.jboss.org/browse/ISPN-10587

        • 1. Re: Invalid method signature publishKeys in AdvancedCacheLoader and JdbcStringBasedStore
          zhurlik

          Hi,

           

          Probably it can be related with JBoss Classloader, sometimes when you have a few modules A and B, both of them have for example jar file in the dependencies (not extracted into a module) you can have the problems with using the classes from this jar file in the module A and B.

          What I would like to suggest that it's double check your modules that contain org/infinispan/persistence/spi/AdvancedCacheLoader and  org/infinispan/persistence/jpa/JpaStore (when they are 2 different modules) a reference to separated module that contains org/reactivestreams/Publisher class.

           

          Thnaks,

          Vlad