Hi my service implementation class is marked as @Service and my controller class as @Controller, and i have @Autowired private FruitService fruitService; in my controller class. and getters and setters of the same. but when i try to acesss fruitService through getter methos i am getting classnotfound exception. can any body tell me what might have went wrong.
If autowiring doesn't work, I'd expect a NullPointerException, as it means a property you were expecting to be set wasn't.
ClassNotFoundException is different than NullPointerException - it means there's a class referenced in your code that your web application can't find. This could be due to multiple things - a mis-spelling of a class name in a deployment descriptor or spring xml file, a packaging issue where the class doesn't get included in the deployment, or a classpath issue.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Jun 19, 2007
yes that was nullpointer exception. but still i could not corre t that.