V
V
volodymyr2011-05-16 07:12:22
JavaScript
volodymyr, 2011-05-16 07:12:22

Using JSON in Spring MVC?

Need advice on using org.springframework.web.servlet.view.json.MappingJacksonJsonView to render model to JSON format. I re-read a bunch of articles and forum posts, but I still couldn’t attach this mapping to Spring - after deployment, the application crashes with an exception:

Сould not instantiate bean class [org.springframework.web.servlet.view.json.MappingJacksonJsonView]: Constructor threw exception; nested exception is java.lang.VerifyError: Cannot inherit from final class<br/>


appServlet.xml
web.xml

Can anyone come across a similar error?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
FanKiLL, 2013-12-12
@FanKiLL

Add to pom.xml

<dependency>
    <groupId>org.codehaus.jackson</groupId>
    <artifactId>jackson-mapper-asl</artifactId>
    <version>1.7.1</version>
</dependency>

V
volodymyr, 2013-12-12
@volodymyr

Thank you! I wrote this post two years ago, in fact, the problem was solved more simply: forum.spring.io/forum/spring-projects/web/101845-u... .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question