Tomcat7 の非常に奇妙な問題。
いくつかのデータ オブジェクトを Web アプリから jar ファイルに移行しました。ローカル開発マシンで tomcat7 にデプロイすると、すべて正常に動作します。しかし、テストのために同じコードをデプロイしようとすると、Tomcat は jar ファイルに移行されたデータ オブジェクト クラスを見つけることができません。なぜこれが起こっているのかわかりません。あたかも tomcat がまだ Web アプリケーションでデータ オブジェクトを見つけることを期待しているかのようであり、したがって jar ファイルを調べることさえ気にしません。
Tomcat がWEB-INF/lib/lookHere.jar
見つからないクラス ファイルを強制的に検索する方法を知っている人はいますか?
私はすでに作業ディレクトリを無駄にクリアしようとしました。
これらのデータ オブジェクトの 1 つを利用するサーブレットを呼び出そうとしたときに発生するエラーの例を次に示します。
例 1:
root cause
java.lang.Error: Unresolved compilation problems:
The import com.alpine.data.http.image cannot be resolved
PostImageResponse cannot be resolved to a type
PostImageResponse cannot be resolved to a type</pre>
しかし、クラスはjarファイルに存在します...
com/alpine/data/http/image/postImage/response/PostImageResponse.class
例 2:
java.lang.Error: Unresolved compilation problems:
The import com.alpine.data.http.gas.getStation cannot be resolved
The import com.alpine.data.http.message cannot be resolved
The import com.alpine.data.http.postDevicelogentries2 cannot be resolved
GetMessagesResponseRecord cannot be resolved to a type
The method getMessages(String, String, String, String) from the type MessageManager refers to the missing type GetMessagesResponseRecord
しかし、パッケージとクラスはjarファイルにあります!!!
com/alpine/data/http/gas/getStations/
com/alpine/data/http/message/
com/alpine/data/http/postDevicelogentries2/
com/alpine/data/http/postDevicelogentries2/request/DeviceLogEntry2.class
com/alpine/data/http/message/getMessage/response/GetMessagesResponseRecord.class