2 Replies Latest reply on Jun 23, 2011 2:29 PM by Martin Studer

    Unknown type metadata when using cache queries

    Martin Studer Newbie

      Hi everybody,

       

      I'm trying to use infinispan's cache queries with a simple entity that has a String as the corresponding id (class is @Indexed with the corresponding String id field marked as @DocumentId).  I've been closely following the steps outlined at http://community.jboss.org/wiki/QueryingInfinispan but consistently get a "org.infinispan.CacheException: Unknown type metadata [X]" exception where [X] seems to be the first character of the randomly generated string UUID that I'm using as the entity's id. The exception is thrown when calling query.list().

      I also tried with other id types such as Integer, Long and even tried to implement custom key classes marked with @Transformable and implementing corresponding Transformers - but that all didn't help. Did I miss something?

       

      I tried with Infinispan 5.0.0.CR5 and 5.0.0.CR6. The following is a stack trace excerpt:

       

      org.infinispan.CacheException: Unknown type metadata 6

        at org.infinispan.query.backend.KeyTransformationHandler.stringToKey(KeyTransformationHandler.java:100)

        at org.infinispan.query.impl.EntityLoader.load(EntityLoader.java:47)

        at org.infinispan.query.impl.EntityLoader.load(EntityLoader.java:55)

        at org.infinispan.query.impl.CacheQueryImpl.list(CacheQueryImpl.java:148)

       

      Any help is very much appreciated.

       

      Thanks,

      Martin