Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/310.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/438.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 谷歌番石榴15.0错误与GWT2.5.1?_Java_Javascript_Gwt_Guava - Fatal编程技术网

Java 谷歌番石榴15.0错误与GWT2.5.1?

Java 谷歌番石榴15.0错误与GWT2.5.1?,java,javascript,gwt,guava,Java,Javascript,Gwt,Guava,我试图使用GWT2.5.1,但它无法编译。我使用编译器参数-strict。在我的模块gwt.xml中,我有: <inherits name="com.google.common.collect.Collect"/> 当我尝试编译时,出现以下错误: Compiling module test.Tttt Validating units: [ERROR] Errors in 'com/google/common/base/super/com/google/common

我试图使用GWT2.5.1,但它无法编译。我使用编译器参数-strict。在我的模块gwt.xml中,我有:

<inherits name="com.google.common.collect.Collect"/>
当我尝试编译时,出现以下错误:

Compiling module test.Tttt
   Validating units:
      [ERROR] Errors in 'com/google/common/base/super/com/google/common/base/CharMatcher.java'
         [ERROR] Line 760: SmallCharMatcher cannot be resolved
   [ERROR] Aborting compile due to errors in some input files
我使用了一个空白的gwt项目来演示这个错误

编辑:

当我仅包括以下内容时:

guava-gwt-15.0.jar
我得到以下错误:

   Validating units:
      [ERROR] Errors in 'jar:file:/Users/mg/Documents/Grails/GGTS3.4.0-KEPLER4.3.1/mytest/lib/guava-gwt-15.0.jar!/com/google/common/base/super/com/google/common/base/CharMatcher.java'
         [ERROR] Line 760: SmallCharMatcher cannot be resolved
编辑:使用日志级跟踪编译:

Public resources found in...
   Unexpected entry in classpath; /System/Library/Java/Extensions/libAppleScriptEngine.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libJ3D.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libJ3DAudio.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libJ3DUtils.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libmlib_jai.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libQTJNative.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /usr/lib/java/libjdns_sd.jnilib is neither a directory nor an archive (.jar or .zip)
Translatable source found in...
Persistent unit cache dir set to: /Users/mg/Documents/Grails/GGTS3.4.0-KEPLER4.3.1/tttt/war/../gwt-unitCache
Compiling module test.Tttt
Looking for previously cached Compilation Units in /Users/mg/Documents/Grails/GGTS3.4.0-KEPLER4.3.1/tttt/war/../gwt-unitCache
   Looking for precompiled archives.  To disable, use -Dgwt.usearchives=false
   Loading archived module: jar:file:/Applications/gwt/gwt-2.5.1/gwt-user.jar!/com/google/gwt/user/User.gwtar
   Loading archived module: jar:file:/Applications/gwt/gwt-2.5.1/gwt-user.jar!/com/google/gwt/core/Core.gwtar
   Loading archived module: jar:file:/Applications/gwt/gwt-2.5.1/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwtar
   Loading archived module: jar:file:/Applications/gwt/gwt-2.5.1/gwt-user.jar!/com/google/web/bindery/event/Event.gwtar
   Found 2719 cached/archived units.  Used 2719 / 3026 units from cache.
   Compiling...
      Compilation completed in 3,95 seconds
   Added 3026 units to cache since last cleanup.
   Validating units:
      [ERROR] Errors in 'jar:file:/Users/mg/Documents/Grails/GGTS3.4.0-KEPLER4.3.1/tttt/lib/guava-gwt-15.0.jar!/com/google/common/base/super/com/google/common/base/CharMatcher.java'
         [ERROR] Line 760: SmallCharMatcher cannot be resolved
   Removing invalidated units
