日々精進

新しく学んだことを書き留めていきます

Servletを実行すると「servlet class was found, but a resource injection failure has occurred」エラー

Servletクラスのフィールドで@Injectアノテーションを使ってオブジェクトを詰めているところで エラーが発生した。 原因はCDIのバージョンがビルド時と実行環境で異なることが原因(たぶん) JavaEE7環境では動かなかったけど、JavaEE6環境で動かすと動いた。

参考:

WebSphere:IBM WebSphere Application Server V8.0 Beta:CDI problem - IBM WebSphere Application Server V8.0 Beta Forum