3 Replies Latest reply on May 27, 2011 10:22 AM by galder.zamarreno

    Querying Infinispan

    kaba

      is the Query interface of infinspan now working?

      i get the following error whike trying to run the following code

      <quote>

        CacheContainer cacheContainer = new RemoteCacheManager();

                              System.out.println("Start2"); 

       

                              Cache<String, IMasterfile> cache = cacheContainer.getCache("replicationCache");

      QueryHelper qh = new QueryHelper(cache, new Properties(), Department.class);

      QueryFactory qf = new QueryFactory(cache, qh);

                      Department department=new Department("4711","test Department");

            Category category=new Category("4811","test Category","Test Description",department, new Date (), new Date(), new Date());

                             cache.put("department", department);

             cache.put("category", category);

        

           CacheQuery cq = qf.getBasicQuery("id", "4711")

      List found = cq.list();

      System.out.println("found="+found );

      System.out.println("hits="+ hits );

       

        CacheContainer cacheContainer = new RemoteCacheManager();
                              System.out.println("Start2"); 
                              Cache<String, IMasterfile> cache = cacheContainer.getCache("replicationCache");
      QueryHelper qh = new QueryHelper(cache, new Properties(), Department.class);
      QueryFactory qf = new QueryFactory(cache, qh);

      </quote>

       

      Stacktrace:

       

       

      Start1

      Start2

      Exception in thread "main" java.lang.UnsupportedOperationException

              at org.infinispan.client.hotrod.impl.RemoteCacheSupport.getStatus(Remote

      CacheSupport.java:152)

              at org.infinispan.query.backend.QueryHelper.<init>(QueryHelper.java:82)

              at Test.TestCache.main(TestCache.java:23)

       

      c:\iws\infinispan>