• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2879
  • Last Modified:

Class bytes found but defineClass()failed for: 'org.springframework.web.servlet.view.json.JsonView'

Error registering bean with name 'jsonView' defined in ServletContext resource [/WEB-INF/views.xml]: Bean class [org.springframework.web.servlet.view.json.JsonView] not found; nested exception is java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'org.springframework.web.servlet.view.json.JsonView'
0
Amar-ms
Asked:
Amar-ms
  • 2
1 Solution
 
Sathish David Kumar NCommented:
ur class file is not in the path u have mentioned!
0
 
objectsCommented:
Its failing to read JsonView.class, check that it was compiled with a compiler that is compatible with the vm you are running it on
0
 
Sathish David Kumar NCommented:
Hi Amar,

Can u show me the definetion in ur xml and class
0
 
pallab_lahiriCommented:
It is a Java version compatibility issue.
Check that your java version used to compile the classes ( Most probably you are using an IDE, so check the supported JDK version there)

Then check the Java version used in the container (run time environment, your app server).  There is some difference there.  

if you think why it is NOT creating problem for rest: you might have used some feature in this particular Class which is not either backward or forward compatible.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now