Buggy code:
public class WicketFilter implements Filter { public static final String APP_FACT_PARAM = "applicationFactoryClassName" ; public static final String FILTER_MAPPING_PARAM = "filterMappingUrlPattern" ; private static final Logger log = LoggerFactory . getLogger ( WicketFilter . class ) ; public static final String IGNORE_PATHS_PARAM = "ignorePaths" ; static final String SERVLET_PATH_HOLDER = "<servlet>" ; private FilterConfig filterConfig ; private String filterPath ; private WebApplication webApplication ; private boolean servletMode = false ; private static final String PORTLET_ONLY_FILTER = "portletOnlyFilter" ; private static final String DETECT_PORTLET_CONTEXT = "detectPortletContext" ; private static final String DETECT_PORTLET_CONTEXT_FULL_NAME = "org.apache.wicket.detectPortletContext" ; private static final String WICKET_PORTLET_PROPERTIES = "org//apache//wicket//protocol//http//portlet//WicketPortlet.properties" ; private WicketFilterPortletContext filterPortletContext ; private boolean portletOnlyFilter ; private final Set < String > ignorePaths = new HashSet < String > ( ) ; public void destroy ( ) { } public void doFilter ( ServletRequest request , ServletResponse response , FilterChain chain ) throws IOException , ServletException { } public boolean doGet ( final HttpServletRequest servletRequest , final HttpServletResponse servletResponse ) throws IOException , ServletException { } private void checkCharacterEncoding ( final HttpServletRequest servletRequest ) { } public FilterConfig getFilterConfig ( ) { } public String getRelativePath ( HttpServletRequest request ) { } public void init ( FilterConfig filterConfig ) throws ServletException { } private void initIgnorePaths ( FilterConfig filterConfig ) { } protected boolean isPortletContextAvailable ( FilterConfig config ) throws ServletException { boolean detectPortletContext = false ; String parameter = config . getInitParameter ( WicketFilter . DETECT_PORTLET_CONTEXT ) ; if ( parameter != null ) { detectPortletContext = Boolean . valueOf ( parameter ) . booleanValue ( ) ; } else { parameter = config . getServletContext ( ) . getInitParameter ( WicketFilter . DETECT_PORTLET_CONTEXT_FULL_NAME ) ; if ( parameter != null ) { detectPortletContext = Boolean . valueOf ( parameter ) . booleanValue ( ) ; } else { InputStream is = Thread . currentThread ( ) . getContextClassLoader ( ) . getResourceAsStream ( WicketFilter . WICKET_PORTLET_PROPERTIES ) ; if ( is != null ) { try { Properties properties = new Properties ( ) ; properties . load ( is ) ; detectPortletContext = Boolean . valueOf ( properties . getProperty ( WicketFilter . DETECT_PORTLET_CONTEXT_FULL_NAME , "false" ) ) . booleanValue ( ) ; } catch ( IOException e ) { throw new ServletException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>WicketPortlet.properties<seq2seq4repair_space>from<seq2seq4repair_space>classpath" , e ) ; } } } } if ( detectPortletContext ) { try { <START_BUG> Class < ? > portletClass = Class . forName ( "javax.portlet.PortletContext" ) ; <END_BUG> return true ; } catch ( ClassNotFoundException e ) { } } return false ; } protected WicketFilterPortletContext newWicketFilterPortletContext ( ) { } protected void createRequestContext ( WebRequest request , WebResponse response ) { } private String getFilterPath ( String filterName , InputStream is ) throws ServletException { } private boolean isWicketRequest ( String relativePath ) { } private void maybeSetLastModified ( final HttpServletResponse resp , final long lastModified ) { } protected IWebApplicationFactory getApplicationFactory ( ) { } protected ClassLoader getClassLoader ( ) { } protected String getFilterPath ( HttpServletRequest request ) { } private String stripWildcard ( String result ) { } long getLastModified ( final HttpServletRequest servletRequest ) { } }

Fix:
Class . forName ( "javax.portlet.PortletContext" ) ;