错误500:javax.servlet.ServletException:Filter [SBTFilter]

时间:2014-12-09 10:26:33

标签: ibm-connections ibm-sbt

我正在关注实验手册:IBM Connections Cloud入门。最后更新于2014年11月19日由Jan Smolenski。

在我设置项目并运行服务器(步骤109)并打开mysocial.webapp网址后,我收到消息:

错误500:javax.servlet.ServletException:Filter [SBTFilter]:找不到必需的过滤器类 - com.ibm.sbt.util.SBTFilter.class

在控制台中,我读到: [ERROR] SRVE0321E:启动期间未加载[SBTFilter]过滤器。

如何在启动时包含sbtfilter?我应该从SDK导入其他库还是更改我的配置?

我完全按照实验手册中的说明运行样品......

1 个答案:

答案 0 :(得分:0)

有一个名为social.helloworld.webapp的示例项目。您可以查看以下web.xml https://github.com/OpenNTF/SocialSDK/blob/master/samples/j2ee/templates/social.helloworld.webapp/src/main/webapp/WEB-INF/web.xml

复制以下行

<servlet>
<description>The service servlet handles requests from the toolkit to access external resources.</description>
<display-name>Social Business Toolkit Service Servlet</display-name>
<servlet-name>ServiceServlet</servlet-name>
<servlet-class>com.ibm.sbt.service.core.servlet.ServiceServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ServiceServlet</servlet-name>
<url-pattern>/service/*</url-pattern>
</servlet-mapping>
<servlet>
<description>This servlet initializes the specified JavaScript library for use by the Social Business Toolkit.</description>
<display-name>Social Business Toolkit Library Servlet</display-name>
<servlet-name>LibraryServlet</servlet-name>
<servlet-class>com.ibm.sbt.jslibrary.servlet.LibraryServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>LibraryServlet</servlet-name>
<url-pattern>/library/*</url-pattern>
</servlet-mapping>
<filter>
<description>This filter is responsible for creating the toolkit application and context objects for every servlet within this web application.</description>
<display-name>Social Business Toolkit Filter</display-name>
<filter-name>SBTFilter</filter-name>
<filter-class>com.ibm.sbt.util.SBTFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>SBTFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<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>
<resource-ref>
<description>Reference to a URL resource which points to the configuration properties for the Social Business Toolkit.</description>
<res-ref-name>url/ibmsbt-sbtproperties</res-ref-name>
<res-type>java.net.URL</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref> 

然后重新启动您的webapp 您还可以确保存在jar文件。

另一个好的参考是...... https://github.com/OpenNTF/SocialSDK/wiki/Building-your-first-social-enabled-jsp