spark85 / json-path

Automatically exported from code.google.com/p/json-path
0 stars 0 forks source link

Versions 1.0.0 and 1.1.0 cause NoSuchMethodError; 0.9.1 does not #57

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

Include version 1.0.0 or 1.1.0 (likely with some other dependency, see included 
pom.xml)

What is the expected output? What do you see instead?
I expect that I can use something like this without getting an exception:
  this.mockMvc
    .perform(get("/rest/service/10"))
    .andExpect(status().isOk())
    .andExpect(jsonPath("$.averageAmountPerMinute",
  is(BigDecimal.valueOf(876.34))));

What I get instead is:
java.lang.NoSuchMethodError: 
com.jayway.jsonpath.JsonPath.compile(Ljava/lang/String;[Lcom/jayway/jsonpath/Fil
ter;)Lcom/jayway/jsonpath/JsonPath;
    at org.springframework.test.util.JsonPathExpectationsHelper.<init>(JsonPathExpectationsHelper.java:54)
    at org.springframework.test.web.servlet.result.JsonPathResultMatchers.<init>(JsonPathResultMatchers.java:43)
    at org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath(MockMvcResultMatchers.java:196)
    at com.outfastsource.controller.TestServiceController.testLoadSingleOccurrence(TestServiceController.java:49) <-- This is the line above

What version of the product are you using? On what operating system?
versions 1.0.0 and 1.1.0 both exhibit this behavior. 0.9.1 seems to work fine.
I'm on Ubuntu 14.04 LTS and using Java 1.8.0_20

Please provide any additional information below.

I have attached a pom.xml that creates the problem.

Original issue reported on code.google.com by ericle...@outfastsource.com on 4 Oct 2014 at 2:06

Attachments:

GoogleCodeExporter commented 9 years ago
Looks like spring-test is depending on version 0.9.0. Spring needs to update to 
version 1.0.1.

Original comment by kalle.st...@gmail.com on 5 Oct 2014 at 12:53

GoogleCodeExporter commented 9 years ago

Original comment by kalle.st...@gmail.com on 5 Oct 2014 at 2:36

GoogleCodeExporter commented 9 years ago
I have filed an issue with Spring asking them to upgrade.

Original comment by kalle.st...@gmail.com on 6 Oct 2014 at 6:36

GoogleCodeExporter commented 9 years ago
Issu fixed by Spring https://jira.spring.io/browse/SPR-12299 available in 
Spring 4.1.2

Original comment by kalle.st...@gmail.com on 6 Oct 2014 at 3:09

GoogleCodeExporter commented 9 years ago
Thanks! I appreciate what you're doing.

Original comment by iamericl...@gmail.com on 6 Oct 2014 at 3:16