Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-382

mvn install fails when using HttpResponseStatus because class is missing

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: netflix_1.0.0.Beta2
    • Fix Version/s: netflix_1.0.0.Beta3
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide

      1. Go to Ribbon Example
      2. Go to EventResource in Eventservice
      3. Add the following lines at line 63 (it doesn't matter):

         
              HttpResourceGroup httpResourceGroup = Ribbon.createHttpResourceGroup("time",
                      ClientOptions.create().withMaxAutoRetriesNextServer(3));
              Observable<ByteBuf> obs = httpResourceGroup.newTemplateBuilder("currentTime", ByteBuf.class)
                              .withMethod("GET")
                              .withUriTemplate("/")
                              .withResponseValidator(new HttpResponseValidator() {
               
                                  @Override
                                  public void validate(HttpClientResponse<ByteBuf> response)
                                          throws UnsuccessfulResponseException, ServerError {
                                      response.getStatus().equals(HttpResponseStatus.ACCEPTED); 
                                  }
                              })
                              .build()
                              .requestBuilder()
                              .build()
                              .observe();
      

      4. Run mvn clean install

      Show
      1. Go to Ribbon Example 2. Go to EventResource in Eventservice 3. Add the following lines at line 63 (it doesn't matter): HttpResourceGroup httpResourceGroup = Ribbon.createHttpResourceGroup( "time" , ClientOptions.create().withMaxAutoRetriesNextServer(3)); Observable<ByteBuf> obs = httpResourceGroup.newTemplateBuilder( "currentTime" , ByteBuf.class) .withMethod( "GET" ) .withUriTemplate( "/" ) .withResponseValidator( new HttpResponseValidator() { @Override public void validate(HttpClientResponse<ByteBuf> response) throws UnsuccessfulResponseException, ServerError { response.getStatus().equals(HttpResponseStatus.ACCEPTED); } }) .build() .requestBuilder() .build() .observe(); 4. Run mvn clean install

      Description

      I use the Ribbon Template API where I can use HttpResponseValidators to check the response status. If I check the status of a response, the maven build breaks because of missing class files. The IDE doesn't show compile errors, so I think it is a bom problem.

      [INFO] -------------------------------------------------------------
      [ERROR] COMPILATION ERROR : 
      [INFO] -------------------------------------------------------------
      [ERROR] /Users/sialcasa/Documents/Development/Java/workspace/swarm-examples/ribbon/events/src/main/java/org/wildfly/swarm/examples/netflix/ribbon/events/EventsResource.java:[29,35] package io.netty.handler.codec.http does not exist
      [ERROR] /Users/sialcasa/Documents/Development/Java/workspace/swarm-examples/ribbon/events/src/main/java/org/wildfly/swarm/examples/netflix/ribbon/events/EventsResource.java:[73,61] cannot find symbol
        symbol: variable HttpResponseStatus
      [ERROR] /Users/sialcasa/Documents/Development/Java/workspace/swarm-examples/ribbon/events/src/main/java/org/wildfly/swarm/examples/netflix/ribbon/events/EventsResource.java:[73,51] cannot access io.netty.handler.codec.http.HttpResponseStatus
        class file for io.netty.handler.codec.http.HttpResponseStatus not found
      [INFO] 3 errors 
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                kenfinni Ken Finnigan
                Reporter:
                sialcasa Alexander Casall
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: