Search code examples
jsfjakarta-eeibm-sbtfaces-config

How does the Social Business Toolkit Samples application uses managed-beans.xml?


So far I have:

  • installed and started sbt.sample-1.0.0.20140125-1133.ear on my WebSphere Application Server,
  • added an URL resource for the SBT Properties file.

The Social Business Toolkit Samples app runs fine and I'm able to connect to my IBM Connections and retrieve some ActivityStream entries.

When I first loaded the application, I noticed this error:

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. 

In the Samples application's ibm-web-bnd.xml file I found this line:

<resource-ref name="url/ibmsbt-managedbeansxml" binding-name="url/ibmsbt-managedbeansxml" />

And in the 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> 



I'm wondering, why should there be an URL resource to the JSF Application Configuration Resource File (managed-beans.xml) in the first place? According to the Java EE documentation the JavaServer Faces implementation will look for it in the /WEB-INF/ folder.

Does the SBT uses JavaServer Faces technology somewhere? Or can I choose not to use the managed-beans.xml file in my own applications that use the SBT?


Solution

  • I wouldn't recommend you consider them related. managed-beans.xml had a prior name, and it's just a set of configuration objects. The project itself does not use Java Server Faces.