aspose file tools*
The moose likes Spring and the fly likes class not found exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "class not found exception" Watch "class not found exception" New topic
Author

class not found exception

maganti surya
Greenhorn

Joined: Aug 04, 2012
Posts: 1
Hi i am getting the following error. I am not understanding how to resolve it.


ERROR IS



CODE IS

applicationContext.xml (its in WEBINF folder)



All other hbm files are loading. I have added new hbm file i.e., PtmFile.hbm.xml and its not working. I am not understanding why its not loading ?

jatan bhavsar
Ranch Hand

Joined: Jul 23, 2008
Posts: 296

Hi Maganti,

I found this in stack trace "Caused by: java.io.FileNotFoundException: class path resource [map/PtmFile.hbm.xml] cannot be opened because it does not exist"

Please put the hbm file in class path or particular location and redeploy the application.. As its says file not found...

Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1672
    
    7

in addition to what jatan said make sure the servlet-api depedency in your POM is scoped to provided. Your application should not include this jar when it is built as its Tomcat has its own.


[How To Ask Questions][Read before you PM me]
 
jQuery in Action, 2nd edition
 
subject: class not found exception