Wrote 3026 units to persistent cache.
   Resolving com.google.common.annotations.Beta
      Found type 'com.google.common.annotations.Beta'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Resolving com.google.common.annotations.GwtCompatible
      Found type 'com.google.common.annotations.GwtCompatible'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Resolving com.google.common.annotations.GwtIncompatible
      Found type 'com.google.common.annotations.GwtIncompatible'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Resolving com.google.common.annotations.VisibleForTesting
      Found type 'com.google.common.annotations.VisibleForTesting'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Resolving com.google.common.base.Absent
      Found type 'com.google.common.base.Absent'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
         Found type 'com.google.common.base.Optional'
            [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
            [WARN] Ignoring unresolvable annotation type com.google.common.annotations.Beta
            Found type 'com.google.common.base.Supplier'
                         com.google.common.annotations.GwtCompatible
   Resolving com.google.common.primitives.UnsignedInteger
      Found type 'com.google.common.primitives.UnsignedInteger'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Finding entry point classes
   [ERROR] Aborting compile due to errors in some input files
Shutting down PersistentUnitCache thread

删除gwt单元文件夹。看起来您正在使用较旧版本的GWT生成项目。我可以确认,您的项目示例可以用GWT2.5.1编译。

CharMatcher是guava-15.0.jar的一部分。它不包含在guava-gwt-15.jar中。无论你做了什么,你都不能在客户端使用CharMatcher。@ElHoss我更新了我的帖子,但仍然只有guava gwt出错。有什么想法吗?把logLevel设为TRACE。这应该会告诉我们有关错误的更多信息。@ElHoss我用日志级别的跟踪更新了我的问题。删除gwt unit文件夹。看起来您正在使用较旧版本的GWT生成项目。我可以确认,您的项目示例可以使用GWT2.5.1进行编译。
Public resources found in...
   Unexpected entry in classpath; /System/Library/Java/Extensions/libAppleScriptEngine.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libJ3D.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libJ3DAudio.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libJ3DUtils.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libmlib_jai.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /System/Library/Java/Extensions/libQTJNative.jnilib is neither a directory nor an archive (.jar or .zip)
   Unexpected entry in classpath; /usr/lib/java/libjdns_sd.jnilib is neither a directory nor an archive (.jar or .zip)
Translatable source found in...
Persistent unit cache dir set to: /Users/mg/Documents/Grails/GGTS3.4.0-KEPLER4.3.1/tttt/war/../gwt-unitCache
Compiling module test.Tttt
Looking for previously cached Compilation Units in /Users/mg/Documents/Grails/GGTS3.4.0-KEPLER4.3.1/tttt/war/../gwt-unitCache
   Looking for precompiled archives.  To disable, use -Dgwt.usearchives=false
   Loading archived module: jar:file:/Applications/gwt/gwt-2.5.1/gwt-user.jar!/com/google/gwt/user/User.gwtar
   Loading archived module: jar:file:/Applications/gwt/gwt-2.5.1/gwt-user.jar!/com/google/gwt/core/Core.gwtar
   Loading archived module: jar:file:/Applications/gwt/gwt-2.5.1/gwt-user.jar!/com/google/gwt/regexp/RegExp.gwtar
   Loading archived module: jar:file:/Applications/gwt/gwt-2.5.1/gwt-user.jar!/com/google/web/bindery/event/Event.gwtar
   Found 2719 cached/archived units.  Used 2719 / 3026 units from cache.
   Compiling...
      Compilation completed in 3,95 seconds
   Added 3026 units to cache since last cleanup.
   Validating units:
      [ERROR] Errors in 'jar:file:/Users/mg/Documents/Grails/GGTS3.4.0-KEPLER4.3.1/tttt/lib/guava-gwt-15.0.jar!/com/google/common/base/super/com/google/common/base/CharMatcher.java'
         [ERROR] Line 760: SmallCharMatcher cannot be resolved
   Removing invalidated units
Wrote 3026 units to persistent cache.
   Resolving com.google.common.annotations.Beta
      Found type 'com.google.common.annotations.Beta'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Resolving com.google.common.annotations.GwtCompatible
      Found type 'com.google.common.annotations.GwtCompatible'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Resolving com.google.common.annotations.GwtIncompatible
      Found type 'com.google.common.annotations.GwtIncompatible'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Resolving com.google.common.annotations.VisibleForTesting
      Found type 'com.google.common.annotations.VisibleForTesting'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Resolving com.google.common.base.Absent
      Found type 'com.google.common.base.Absent'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
         Found type 'com.google.common.base.Optional'
            [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
            [WARN] Ignoring unresolvable annotation type com.google.common.annotations.Beta
            Found type 'com.google.common.base.Supplier'
                         com.google.common.annotations.GwtCompatible
   Resolving com.google.common.primitives.UnsignedInteger
      Found type 'com.google.common.primitives.UnsignedInteger'
         [WARN] Ignoring unresolvable annotation type com.google.common.annotations.GwtCompatible
   Finding entry point classes
   [ERROR] Aborting compile due to errors in some input files
Shutting down PersistentUnitCache thread