3 Replies Latest reply on Sep 4, 2019 3:54 AM by anistor

    Unable to configure "indexed-enity" with remote indexing and protobuf

    jreimann-1

      When using indexing, then Infinspan complains about missing configuration of entities, if they are not provided via `indexed-entities`:

       

      ISPN000403: No indexable classes were defined for this indexed cache; switching to autodetection (support for autodetection will be removed in Infinispan 10.0)

       

      While this "only" seems to be a warning, clearing it seems not the correct way to configure the cache.

       

      Using remote indexing with protobuf, as described in [1], it is necessary to upload a schema file, and not have server side, Java classes.

       

      Using those protobuf messages as `indexed-entities` however causes a server side failure:

       

      Caused by: java.lang.IllegalStateException: DGISPN0122: Could not instantiate class pkg.of.FooBar
          at org.infinispan.extension:ispn-9.4@9.4.11.Final//org.jboss.as.clustering.infinispan.subsystem.CacheConfigurationAdd$1.inject(CacheConfigurationAdd.java:379)
          at org.infinispan.extension:ispn-9.4@9.4.11.Final//org.jboss.as.clustering.infinispan.subsystem.CacheConfigurationAdd$1.inject(CacheConfigurationAdd.java:371)
          at org.jboss.msc@1.4.3.Final//org.jboss.msc.inject.CastingInjector.inject(CastingInjector.java:58)
          at org.jboss.msc@1.4.3.Final//org.jboss.msc.service.ServiceControllerImpl.inject(ServiceControllerImpl.java:1515)
          at org.jboss.msc@1.4.3.Final//org.jboss.msc.service.ServiceControllerImpl.inject(ServiceControllerImpl.java:1501)
          at org.jboss.msc@1.4.3.Final//org.jboss.msc.service.ServiceControllerImpl.access$2800(ServiceControllerImpl.java:55)
          at org.jboss.msc@1.4.3.Final//org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1697)

       

      I can't seem to find any documentation, which would would explain the correct setup in this case.

       

      [1]: Infinispan 9.4 User Guide

        • 1. Re: Unable to configure "indexed-enity" with remote indexing and protobuf
          anistor

          Hi, if you plan to use java objects + serialization + hibernate search annotations for indexing (with remote cache), please have a look here Infinispan 9.4 User Guide  regarding the steps needed in order to deploy those classes to the server side (the classes you have listed in 'indexed-entities' need to be provided to the serve too, not just to the client).  But if you prefer to use protobuf marshalling (I would encourage that route) then just ignore that warning and do not list any class name under 'indexed-entities', also do not deploy those classes to the server because server does not need them (it uses the proto schema); the classes are for client only, in this case.   So why the warning in this particular case? It's a pretty trivial and benign bug. Please jira it so we can have a bette look at it. Thanks!

          • 2. Re: Unable to configure "indexed-enity" with remote indexing and protobuf
            jreimann-1

            As I tried to say with:

             

            Using remote indexing with protobuf, as described in [1], it is necessary to upload a schema file, and not have server side, Java classes.

            I am already using protobuf. However, the warning:

            ISPN000403: No indexable classes were defined for this indexed cache; switching to autodetection (support for autodetection will be removed in Infinispan 10.0)

            indicates to me, that this way will no longer work with Infinispan 10. And I would prefer to have something which is expected to work with version 10 as well.

            • 3. Re: Unable to configure "indexed-enity" with remote indexing and protobuf
              anistor

              As I was saying, it's a benign bug that the warning exists. You are fine ignoring it. This warning was not meant for the protobuf use case. And the code that causes it will be redone in this infinispan version.