0

これまでのところ、私は持っています:

  • sbt.sample-1.0.0.20140125-1133.earWebSphere 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 を使用する自分のアプリケーションでファイルを使用しないことを選択できますか?

4

2 に答える 2

1

それらを関連していると見なすことはお勧めしません。managed-beans.xml には以前の名前があり、構成オブジェクトのセットにすぎません。プロジェクト自体は Java Server Faces を使用しません。

于 2014-03-12T15:26:47.817 に答える