Question

Must be the way Eclipse is set up. Anyone have any ideas?

Exception in thread "main" java.lang.NoSuchMethodError: com.sun.jersey.client.apache.DefaultApacheHttpMethodExecutor.headerValueToString(Ljava/lang/Object;)Ljava/lang/String;
at com.sun.jersey.client.apache.DefaultApacheHttpMethodExecutor.writeOutBoundHeaders(DefaultApacheHttpMethodExecutor.java:271)
Was it helpful?

Solution

It looks like DefaultApacheHttpMethodExecutor.headerValueToString was removed from the Jersey library after its 1.7 release:

http://java.net/projects/jersey/lists/commits/archive/2011-06/message/12

Here are some options:

  1. Replace your current version of Jersey and with an older version of Jersey:
  2. Use a newer version of the JIRA REST client. I don't know if any newer versions support the change to the Jersey API.

OTHER TIPS

Actually, the "headerValueToString" method is supported in jersey-client-1.5.jar. Some later versions don't support the method yet, such as jersey-client-1.15.jar.

I use "jersey-apache-client-1.8.jar" downloaded from "http://download.java.net/maven/2/com/sun/jersey/contribs/jersey-apache-client/1.8/" and it works well

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top