6

eclipse 3.4.2をダウンロードし、sysdeo(http://www.eclipsetotale.com/tomcatPlugin.html)からeclipse用のtomcatプラグイン(バージョン3.2.1)をインストールしてみました。

インストール手順に従いましたが、EclipseツールバーからTomcatを起動すると、次のエラーが発生します

java.lang.NoClassDefFoundError:org / apache / tomcat / util / log / SystemLogHandler at java.lang.Class.getDeclaredConstructors0(Native Method)at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)at java.lang.Class .getConstructor0(Class.java:2671)at java.lang.Class.newInstance0(Class.java:321)at java.lang.Class.newInstance(Class.java:303)atorg.apache.catalina.startup.Bootstrap。 org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:390)のinit(Bootstrap.java:205)

トラブルシューティングの手順に従いましたが、成功しませんでした。

プラグインもdropinディレクトリに配置しようとしましたが、それでも同じエラーが発生しました。

これはEclipse3.2および3.3で正常に機能していました

次に、標準の組み込みWTPを使用してTomcatサーバーをセットアップしてみました。tomcatのconfディレクトリにあるserver.xmlをどのように選択するかわかりませんが、現時点では選択されていないようです。Eclipseプロジェクトをこの設定に関連付けるにはどうすればよいですか。サーバーを起動できますが、Tomcatのスタートページを参照しても何も表示されません。

誰かがこれを修正するいくつかの方法を提供できれば幸いです。

前もって感謝します。

-Dipesh

4

4 に答える 4

4

私はTomcatとEclipseJavaEEバージョンとWTPを使用していますが、完全に機能します。WebアプリをTomcatWebappフォルダーにデプロイするAntスクリプトがあります。デバッグするには、Eclipseでサーバービューを開き、新しいサーバーを追加して、正しいTomcatバージョンを選択する必要があります。それが完了したら、作成したEclipseサーバービューのサーバーエントリをダブルクリックして、Eclipse内でTomcatの構成を開きます。構成ページの左中央に、「EclipseにネイティブのTomcatインストールを制御させる」のようなものが表示されるはずですが、正確なテキストは今は覚えていません。あなたはそれを選ばなければなりません。次に、ソースコードにブレークポイントを設定し、Eclipseのサーバービュー内からデバッグモードでTomcatを起動できます。お役に立てば幸いです。

于 2009-03-19T21:16:20.543 に答える
2

If you are using the Sysdeo plugin, then you don't want to also be using the standard Eclipse WTP servers. To use the Sysdeo plugin, you need to have already downloaded and extracted a standard zipped tomcat directory. Make sure to define CATALINA_HOME in your path. Then, assuming you've correctly installed the sysdeo plugin, go into Eclipse->Windows->Prefs->Tomcat (this is Sysdeo's Tomcat settings, and not the WTP settings). You need to tell the plugin where you've extracted your Tomcat directory, and set it to use Context files.

Now create a new Dynamic web project. Right click it, and go into its properties->Tomcat. Check it as a 'Tomcat Project'. Give it a context name, and also tell it the directory which would be the base of your war (by default, Eclipse has named this WebContent, I believe). Apply it and close the Window. Right click again your project, and go to the Tomcat section. Add the 'Tomcat Libraries to Build Path' so you can use the Servlet/JSP classes. Finally, click on 'Update Context'. If you go into your Tomcat directory under Conf, you'll see that the plugin has created a context for you that points to your Eclipse workspace. No need for deploying the app to the Tomcat directory. Now, you should be able to click on the Sysdeo Tomcat 'start' button, and your app should be able to connect to your app at localhost:8080/context_name.

HTH, Bill

于 2009-05-29T01:16:17.870 に答える
1

優れたFindjar Web ページを使用して、次のことを行います。

組織/Apache/Tomcat/util/log/SystemLogHandler

以下を与える:

クラス org.apache.tomcat.util.log.SystemLogHandler に関する情報:

含まれる JAR ファイル:
jbossweb.jar gwt
-dev-windows.jar
tomcat-util-3.3.2.jar
tomcat-util-4.0.6.jar
tomcat-util-4.1.31.jar
tomcat-util-4.1.34.jar
tomcat-util-4.1.36.jar
tomcat-util-5.0.16.jar
tomcat-util-5.0.18.jar
tomcat-util-5.0.28.jar
tomcat-util-5.5.12.jar
tomcat-util-5.5 .15.jar
tomcat-util-5.5.23.jar
tomcat-util-5.5.4.jar
tomcat-util-5.5.7.jar
tomcat-util-5.5.9.jar
tomcat-util-5.5.7-alpha. jar
tomcat-util-5.5.8-alpha.jar
tomcat-util-5.5.9-alpha.jar

適切な jar ファイルが CLASSPATH にあることを確認してください。

于 2009-03-19T20:26:53.267 に答える