The class I have written works fine as a normal Java application, but when I try to use the code in a dynamic web project I get the following authentication failure:
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: com/google/gdata/util/AuthenticationException
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:823)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
Where is the difference?
Answer
You should take a look at your jars and your classpath and make sure the required jars are in the project lib.
Edit
Also make sure those libraries are in the WEB-INF/lib folder. That's where they will be searched for by default when you are working on a dynamic web project and when you eventually deploy your project.
Link & instructions for working with gdata
No comments:
Post a Comment