1

プロジェクトを grails 2.0.1 にアップグレードしましたが、問題が発生しました:

問題:

Command terminated with an error code (see details for output)
------System.out:-----------
| Loading Grails 2.0.1
| Configuring classpath.
| Environment set to development.....
| Compiling 61 source files.
| Error Compilation error: startup failed:
/home/user/workspace/myProject/grails-app/controllers/myproject/WelcomeController.groovy:
-1: The return type of java.lang.Object wait() in myproject.WelcomeController 
is incompatible with void wait() in java.lang.Object
. At [-1:-1]  @ line -1, column -1.
1 error
------System.err:-----------

ノート:

   i try right click --> Grails Tools -- >
   (Download source jars / & / refresh dependencies / & / grails plugin manager) 
   on my project but problem didn't solve.

助けはありますか?

4

1 に答える 1

0

java.lang.object の下のメソッドに組み込まれている、wait() という名前のアクションがあるようです。

このメソッドの名前を変更する必要があります (gsp ページの名前を変更することを忘れないでください)。

これで問題が解決しない場合は、プロジェクト ディレクトリに移動し、(オペレーティング システムに応じて) 隠しファイルを表示し、.project ファイルを開きます。

ファイルの最後にある

次のようにする必要があります。

<linkedResources>
   <link>
      <name>.link_to_grails_plugins</name>
      <type>2</type>
      <locationURI>GRAILS_ROOT/2.0.1/projects/myproject/plugins</locationURI>
   </link>
</linkedResources>

GRAILS_ROOT/1.3.7/projects/... の場合

GRAILS_ROOT/2.0.1/projects/... に変更します。

これがあなたを助けることを願っています

于 2012-04-17T12:38:02.190 に答える