Error using Restful with JBOSS runtime
<p>I have created a maven webapp and i'm trying to use the restful services and a JBoss 7.0 runtime. <br/>
I've changed the <code>web.xml</code> to call the restful services using <code>javax.ws.rs</code> from which i have also added the jar to the buildpath. The server starts perfectly, so there is no errors or failures in related to the <code>web.xml</code> file and i can successfully call the first page. <br/>
I've wrote a class called <code>RestService</code> wich is supposed to do something when i call another url (to be precise <code>localhost:8080/myPrj/rest/hello/first</code>), but when i call the url it shows an error on my eclipse console and on the webbrowser.<br/>
What am i doing wrong ?<br/>
Please help a newbie</p>

<p>this is my web.xml</p>

<pre><code>&lt;!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" &gt;

&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
    version="3.0"&gt;
  &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;javax.ws.rs.core.Application&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/rest/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
&lt;/web-app&gt;
</code></pre>

<p>This is the class Restsservice</p>

<pre><code>import javax.ws.rs.*;
import javax.ws.rs.core.*;
import url_checker.*;


@Path("/hello")
public class RestService {


        @GET
        @Path("first")
        @Produces(MediaType.TEXT_PLAIN)
        public String hello(){
            System.out.println("here");
            return "Hi everyone";
        }
        @GET
        @Path("go")
        public String go(){
            runProgramMethod();
            return "&lt;p1&gt;Programm running&lt;/p1&gt;";
        }
        private void runProgramMethod() {
            MainPauserMethod runner = new MainPauserMethod();


    }
}
</code></pre>

<p>This is the errormessage on the browser:</p>

<blockquote>
  <p>type Status report</p>
  
  <p>message Bad arguments passed to public
  RestService$ServerService(RestService) (
  org.jboss.resteasy.spi.BadRequestException: Could not find message
  body reader for type: class RestService of content type: <em>/</em></p>
  
  <p>description The server encountered an internal error (Bad arguments
  passed to public RestService$ServerService(RestService) (
  org.jboss.resteasy.spi.BadRequestException: Could not find message
  body reader for type: class RestService of content type: <em>/</em>) that
  prevented it from fulfilling this request.</p>
</blockquote>

<p>And this one on the console on eclipse:</p>

<pre><code>16:09:37,134 SCHWERWIEGEND [org.jboss.resteasy.core.SynchronousDispatcher] (http-localhost-127.0.0.1-8080-1) Failed executing GET hello/first: org.jboss.resteasy.spi.InternalServerErrorException: Bad arguments passed to public RestService$ServerService(RestService)  ( org.jboss.resteasy.spi.BadRequestException: Could not find message body reader for type: class RestService of content type: */*
    at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:122) [resteasy-jaxrs-2.2.1.GA.jar:]
    at org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory.createResource(POJOResourceFactory.java:43) [resteasy-jaxrs-2.2.1.GA.jar:]
    at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:208) [resteasy-jaxrs-2.2.1.GA.jar:]
    at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:519) [resteasy-jaxrs-2.2.1.GA.jar:]
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:496) [resteasy-jaxrs-2.2.1.GA.jar:]
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119) [resteasy-jaxrs-2.2.1.GA.jar:]
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208) [resteasy-jaxrs-2.2.1.GA.jar:]
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55) [resteasy-jaxrs-2.2.1.GA.jar:]
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50) [resteasy-jaxrs-2.2.1.GA.jar:]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
    at java.lang.Thread.run(Unknown Source) [:1.8.0_65]
Caused by: java.lang.IllegalArgumentException: argument type mismatch
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [:1.8.0_65]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) [:1.8.0_65]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [:1.8.0_65]
    at java.lang.reflect.Constructor.newInstance(Unknown Source) [:1.8.0_65]
    at org.jboss.resteasy.core.ConstructorInjectorImpl.construct(ConstructorInjectorImpl.java:82) [resteasy-jaxrs-2.2.1.GA.jar:]
    ... 23 more
</code></pre>