Venkat Aditya
Venkat Aditya

Reputation: 21

SRVE0190E: File not found- IBM Liberty profile

I am having issues when i trying to deploy EAR into Liberty profile. After deployment, i am able to hit the index page(welcome page). When i am trying to hit one of the rest end point i am getting [WARNING ] SRVE0190E: File not found: rest/xx/xx. Here is how my server.xml looks like:

<webContainer deferServletLoad="false"/>

<!-- Enable features -->
<featureManager>
    <feature>jsp-2.2</feature>
    <feature>jpa-2.0</feature>
    <feature>servlet-3.0</feature>
    <feature>json-1.0</feature>
    <feature>jndi-1.0</feature>
    <feature>jdbc-4.0</feature>
    <feature>jaxrs-1.1</feature>
</featureManager>

<!-- To access this server from a remote client add a host attribute to the following element, e.g. host="*" -->
<httpEndpoint httpPort="9081" httpsPort="9444" id="defaultHttpEndpoint"/>

<library id="objectFactoryLib">
    <fileset dir="${server.config.dir}/lib/"/>
</library>

<jndiObjectFactory className="xxx" id="objectFactory" libraryRef="objectFactoryLib" objectClassName="java.util.Properties"/>


<library id="oracle-lib">
    <fileset dir="${server.config.dir}/oracle/" includes="ojdbc6-11.2.0.3.jar"/>
</library>

<applicationMonitor updateTrigger="mbean"/>

<enterpriseApplication id="xxx" location="xxx.ear" name="xxx">
                    <classloader commonLibraryRef="oracle-lib" delegation="parentLast"/>
</enterpriseApplication>

and the Web.xml looks like:

<context-param>
    <param-name>spring.profiles.default</param-name>
    <param-value>default</param-value>
</context-param>

<context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>classpath:META-INF/server/wink-core-context.xml
                 classpath:xxx.xml
    </param-value>
</context-param>
<servlet>
    <servlet-name>winkRestServlet</servlet-name>
    <servlet-class>org.apache.wink.server.internal.servlet.RestServlet</servlet-class>
</servlet>
<servlet-mapping>
    <servlet-name>winkRestServlet</servlet-name>
    <url-pattern>/rest/*</url-pattern>
</servlet-mapping>

<listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<welcome-file-list>
    <welcome-file>index.html</welcome-file>
</welcome-file-list>

Upvotes: 2

Views: 4662

Answers (1)

Michael Thompson
Michael Thompson

Reputation: 189

When you remove the included wink libraries, you will also need to update your web.xml servlet definition.

Here's an example of a JAX-RS 1.1 web.xml definition, from an application I have deployed on Liberty.

  <servlet>
    <servlet-name>javax.ws.rs.core.Application</servlet-name>
  </servlet>
  <servlet-mapping>
    <servlet-name>javax.ws.rs.core.Application</servlet-name>
    <url-pattern>/api/*</url-pattern>
  </servlet-mapping>

Upvotes: 2

Related Questions