Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-12729

JAX-RS validation doesn't work at all

XMLWordPrintable

    • Hide

      STEP: Create dynamic web project with JAX-RS support
      STEP: Create a REST web service:

      public class A {
      
          @GET
          @Path("/{id}")
          public void method(@PathParam("myid") int id) {
      		
          }
      	
      }
      

      ASSERT: there is validation error ("myid" should be "id" )
      FAIL: there is no validation error at all

      Error is thrown when saving the file:

      org.jboss.tools.common.validation.JBTValidationException: [Ljava.lang.Object; cannot be cast to [Lorg.eclipse.core.resources.IResource;
      	at org.jboss.tools.common.validation.ValidatorManager.validateInJob(ValidatorManager.java:101)
      	at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:78)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
      Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Lorg.eclipse.core.resources.IResource;
      	at org.jboss.tools.ws.jaxrs.core.internal.metamodel.validation.JaxrsMetamodelValidator.validate(JaxrsMetamodelValidator.java:106)
      	at org.jboss.tools.common.validation.ValidatorManager.validate(ValidatorManager.java:117)
      	at org.jboss.tools.common.validation.ValidatorManager.validateInJob(ValidatorManager.java:81)
      	... 2 more
      
      
      Show
      STEP: Create dynamic web project with JAX-RS support STEP: Create a REST web service: public class A { @GET @Path( "/{id}" ) public void method(@PathParam( "myid" ) int id) { } } ASSERT: there is validation error ("myid" should be "id" ) FAIL: there is no validation error at all Error is thrown when saving the file: org.jboss.tools.common.validation.JBTValidationException: [Ljava.lang. Object ; cannot be cast to [Lorg.eclipse.core.resources.IResource; at org.jboss.tools.common.validation.ValidatorManager.validateInJob(ValidatorManager.java:101) at org.eclipse.wst.validation.internal.operations.ValidatorJob.run(ValidatorJob.java:78) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Caused by: java.lang.ClassCastException: [Ljava.lang. Object ; cannot be cast to [Lorg.eclipse.core.resources.IResource; at org.jboss.tools.ws.jaxrs.core.internal.metamodel.validation.JaxrsMetamodelValidator.validate(JaxrsMetamodelValidator.java:106) at org.jboss.tools.common.validation.ValidatorManager.validate(ValidatorManager.java:117) at org.jboss.tools.common.validation.ValidatorManager.validateInJob(ValidatorManager.java:81) ... 2 more

            xcoulon@redhat.com Xavier Coulon
            jjankovi Jaroslav Jankovič (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: