0 Replies Latest reply on Aug 31, 2008 3:48 PM by mimu yoda

    Seam 2.1BETA RESTfull ,Could not instantiate Seam component: org.jboss.seam.resteasy.dispatcher

    mimu yoda Newbie

      I'm testing 2.1BETA RESTful , create project by seam-gen , then add Action class ,code like below


      package com.demo.rest ;
      import javax.ws.rs.GET;
      import javax.ws.rs.Path;
      import javax.ws.rs.PathParam;
      import javax.ws.rs.ProduceMime;
      import org.jboss.seam.annotations.Name;
      
      
      @Path("/project")
      @Name("projectResource")
      public class ProjectResource {
      
              @GET
              @Path("/{projectId}")
              @ProduceMime("text/plain")
              public String getProjects(@PathParam("projectId") Long id){
                      return "Hello World";
              }
      }
      



      When deploy war ,report Could not instantiate Seam component: org.jboss.seam.resteasy.dispatcher error, Caused by: java.lang.RuntimeException: Class is not a root resource.  It, or one of its interfaces must be annotated with @Path: com.demo.rest.ProjectResource implements:


      What's wrong with me ?