title: WebSphere Liberty Profile: Context Root Not Found
body: <p>I can't seem to get this working locally, even though the same WAR works on a remote server. When I go to visit my application locally, I get the "Context Root Not Found" error. The Liberty profile version is 8.5.5.5.</p>
  
  <p>Here are the relevant files:</p>
  
  <p>server.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;server description="tlc server"&gt;
    &lt;!-- Enable features --&gt;
    &lt;featureManager&gt;
      &lt;feature&gt;jsp-2.2&lt;/feature&gt;
      &lt;feature&gt;ssl-1.0&lt;/feature&gt;
      &lt;feature&gt;localConnector-1.0&lt;/feature&gt;
      &lt;feature&gt;restConnector-1.0&lt;/feature&gt;
      &lt;feature&gt;json-1.0&lt;/feature&gt;
      &lt;feature&gt;jaxrs-1.1&lt;/feature&gt;
      &lt;feature&gt;servlet-3.0&lt;/feature&gt;
      &lt;feature&gt;jpa-2.0&lt;/feature&gt;
      &lt;feature&gt;beanValidation-1.0&lt;/feature&gt;
      &lt;feature&gt;jndi-1.0&lt;/feature&gt;
      &lt;feature&gt;jdbc-4.0&lt;/feature&gt;
      &lt;feature&gt;monitor-1.0&lt;/feature&gt;
    &lt;/featureManager&gt;
    &lt;httpEndpoint id="defaultHttpEndpoint" host="*" httpPort="9080" httpsPort="9443" virtualHost="default_host" /&gt;
    &lt;jdbcDriver id="DerbyJDBCDriver"&gt;
      &lt;library name="DerbyLib"&gt;
        &lt;fileset dir="C:\tools\servers\wlp\lib" includes="derbyclient-10.6.1.0.jar" /&gt;
      &lt;/library&gt;
    &lt;/jdbcDriver&gt;
    &lt;dataSource jndiName="jdbc/TLCDataSource" id="derbyDataSource" jdbcDriverRef="DerbyJDBCDriver"&gt;
      &lt;properties.derby.client databaseName="TLC" password="APP" user="APP" /&gt;
    &lt;/dataSource&gt;
    &lt;applicationMonitor updateTrigger="mbean" /&gt;
    &lt;application id="TLC_war" context-root="/TLC" location="C:\Users\nd26434\gitrepos\tlc\target\TLC-1.0.0-SNAPSHOT.war" name="TLC_war" type="war"&gt;
      &lt;classloader delegation="parentLast"&gt;
        &lt;privateLibrary&gt;
          &lt;fileset dir="C:\tools\servers\wlp\lib" includes="aspectjweaver-1.8.0.jar" /&gt;
        &lt;/privateLibrary&gt;
      &lt;/classloader&gt;
    &lt;/application&gt;
  &lt;/server&gt;
  </code></pre>
  
  <p>message.log</p>
  
  <pre><code>[3/18/15 20:19:54:789 EDT] 0000001b com.ibm.ws.app.manager.AppMessageHelper                      A CWWKZ0022W: Application TLC_war has not started in 30.018 seconds.
  [3/18/15 20:20:03:174 EDT] 0000001f com.ibm.ws.webcontainer.osgi.webapp.WebGroup                 I SRVE0169I: Loading Web Module: TLC-1.0.0-SNAPSHOT.
  [3/18/15 20:20:03:175 EDT] 0000001f com.ibm.ws.webcontainer                                      I SRVE0250I: Web Module TLC-1.0.0-SNAPSHOT has been bound to tlc_host.
  </code></pre>
  
  <p>ibm-web-bnd.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-bnd xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns="http://websphere.ibm.com/xml/ns/javaee"
      xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_0.xsd"
      version="1.0"&gt;
      &lt;virtual-host name="tlc_host"/&gt;
      &lt;resource-ref name="jdbc/TLCDataSource"
          binding-name="jdbc/TLCDataSource" /&gt;
  &lt;/web-bnd&gt;
  </code></pre>
  
  <p>ibm-web-ext.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-ext
      xmlns="http://websphere.ibm.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-ext_1_0.xsd"
      version="1.0"&gt;
      &lt;reload-interval value="3"/&gt;
      &lt;context-root uri="TLC" /&gt;
      &lt;enable-directory-browsing value="false"/&gt;
      &lt;enable-file-serving value="true"/&gt;
      &lt;enable-reloading value="true"/&gt;
      &lt;enable-serving-servlets-by-class-name value="false" /&gt;
  &lt;/web-ext&gt;
  </code></pre>