1

gwt-maven-pluginでMavenを使用してレガシープロジェクトを実行しようとしています。次のエラーがあります

インターフェイスcom.google.gwt.core.ext.typeinfo.JClassTypeが見つかりましたが、クラスが必要でした

GWT2.4.0に接続されています。GWTのダウングレードやgwtpの再コンパイルについていくつかの回答がありましたが、私にはわかりません。

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>gwt-maven-plugin</artifactId>
    <version>2.4.0</version>
    <executions>
        <execution>
            <goals>
                <goal>compile</goal>
                <goal>i18n</goal>
            </goals>
        </execution>
    </executions>

    <configuration>
        <runTarget>someTarget.html</runTarget>
        <hostedWebapp>${webappDir}</hostedWebapp>
        <i18nMessagesBundle>org.I18nMsg</i18nMessagesBundle>
    </configuration>
</plugin>

<pluginManagement>
    <plugins>
        <pluginExecution>
            <pluginExecutionFilter>
                <groupId>
                    org.codehaus.mojo
                </groupId>
                <artifactId>
                gwt-maven-plugin
                </artifactId>
                <versionRange>
                [2.4.0,)
                </versionRange>
                <goals>
                    <goal>i18n</goal>
                </goals>
            </pluginExecutionFilter>
            <action>
                <execute></execute>
            </action>
            </pluginExecution>
        </pluginExecutions>
....

エラー:

[INFO]    Scanning for additional dependencies: jar:file:/C:/Users/xxx/.m2/repository/com/extjs/gxt/2.2.0/gxt-2.2.0.jar!/com/extjs/gxt/ui/client/core/El.java
[INFO]       Computing all possible rebind results for 'com.extjs.gxt.ui.client.core.impl.ComputedStyleImpl'
[INFO]          Rebinding com.extjs.gxt.ui.client.core.impl.ComputedStyleImpl
[INFO]             Could not find an exact match rule. Using 'closest' rule <replace-with class='com.extjs.gxt.ui.client.core.impl.ComputedStyleImplIE'/> based on fall back values. You may need to implement a specific binding in case the fall back behavior does not replace the missing binding
[INFO]          Rebinding com.extjs.gxt.ui.client.core.impl.ComputedStyleImpl
[INFO]             Could not find an exact match rule. Using 'closest' rule <replace-with class='com.extjs.gxt.ui.client.core.impl.ComputedStyleImplIE'/> based on fall back values. You may need to implement a specific binding in case the fall back behavior does not replace the missing binding
[INFO]    [ERROR] Errors in 'jar:file:/C:/Users/xxx/.m2/repository/com/extjs/gxt/2.2.0/gxt-2.2.0.jar!/com/extjs/gxt/ui/client/data/BeanModelLookup.java'
[INFO]       [ERROR]  Internal compiler error
[INFO] java.lang.IncompatibleClassChangeError: Found interface com.google.gwt.core.ext.typeinfo.JClassType, but class was expected
4

1 に答える 1

5

GWTは、過去1〜2年にAPIにいくつかの重大な変更を加えましたが、GWT2.2を中心に行われた変更に遭遇しています。使用しているGXTバージョンは、GWT 2.2がリリースされる前のものであるため、将来のすべてのバージョンと自動的に互換性があるわけではありません...

いくつかの選択肢があります-最もクリーンなのはGXTの新しいバージョンに移行することです-最近の2.2.xバージョンには3つの異なるjarがあり、GWT2.2.0と互換性があるため-22バージョンが必要です以降(執筆時点では2.5.0-rc1)。

新しいGXTバージョンに更新できない場合は、使用しているバージョンのGWTに対してGXTを再コンパイルすることを検討してください。再コンパイルする必要があるクラスはごくわずかで、ほとんどはのクラスですcom.extjs.gxt.ui.rebind

また、これがまったく新しいプロジェクトである場合は、GXT 3を検討してください。GWTのベストプラクティスをより有効に活用し、パフォーマンスを向上させ、2.xシリーズよりも定期的に更新します。

于 2012-09-27T23:42:03.507 に答える