This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I have this FileUploadController which I am trying to run but am getting BeanCreationException and NoClassDefFoundError for FileUploadController.class. I have this class in classpath but still am getting this error, any suggestions, I have web.xml file, servlet-config.xml, exception and classpath information for this question here.
With the init-param commented out, then the DispatcherServlet is going to look for a file called spring-servlet.xml as its configuration file, in the WEB-INF directory. But your config file name is spring-context.xml, so your config file isn't loading.
The "tell" on this is where it say "NoClassDefFoundError: Could not initialize class". This doesn't mean that the class doesn't exist...it means that when the classloader is loading the class it runs into trouble.
I can't tell for sure here...not enough info (despite the fact you posted plenty of code, I don't believe the real problem is in any of the stuff you posted). But I'd start looking at your controller and follow all of the types it depends on looking for static types or blocks. Something is going awry *when the class is loading*, which hints to me that it very well could be a problem in some static initializer. Just a guess though...