This week's book giveaway is in the NodeJS forum.
We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line!
See this thread for details.
Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

Noclassdeffound error when calling rest services - bean creation error  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Have a java spring app running on tomcat container. It has all the components to launch itself as a rest service, META-INF/context.xml, web.xml which has the ContextLoaderListener and the contextConfigLocation is defined as well with test-servlet.xml.  The test-servlet.xml has the controller bean definitions in it. I also have the applicationContext.xml defined with all the delegate and service beans. I  have a BeanFactory class which implements ApplicationContextAware interface and has the class path defined there for the applicationContext. It is not even hitting the BeanFactory class though, it fails even before that. When I call the restservices from a rest client, it is unable to recognise the controller bean. I used a debugger to see where exactly it fails and seems like the controller is not fully qualified and hence it fails to pick it up.

Any suggestions of how to go about fixing it.

Thanks!

 
Marshal
Posts: 63853
209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

What does it mean about fully qualified? The only thing “fully qualified” I can think of just at the moment is the name of a class. Please provide the fully qualified name of the class you appear to be missing, where you think it is or where its containing .jar file is, show us how you are referring to the class in your code, and also show us the CLASSPATH you are using.
 
Nancy Joe
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank for your quick response. It seems to be working now. I did not make any c hanges to the code, I probably was not testing it correctly.
 
Campbell Ritchie
Marshal
Posts: 63853
209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you got it working: well done.
 
Switching from electric heat to a rocket mass heater reduces your carbon footprint as much as parking 7 cars. Tiny ad:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!