Tomcat无法找到方法

时间:2017-04-09 06:02:56

标签: java tomcat guava

我正在使用Google Guava jar来查找子集并使用tomcat创建Web应用程序。但是,当我调用具有Sets.powerSet函数的类时,Tomcat给了我一个例外

  

HTTP状态500

     

处理程序处理失败;嵌套异常是java.lang.NoSuchMethodError:com.google.common.collect.Sets.powerSet(Ljava / util / Set;)Ljava / util / Set;

public LinkedHashSet<Set<Item>> generateAllPossibilities(Multimap<Item, Item> largeItemset, Map<String, Multimap> ObjectInfo, double minSupport) {
    LinkedHashSet<Item> setOfItems = new LinkedHashSet(1000);
    Set<Item> objectKeys = largeItemset.keySet();
    setOfItems.addAll(objectKeys);
    /**
     * debug
     */
    /*
    for (Item keyprint : objectKeys) {
        System.out.print(keyprint.object + "\t\t" + keyprint.predicate + "\t\t");
        Collection<Item> values = largeItemset.get(keyprint);
        setOfItems.addAll(values);
        for (Item value : values) {
            System.out.print("{" + value.object + "\t\t" + value.predicate + "}");
        }
        System.err.println();
    }
     */
    /**
     * debug
     */
    /*
    System.out.println("Set of items is ");
    for (Item item : setOfItems) {
        System.out.println(item.object + "\t\t" + item.predicate);
    }
     */
    Set<Set<Item>> power = Sets.powerSet(setOfItems);

0 个答案:

没有答案