これまでのところ、私は持っています:
sbt.sample-1.0.0.20140125-1133.ear
WebSphere Application Server にインストールして起動し、- SBT プロパティ ファイルの URL リソースを追加しました。
Social Business Toolkit Samples アプリは正常に動作し、IBM Connections に接続して、いくつかの ActivityStream エントリーを取得できます。
アプリケーションを最初にロードしたとき、次のエラーに気付きました。
Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: A NameNotFoundException occurred on an indirect lookup on the name java:comp/env/url/ibmsbt-managedbeansxml. The name java:comp/env/url/ibmsbt-managedbeansxml maps to a JNDI name in deployment descriptor bindings for the application performing the JNDI lookup. Make sure that the JNDI name mapping in the deployment descriptor binding is correct. If the JNDI name mapping is correct, make sure the target resource can be resolved with the specified name relative to the default initial context.
Samples アプリケーションのibm-web-bnd.xml
ファイルで、次の行を見つけました。
<resource-ref name="url/ibmsbt-managedbeansxml" binding-name="url/ibmsbt-managedbeansxml" />
そしてでweb.xml
:
<resource-ref>
<description>Reference to a URL resource which points to the managed bean configuration for the Social Business Toolkit.</description>
<res-ref-name>url/ibmsbt-managedbeansxml</res-ref-name>
<res-type>java.net.URL</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
そもそもなぜ JSF アプリケーション構成リソース ファイル ( managed-beans.xml
) への URL リソースが必要なのでしょうか? Java EE ドキュメントによると、JavaServer Faces 実装はフォルダー内でそれを探し/WEB-INF/
ます。
SBT はどこかで JavaServer Faces テクノロジを使用していますか? またはmanaged-beans.xml
、SBT を使用する自分のアプリケーションでファイルを使用しないことを選択できますか?