GWT应用程序中Guava模块的正确名称是什么? [英] What's the correct name for Guava module in GWT application?

查看:244
本文介绍了GWT应用程序中Guava模块的正确名称是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

GWT SDK中有两个jar包: gwt-user.jar gwt-dev.jar 。因为它们在我的classpath中,所以我可以毫无问题地使用它们。

然而,当我尝试使用gwt捆绑的guava(com.google.gwt.thirdparty.guava.common )我在客户端运行时遇到以下错误:


类型 com.google.gwt没有源代码可用。 thirdparty.guava.common.collect.Lists ;你忘了继承一个必需的模块吗?


是的,我可能忘记继承 required 模块,但我不知道哪一个是番石榴:)

我检查了罐子并发现了很多.gwt.xml文件,但是在gwt-user.jar和没有guava在那里签名:O



更新:似乎是同时存在guava.jar和guava-gwt.jar @ classpath的问题。所以我现在只使用guava-gwt.jar,但是在启动应用程序时记录了这一点。编译器抱怨javax.annotation和类似的东西......由于字符数量限制,我无法在这里粘贴完整日志。

  [DEBUG] [databasemanager]  - 验证新编译的单元
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar !/com/google/common/base/Equivalence.java'
[错误] [databasemanager] - 第20行:导入javax.annotation无法解析
[错误] [databasemanager] - 第51行: Nullable无法解析为类型
[错误] [databasemanager] - 第51行:Nullable无法解析为类型
[错误] [databasemanager] - 第60行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Equivalences.java '
[错误] [databasemanager] - 第20行:导入javax.annotation canno无法解析
[ERROR] [databasemanager] - 第73行:Nullable无法解析为类型
[错误] [databasemanager] - 第73行:Nullable无法解析为类型
[ ERROR] [databasemanager] - 第78行:Nullable无法解析为类型
[ERROR] [databasemanager] - 第83行:Nullable无法解析为类型
[ERROR] [databasemanager] - 第83行:Nullable不能解析为类型
[错误] [数据库管理器] - 第87行:Nullable不能解析为类型
[错误] [databasemanager] - jar:file:/ home / miso / Java%20libs / guava-r08 / guava-r08-gwt.jar!/com/google/common/base/Function.java'
[错误] [databasemanager] - 第19行:导入javax.annotation无法解析
[错误] [数据库管理员] - 第43行:可空值无法解析为类型
[错误] [数据库管理员] - 第55行:可空值无法解析为键入
[错误] [databasemanager] - 错误在'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / base / Functions .java'
[错误] [databasemanager] - 第25行:无法解析导入的javax.annotation
[错误] [databasemanager] - 第108行:Nullable无法解析为类型
[错误] [数据库管理员] - 第137行:可空值不能解析为类型
[错误] [数据库管理员] - 第145行:可空值不能解析为类型
[错误] [databasemanager] - 行155:Nullable无法解析为类型
[错误] [数据库管理员] - 行200:Nullable无法解析为类型
[错误] [databasemanager] - 行241:Nullable无法解析为键入
[错误] [数据库管理员] - 266行:Nullable无法解析为类型
[错误] [databasemanager] - 行273:无法解析为空类型
[错误] [数据库管理器] - 行277:可空类型不能解析为类型
[错误] [数据库管理员] - 行281:可空类型不能解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Joiner.java'
第28行:无法解析导入的javax.annotation
[错误] [databasemanager] - 第113行:Nullable无法解析为类型
[错误] [databasemanager] - 第113行:Nullable无法解析为类型
[错误] [databasemanager] - 第147行:Nullable无法解析为类型
[错误] [databasemanager] - 第147行:Nullable无法解析为类型
[错误] [数据库管理员] - 行171:可空值不能解析为类型
[错误] [数据库管理员] - 行171:可空值不能解析为键入
[错误] [databasemanager] - 错误在'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / base / Objects .java'
[错误] [databasemanager] - 第25行:导入javax.annotation无法解析
[错误] [databasemanager] - 第50行:Nullable无法解析为类型
[错误] [databasemanager] - 第50行:Nullable无法解析为类型
[错误] [databasemanager] - 第160行:Nullable无法解析为类型
[错误] [databasemanager] - 行160:Nullable无法解析为类型
[错误] [databasemanager] - 第188行:Nullable无法解析为类型
[错误] [databasemanager] - 第203行:Nullable无法解析为a键入
[错误] [databasemanager] - 错误在'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / base / Preconditions .java'
[错误] [databasemanager] - 第24行:导入javax.annotation无法解析
[错误] [databasemanager] - 第86行:Nullable无法解析为类型
[错误] [databasemanager] - 行112: Nullable不能解析为类型
[错误] [databasemanager] - 行113:Nullable无法解析为类型
[错误] [databasemanager] - 行143:Nullable无法解析为类型
[ERROR] [databasemanager] - 第169行:Nullable无法解析为类型
[ERROR] [databasemanager] - 行170:Nullable无法解析为类型
[错误] [databasemanager ] - 第202行:Nullable不能解析为类型
[错误] [databasemanager] - 行227:可空类型不能解析为类型
[错误] [databasemanager] - 行228:可空解析为类型
[错误] [databasemanager] - 第298行:Nullable无法解析为键入
[错误] [数据库管理员] - 行348:可空类型不能解析为类型
[错误] [数据库管理员] - 行413:可空类型不能解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Predicate.java'
[ ERROR] [databasemanager] - 第21行:无法解析导入javax.annotation
[错误] [databasemanager] - 第45行:Nullable无法解析为类型
[错误] [databasemanager] - 行57:Nullable无法解析为类型
[错误] [databasemanager] - 错误在'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com /google/common/base/super/com/google/common/base/Predicates.java'
[错误] [databasemanager] - 第29行:导入javax.annotation无法解析
[错误] [databasemanager] - 第171行:可空的不能被解析编辑为类型
[错误] [数据库管理员] - 第209行:可空值不能解析为类型
[错误] [数据库管理员] - 行214:可空值不能解析为类型
[错误] [数据库管理员] - 第219行:Nullable无法解析为类型
[错误] [数据库管理员] - 第224行:无法解析为类型
[错误] [databasemanager] - 行248:Nullable无法解析为类型
[错误] [数据库管理员] - 行282:Nullable无法解析为类型
[错误] [databasemanager] - 行314:Nullable无法解析为a键入
[错误] [databasemanager] - 行341:Nullable无法解析为类型
[错误] [databasemanager] - 行362:无法解析为类型
[错误] [databasemanager] - 第368行:Nullable无法解析为类型
[错误] [databasemanager] - 第399行:Nu llable不能解析为类型
[错误] [数据库管理员] - 第432行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso /Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Strings.java'
[错误] [databasemanager] - 第26行:导入javax.annotation不能解决
[错误] [数据库管理员] - 第45行:可空值不能解析为类型
[错误] [数据库管理员] - 第56行:可空值不能解析为
[错误] [错误] [ databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Suppliers.java'
[错误]第26行:无法解析导入的javax.annotation
[错误] [databasemanager] - 第189行:Nullable无法解析为类型
[错误] [databasemanager] - 第197行:可空的不能解析为ype
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / super /com/google/common/collect/AbstractBiMap.java'
[错误] [databasemanager] - 第31行:导入javax.annotation无法解析
[错误] [databasemanager] - 行99:可空无法解析为类型
[错误] [数据库管理员] - 行99:可空值不能解析为类型
[错误] [databasemanager] - 错误在'jar:file:/ home / miso / Java%20libs / guava-r08 / guava-r08-gwt.jar!/com/google/common/collect/AbstractLinkedIterator.java'
[错误] [databasemanager] - 第24行:导入javax.annotation不能已解决
[错误] [数据库管理员] - 第45行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso / Java%20libs / guava -r08 /番石榴-R08-gwt.jar!/ COM /谷歌/普通/收集/ AbstractLi stMultimap.java'
[错误] [databasemanager] - 第25行:导入javax.annotation无法解析
[错误] [databasemanager] - 第60行:Nullable无法解析为类型
[ERROR] [databasemanager] - 第71行:Nullable无法解析为类型
[错误] [databasemanager] - 第83行:Nullable无法解析为类型
[错误] [databasemanager] - 第94行:Nullable无法解析为类型
[错误] [databasemanager] - 第94行:Nullable无法解析为类型
[错误] [databasemanager] - 第115行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / super / com / google / common / collect / AbstractMapBasedMultiset.java'
[错误] [databasemanager] - 第36行:导入javax.annotation无法解析
[ER ROR] [databasemanager] - 第225行:Nullable无法解析为类型
[ERROR] [databasemanager] - 行230:Nullable无法解析为类型
[错误] [databasemanager] - 第244行:Nullable无法解析为类型
[错误] [数据库管理员] - 行266:Nullable不能解析为类型
[错误] [databasemanager] - 行322:可空类型不能解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / AbstractMapEntry。 java'
[错误] [databasemanager] - 第24行:无法解析导入的javax.annotation
[错误] [databasemanager] - 第43行:Nullable无法解析为类型
[ ERROR] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/AbstractMultimap.java'
[错误] [数据basemanager] - 第42行:导入javax.annotation无法解析
[错误] [databasemanager] - 行154:可空类型不能解析为类型
[错误] [databasemanager] - 行172:可空无法解析为类型
[错误] [数据库管理员] - 行176:可空值不能解析为类型
[错误] [数据库管理员] - 第186行:可空值不能解析为类型
[ERROR] [databasemanager] - 第186行:Nullable无法解析为类型
[ERROR] [databasemanager] - 行193:Nullable无法解析为类型
[错误] [databasemanager] - 行193:Nullable不能解析为类型
[错误] [数据库管理员] - 行204:可空类型不能解析为类型
[错误] [数据库管理员] - 行213:无法解析空值到类型
[错误] [databasemanager] - 行213:可空值不能解析为类型
[错误] [数据库管理员] - 第231行:Nullable不能解析为类型
[错误] [数据库管理员] - 第266行:可空值不能解析为类型
[错误] [错误] [数据库管理员] - 第293行:Nullable不能解析为类型
[错误] [数据库管理员] - 第335行:Nullable无法解析为类型
[错误] [databasemanager] - 行349:Nullable can not解析为类型
[错误] [数据库管理员] - 行362:可空键盘不能解析为类型
[错误] [databasemanager] - 行362:可空键盘不能解析为类型
[错误] [数据库管理员] - 行391:无法解析为类型
[错误] [数据库管理员] - 行392:无法解析为类型
[错误] [databasemanager] - 457行:Nullable无法解析为类型
[错误] [databasemanager] - 行630:可为空的canno t被解析为类型
[错误] [databasemanager] - 行640:可空类型不能解析为类型
[错误] [databasemanager] - 行641:可空类型不能解析为类型
[ERROR] [databasemanager] - 行687:Nullable无法解析为类型
[错误] [databasemanager] - 行688:Nullable无法解析为类型
[错误] [databasemanager] - 行817:Nullable不能解析为类型
[错误] [databasemanager] - 行818:可为空的不能解析为类型
[错误] [databasemanager] - 行900:可空的无法解析到类型
[错误] [databasemanager] - 行1284:可空值不能解析为类型
[错误] [databasemanager] - 行1355:可空值不能解析为类型
[错误] [databasemanager] - 第1464行:可空值不能解析为类型
[错误] [databasemanager] - 呃'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/AbstractMultiset.java'
[错误] [databasemanager ] - 第29行:无法解析导入的javax.annotation
[错误] [databasemanager] - 第61行:Nullable无法解析为类型
[错误] [databasemanager] - 第80行:Nullable can not解析为类型
[错误] [数据库管理员] - 第152行:可空值不能解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso / Java %20libs / guava-r08 / guava-r08-gwt.jar!/com/google/common/collect/AbstractSetMultimap.java'
[错误] [databasemanager] - 第25行:导入javax.annotation无法解析
[错误] [数据库管理员] - 第58行:Nullable无法解析为类型
[错误] [数据库管理员] - 第80行:无法解析为类型
[错误] [错误] [数据库管理员] - 第94行:Nullable无法解析为类型
[错误] [databasemanager] - 第127行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso / Java%20libs / guava-r08 / guava-r08-gwt.jar!/com/google/common/collect/AbstractSortedSetMultimap.java'
[错误] [databasemanager] - 第25行:导入javax .annotation无法解析
[ERROR] [databasemanager] - 第64行:Nullable无法解析为类型
[错误] [databasemanager] - 第76行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/BiMap.java'
[ERROR] [databasemanager] - 第24行:无法解析导入的javax.annotation
[错误] [databasemanager] - 第46行:Nullable无法解析为类型
[错误] [错误] [数据库管理员] - 第46行:Nullable不能解析为类型
[错误] [databasemanager] - 行65:可空类型不能解析为类型
[错误] [databasemanager] - 行65:可空类型不能解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / ByFunctionOrdering。 java'
[错误] [databasemanager] - 第27行:导入javax.annotation无法解析
[错误] [databasemanager] - 第49行:Nullable无法解析为类型
[ ERROR] [databasemanager] - 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ClassToInstanceMap.java'中的错误
[错误] [databasemanager] - 第23行:导入javax.annotation无法解析
[错误] [databasemanager] - 第58行:可空值不能解析为类型
[错误] [databasemanager] - 错误' jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ComparatorOrdering.java'
[错误] [databasemanager] - 行28:无法解析导入的javax.annotation
[错误] [databasemanager] - 第55行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso / Java%20libs / guava-r08 / guava-r08-gwt.jar!/com/google/common/collect/ComparisonChain.java'
[错误] [databasemanager] - 第26行:导入javax .annotation无法解析
[错误] [数据库管理员] - 第71行:Nullable无法解析为类型
[错误] [databasemanager] - 第71行:Nullable无法解析为类型
[ERROR] [databasemanager] - 第109行:Nullable无法解析为类型
[错误] [databasemanager] - 第109行:Nullable无法解析为类型
[错误] [databasemanager] - 112行:Nu llable不能解析为类型
[错误] [databasemanager] - 行113:可为空值不能解析为
[错误] [databasemanager] - 行113:可空值不能解析为类型
[错误] [数据库管理员] - 第149行:Nullable无法解析为类型
[错误] [数据库管理员] - 第149行:无法解析为类型
[错误] [databasemanager ] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / super / com / google / common / collect / EnumHashBiMap .java'
[错误] [databasemanager] - 第24行:导入javax.annotation无法解析
[错误] [databasemanager] - 第75行:可空值无法解析为类型
[错误] [数据库管理员] - 第79行:可空值无法解析为类型
[错误] [databasemanager] - 错误在'jar:file:/ home / miso / Java%20libs / guava-r08 / guava- R08-gwt.ja r!/com/google/common/collect/ExplicitOrdering.java'
[错误] [databasemanager] - 第24行:导入javax.annotation无法解析
[错误] [databasemanager] - 第61行:Nullable不能解析为类型
[错误] [databasemanager] - 错误在'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / ForwardingCollection.java'
[错误] [databasemanager] - 第26行:导入javax.annotation无法解析
[错误] [databasemanager] - 第117行:无法解析Nullable到类型
[错误] [数据库管理员] - 第156行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso / Java%20libs /guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/ForwardingImmutableCollection.java'
[错误] [databasemanager] - 第21行:导入javax.annotation可以不能解决
[错误] [databasemanager] - 第42行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso / Java%20libs /guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingList.java'
[错误] [databasemanager] - 第27行:导入javax.annotation无法解析
[ERROR] [databasemanager] - 第104行:Nullable无法解析为类型
[错误] [databasemanager] - 第145行:Nullable无法解析为类型
[错误] [databasemanager] - 行157:Nullable不能解析为类型
[错误] [databasemanager] - 行214:可空类型不能解析为类型
[错误] [databasemanager] - jar中的错误:file: /home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingListMultimap.java'
[错误] [databasemanager] - 第23行:导入javax.annotation c无法解析
[错误] [数据库管理员] - 第43行:Nullable无法解析为类型
[错误] [databasemanager] - 第47行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingMap.java'
[错误] [databasemanager] - 第29行:无法解析导入的javax.annotation
[错误] [databasemanager] - 行117:无法解析为类型
[错误] [databasemanager] - 行149:Nullable不能解析为类型
[错误] [数据库管理员] - 行198:Nullable无法解析为类型
[错误] [databasemanager] - 行222:无法解析Nullable到类型
[错误] [数据库管理员] - 行263:可空值不能解析为类型
[错误] [databasemanager] - 错误'jar:file:/ home / miso / Java%20libs / guava-r08 / guava-r08-gwt.jar!/com/google/common/collect/ForwardingMapEntry.java'
[错误] [databasemanager] - 第26行:导入javax.annotation无法解析
[错误] [databasemanager] - 第76行:Nullable无法解析为类型
[错误] [databasemanager] - 第92行:Nullable无法解析为类型
[ ERROR] [databasemanager] - 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingMultimap.java'中的错误
[错误] [databasemanager] - 第26行:导入javax.annotation无法解析
[错误] [databasemanager] - 第54行:Nullable无法解析为类型
[错误] [databasemanager] - 第54行:Nullable无法解析为类型
[错误] [databasemanager] - 第58行:Nullable无法解析为类型
[错误] [databasemanager] - 第62行:Nullable can not b e解析为类型
[错误] [databasemanager] - 第70行:Nullable无法解析为类型
[错误] [databasemanager] - 行98:Nullable无法解析为类型
[错误] [databasemanager] - 第98行:可空值不能解析为类型
[错误] [数据库管理员] - 第102行:可空值不能解析为类型
[错误] [databasemanager] - 第118行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / ForwardingMultiset.java'
[错误] [databasemanager] - 第27行:导入javax.annotation无法解析
[错误] [databasemanager] - 行80:Nullable can not解析为类型
[错误] [数据库管理员] - 行103:可空值不能解析为类型
[错误] [数据库管理员] - 行129:可空无法解析为类型
[错误] [数据库管理员] - 第271行:可空类型不能解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso / Java%20libs / guava-r08 / guava-r08-gwt.jar!/com/google/common/collect/ForwardingSet.java'
[错误] [databasemanager] - 第24行:导入javax.annotation不能解决
[错误] [数据库管理员] - 第56行:可空值不能解析为类型
[错误] [数据库管理员] - 第71行:可空值不能解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingSetMultimap.java'
[ ERROR] [databasemanager] - 第24行:无法解析导入javax.annotation
[错误] [databasemanager] - 第45行:Nullable无法解析为类型
[错误] [databasemanager] - 行49:可为空的ca没有被解析为类型
[错误] [databasemanager] - 错误在'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / ForwardingSortedMap.java'
[ERROR] [databasemanager] - 第27行:导入javax.annotation无法解析
[ERROR] [databasemanager] - 第107行:Nullable无法解析为键入
[错误] [数据库管理员] - 第131行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso / Java%20libs / guava -r08 / guava-r08-gwt.jar!/com/google/common/collect/ForwardingSortedSet.java'
[错误] [databasemanager] - 第27行:导入javax.annotation无法解析
[错误] [databasemanager] - 第104行:Nullable无法解析为类型
[错误] [databasemanager] - 行127:Nullable无法解析为类型
[错误] [databasemanager] - 错误in'jar:fil e:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingSortedSetMultimap.java'
[错误] [databasemanager] - 第24行:无法解析导入javax.annotation
[错误] [databasemanager] - 第44行:Nullable无法解析为类型
[错误] [databasemanager] - 第48行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / HashBasedTable。 java'
[错误] [databasemanager] - 第29行:导入javax.annotation无法解析
[错误] [databasemanager] - 第114行:Nullable无法解析为类型
[ ERROR] [databasemanager] - 行114:Nullable无法解析为类型
[ERROR] [databasemanager] - 行118:Nullable无法解析为类型
[错误] [databasemanager] - 行122 : Nullable不能解析为类型
[错误] [databasemanager] - 行126:Nullable无法解析为类型
[错误] [databasemanager] - 行130:Nullable无法解析为类型
[ERROR] [databasemanager] - 行130:Nullable无法解析为类型
[ERROR] [databasemanager] - 行134:Nullable无法解析为类型
[错误] [databasemanager ] - 第139行:Nullable无法解析为类型
[错误] [databasemanager] - 第139行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file :/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/HashBiMap.java'
[ ERROR] [databasemanager] - 第24行:导入javax.annotation无法解析
[错误] [databasemanager] - 第79行:Nullable无法解析为类型
[ER ROR] [databasemanager] - 第79行:Nullable无法解析为类型
[ERROR] [databasemanager] - 第83行:Nullable无法解析为类型
[ERROR] [databasemanager] - 第83行:Nullable不能解析为类型
[错误] [databasemanager] - 错误在'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/ com / google / common / collect / super / com / google / common / collect / ImmutableCollection.java'
[错误] [databasemanager] - 第25行:导入javax.annotation无法解析
[错误] [ databasemanager] - 第67行:Nullable无法解析为类型
[错误] [databasemanager] - jar中的错误:file:/ home / miso / Java%20libs / guava-r08 / guava-r08-gwt。 jar!/com/google/common/collect/ImmutableEntry.java'
[错误] [databasemanager] - 第23行:导入javax.annotation无法解析
[错误] [databasemanager] - 第34行:可空的不能解析为a type
[ERROR] [databasemanager] - Line 34: Nullable cannot be resolved to a type
[ERROR] [databasemanager] - Errors in ’jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/ImmutableList.java’
[ERROR] [databasemanager] - Line 32: The import javax.annotation cannot be resolved
[ERROR] [databasemanager] - Line 220: Nullable cannot be resolved to a type
[ERROR] [databasemanager] - Line 224: Nullable cannot be resolved to
’com.google.common.primitives.Booleans.BooleanArrayAsList’
[WARN] [databasemanager] - Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
[INFO] [databasemanager] - http://127.0.0.1:8888/databasemanager/
[INFO] [databasemanager] - Module databasemanager has been loaded


解决方案

There was a b ug in guava-r08, http://code.google.com/p/guava-libraries/issues/detail?id=586, which leads to the exception message \"The import javax.annotation cannot be resolved\".



There are two solutions:




  • Either use guava-r09, where this bug has been fixed,

  • or download jsr-305.jar and add it to your classpath.


There are 2 jars in GWT SDK: gwt-user.jar and gwt-dev.jar. Since they're in my classpath I can use them without problems.

However when I tried to use gwt bundled guava (com.google.gwt.thirdparty.guava.common) I get following error at clientside runtime:

No source code is available for type com.google.gwt.thirdparty.guava.common.collect.Lists; did you forget to inherit a required module?

Yes I probably did forget to inherit required module, but I don't have idea which one is that for guava :)

I inspected jars and found lot of .gwt.xml files, but in gwt-user.jar and no guava sign there :O

Update: It seems to be problem having both guava.jar and guava-gwt.jar @ classpath. So I use only guava-gwt.jar now, but this is logged when launching application. Compiler complains about javax.annotation and stuff like that ... I can't paste here full log due to character count limitation.

 [DEBUG] [databasemanager] - Validating newly compiled units
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Equivalence.java'
            [ERROR] [databasemanager] - Line 20: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 51: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 51: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 60: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Equivalences.java'
            [ERROR] [databasemanager] - Line 20: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 73: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 73: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 78: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 83: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 83: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 87: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Function.java'
            [ERROR] [databasemanager] - Line 19: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 43: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 55: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Functions.java'
            [ERROR] [databasemanager] - Line 25: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 108: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 137: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 145: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 155: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 200: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 241: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 266: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 273: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 277: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 281: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Joiner.java'
            [ERROR] [databasemanager] - Line 28: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 113: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 113: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 147: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 147: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 171: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 171: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Objects.java'
            [ERROR] [databasemanager] - Line 25: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 50: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 50: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 160: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 160: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 188: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 203: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Preconditions.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 86: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 112: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 113: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 143: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 169: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 170: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 202: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 227: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 228: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 298: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 348: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 413: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Predicate.java'
            [ERROR] [databasemanager] - Line 21: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 45: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 57: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/super/com/google/common/base/Predicates.java'
            [ERROR] [databasemanager] - Line 29: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 171: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 209: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 214: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 219: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 224: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 248: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 282: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 314: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 341: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 362: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 368: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 399: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 432: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Strings.java'
            [ERROR] [databasemanager] - Line 26: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 45: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 56: Nullable cannot be resolved to
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/base/Suppliers.java'
            [ERROR] [databasemanager] - Line 26: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 189: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 197: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/AbstractBiMap.java'
            [ERROR] [databasemanager] - Line 31: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 99: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 99: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/AbstractLinkedIterator.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 45: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/AbstractListMultimap.java'
            [ERROR] [databasemanager] - Line 25: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 60: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 71: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 83: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 94: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 94: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 115: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/AbstractMapBasedMultiset.java'
            [ERROR] [databasemanager] - Line 36: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 225: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 230: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 244: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 266: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 322: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/AbstractMapEntry.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 43: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/AbstractMultimap.java'
            [ERROR] [databasemanager] - Line 42: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 154: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 172: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 176: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 186: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 186: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 193: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 193: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 204: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 213: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 213: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 231: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 266: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 293: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 335: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 349: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 362: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 362: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 391: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 392: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 457: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 630: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 640: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 641: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 687: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 688: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 817: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 818: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 900: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 1284: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 1355: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 1464: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/AbstractMultiset.java'
            [ERROR] [databasemanager] - Line 29: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 61: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 80: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 152: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/AbstractSetMultimap.java'
            [ERROR] [databasemanager] - Line 25: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 58: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 80: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 94: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 127: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/AbstractSortedSetMultimap.java'
            [ERROR] [databasemanager] - Line 25: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 64: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 76: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/BiMap.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 46: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 46: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 65: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 65: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ByFunctionOrdering.java'
            [ERROR] [databasemanager] - Line 27: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 49: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ClassToInstanceMap.java'
            [ERROR] [databasemanager] - Line 23: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 58: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ComparatorOrdering.java'
            [ERROR] [databasemanager] - Line 28: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 55: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ComparisonChain.java'
            [ERROR] [databasemanager] - Line 26: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 71: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 71: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 109: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 109: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 112: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 113: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 113: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 149: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 149: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/EnumHashBiMap.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 75: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 79: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ExplicitOrdering.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 61: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingCollection.java'
            [ERROR] [databasemanager] - Line 26: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 117: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 156: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/ForwardingImmutableCollection.java'
            [ERROR] [databasemanager] - Line 21: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 42: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingList.java'
            [ERROR] [databasemanager] - Line 27: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 104: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 145: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 157: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 214: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingListMultimap.java'
            [ERROR] [databasemanager] - Line 23: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 43: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 47: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingMap.java'
            [ERROR] [databasemanager] - Line 29: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 117: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 149: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 198: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 222: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 263: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingMapEntry.java'
            [ERROR] [databasemanager] - Line 26: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 76: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 92: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingMultimap.java'
            [ERROR] [databasemanager] - Line 26: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 54: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 54: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 58: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 62: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 70: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 98: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 98: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 102: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 118: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingMultiset.java'
            [ERROR] [databasemanager] - Line 27: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 80: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 103: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 129: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 271: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingSet.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 56: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 71: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingSetMultimap.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 45: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 49: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingSortedMap.java'
            [ERROR] [databasemanager] - Line 27: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 107: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 131: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingSortedSet.java'
            [ERROR] [databasemanager] - Line 27: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 104: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 127: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ForwardingSortedSetMultimap.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 44: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 48: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/HashBasedTable.java'
            [ERROR] [databasemanager] - Line 29: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 114: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 114: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 118: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 122: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 126: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 130: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 130: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 134: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 139: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 139: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/HashBiMap.java'
            [ERROR] [databasemanager] - Line 24: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 79: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 79: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 83: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 83: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/ImmutableCollection.java'
            [ERROR] [databasemanager] - Line 25: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 67: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/ImmutableEntry.java'
            [ERROR] [databasemanager] - Line 23: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 34: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 34: Nullable cannot be resolved to a type
        [ERROR] [databasemanager] - Errors in 'jar:file:/home/miso/Java%20libs/guava-r08/guava-r08-gwt.jar!/com/google/common/collect/super/com/google/common/collect/ImmutableList.java'
            [ERROR] [databasemanager] - Line 32: The import javax.annotation cannot be resolved
            [ERROR] [databasemanager] - Line 220: Nullable cannot be resolved to a type
            [ERROR] [databasemanager] - Line 224: Nullable cannot be resolved to 
'com.google.common.primitives.Booleans.BooleanArrayAsList'
            [WARN] [databasemanager] - Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
    [INFO] [databasemanager] - http://127.0.0.1:8888/databasemanager/
    [INFO] [databasemanager] - Module databasemanager has been loaded

解决方案

There was a bug in guava-r08, http://code.google.com/p/guava-libraries/issues/detail?id=586, which leads to the exception message "The import javax.annotation cannot be resolved".

There are two solutions:

  • Either use guava-r09, where this bug has been fixed,
  • or download jsr-305.jar and add it to your classpath.

这篇关于GWT应用程序中Guava模块的正确名称是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