This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "class not found exception" Watch "class not found exception" New topic

class not found exception

maganti surya

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



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: 297

Hi Maganti,

I found this in stack trace "Caused by: 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

Joined: Mar 07, 2010
Posts: 1682

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]
I agree. Here's the link:
subject: class not found exception
It's not a secret anymore!