resteasy - Rest Easy ClientResponse cannot find symbol releaseConnection() -


i trying release resources after using response , using org.jboss.resteasy.client.clientresponse same. code follows.

    clientresponse<string> response = null;     final clientrequest request = new clientrequest(urlstring);\\thiscontains username , password     request.accept(accepttype);     if (body != null) {     request.body(consumestype, body); } request.header("content-type", consumestype);         try {              restclientservice.addauthenticationheaders(request,                     username, password);             response = restclientservice.get(request);             if (response.getstatus() == httpurlconnection.http_ok) {                 return true;             }             return false;         } catch (final exception e) {             logger.error("error occured");             return false;         } {             if (response != null) {                 response.releaseconnection();             }         } 

i facing below error message when building above code using ant

  [javac] c:\workspace\com\session\impl\datasyncjobhelperbean.java:101:    cannot find symbol   [javac] symbol  : method releaseconnection()   [javac] location: class org.jboss.resteasy.client.clientresponse<java.lang.string>   [javac]                             response.releaseconnection();   [javac]                                     ^ 

please provide inputs if missing anything

i found solution this.

actually in resteasy lib folder have 2 different versions of jars i.e “resteasy-jaxrs” , “resteasy-jaxrs-2.0.1.ga” , method “response.releaseconnection()” introduced @ rest easy 1.1.1.ga, while doing build loading resteasy-jaxrs.jar. build failing.

i deleted “resteasy-jaxrs.jar” file locations in work space , able run build successfully.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -