This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.