damu11782 / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

NosuchmethodError in unix environment #370

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.write a testng test case to post a request on linux environment
2.Everything is working fine on windows
3.on linux throwing NoSuchMethodError

What is the expected output? What do you see instead?
It should post the request and get the response

What version of the product are you using? On what operating system?
2.3.4 on Unix

Please provide any additional information below.
Below is my method ,I am getting this exception
java.lang.NoSuchMethodError: 
com.jayway.restassured.specification.RequestSpecification.post(Ljava/lang/String
;[Ljava/lang/Object;)Lcom/jayway/restassured/response/Response;

    public Response restPostOperation(String resource,String PayLoad) throws IOException{

        String  methodName="restPostOperation";
        log.info("Executing the method {} in class {} begins",methodName,className);
        try{
            RequestSpecBuilder builder = new RequestSpecBuilder();
            //Setting content type as application/json or application/xml
            builder.setContentType("application/xml; charset=UTF-8");
            //Setting Request body  
            builder.setBody(PayLoad);
            RequestSpecification requestSpec = builder.build();
            configurePreResourcePath();
            response=given().spec(requestSpec).when().post(resource);
            log.info("Executing the method {} in class {} ends",methodName,className);
            return  response;
        }catch(Exception ex){
            System.out.println("Request can not be processed.An Exception has been Occured "+ex);
            throw ex;
        }
    }

Original issue reported on code.google.com by praveen5...@gmail.com on 5 Nov 2014 at 5:08

GoogleCodeExporter commented 9 years ago
What is the "resource" you're passing to post?

Original comment by johan.ha...@gmail.com on 13 Nov 2014 at 6:33

GoogleCodeExporter commented 9 years ago
No input from user so marking as invalid

Original comment by johan.ha...@gmail.com on 28 Nov 2014 at 7:11