• Post Reply Bookmark Topic Watch Topic
  • New Topic

Rest web-service in IBM websphere 8.5 issue  RSS feed

 
Shiju J John
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Getting the below issue , When deploying the rest web-service web-sphere 8.5.5.

RequestProces I org.apache.wink.server.internal.RequestProcessor logException The following error occurred during the invocation of the handlers chain: WebApplicationException (404 - Not Found) with message 'null' while processing GET request sent to http://sbstpvmlx1216:9081/shiju/rest/sayHello

web.xml

<servlet>
        <servlet-name>resteasy-servlet</servlet-name>
        <servlet-class>com.ibm.websphere.jaxrs.server.IBMRestServlet</servlet-class>
        <init-param>
            <param-name>javax.ws.rs.Application</param-name>
            <param-value>com.webservices.sample.api.RestImpl</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>resteasy-servlet</servlet-name>
        <url-pattern>/rest/*</url-pattern>
    </servlet-mapping>


Application Implementation class


public class RestImpl extends Application{

public Set<Class<?>> getClasses() {
        Set<Class<?>> classes = new HashSet<Class<?>>();
        classes.add(com.webservices.sample.api.RestSampleImpl.class);
        return classes;
}
}


service implementation class


@javax.ws.rs.Path("/rest")
@Consumes(MediaType.TEXT_PLAIN)
@Produces(MediaType.TEXT_PLAIN)
public class RestSampleImpl implements RestSampleInterface {

@Override
@GET
@Path("/sayHello")
public Response sayHello() {
System.out.println("Hellow");
return Response.ok("Hellow").build();
}
}


Please help to resolve the same
 
Vijitha Kumara
Bartender
Posts: 3992
27
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to CodeRanch!

Do you have a context called "shiju" somewhere? Or you may need to check for URL mappings with the app server.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!