Error 500: javax.servlet.ServletException: Filter [SBTFilter]

8.9k views Asked by At

I am following the lab manual: Getting started with IBM Connections Cloud. Last updated November 19 2014 by Jan Smolenski.

After I have setup the project and run the server (step 109) and open the mysocial.webapp url I get the message:

Error 500: javax.servlet.ServletException: Filter [SBTFilter]: Could not find required filter class - com.ibm.sbt.util.SBTFilter.class

In the console I read: [ERROR ] SRVE0321E: The [SBTFilter] filter did not load during start up.

How can I include the sbtfilter during startup? Should I import additional libraries from the SDK or alter my configuration?

I run the samples exactly as declared in the lab manual...

1

There are 1 answers

0
Paul Bastide On

There is a sample project called social.helloworld.webapp. You can look at the following web.xml https://github.com/OpenNTF/SocialSDK/blob/master/samples/j2ee/templates/social.helloworld.webapp/src/main/webapp/WEB-INF/web.xml

Copy the Following Lines

<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> 

and then restart your webapp you can also make sure that the jar files exist.

Another good reference is... https://github.com/OpenNTF/SocialSDK/wiki/Building-your-first-social-enabled-jsp