-
Bug
-
Resolution: Done
-
Major
-
12.0.0.CR1
-
None
When creating a cache with an indexed entity with the wrong configuration. Infinispan is returning the wrong message.
If the java class has the following content.
@Indexed @ProtoDoc("@Indexed") public static final class User { @ProtoField(number = 1) Long id; @ProtoField(number = 2) String name; }
When creating a cache, the server is returning
Exception in thread "main" org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=10 returned server error (status=0x85): org.infinispan.commons.CacheConfigurationException: ISPN028021: The configured indexed-entity type 'black_friday.User' must be indexed. Please annotate it with @Indexed or remove it from the configuration. at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:335)
As you can see, the entity has the @Indexed annotation.
What is missing is the @ProtoDoc annotation in the field, as the following
@Indexed @ProtoDoc("@Indexed") public static final class User { @ProtoDoc("@Field(index=Index.YES, analyze = Analyze.YES, store = Store.NO)") @ProtoField(number = 1) Long id; @ProtoField(number = 2) String name; }