SSH-404 servlet action is not available 求高手!

来源:百度知道 编辑:UC知道 时间:2024/06/17 11:28:49
照着李兴华老师的智囊团项目写的,可是不知道是什么原因出现这个问题 已吐血2日,望拯救。。
经过几个修改日志文件错误大体如下:
ERROR [org.springframework.web.context.ContextLoader] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.PropertyNotFoundException: Could not find a getter for userId in class com.lyp.known.vo.User
我的userID有GET方法啊,而且也没出现大写的冲突

谢谢。。。

如果是这样的话,我说可能是版本的问题,你在lib目录下看下有没有个asm-2.2.3.jar的包 ,把它给删除掉!必须删除掉!
sissionFactory创建错误大概就是这包给引起的
你如果还出现什么问题的话,那你在看下你目录下是否有commons-dbcp.jar和commons-pool.jar 这俩个包也给加上!那样你的问题应该也差不多了。

就是配置文件的问题,你细心的检查一下applicationContext.xml中的bean属性是不是和后面引用时候的是不是相符。现在是无法创建sessionFactory这个bean。

另外就是看看hibernate.cfg.xml中是不是已经都加载了所有的hbm.xml配置文件哟。有的getter方法,你不加载到配置文件里面,也是有问题的!

把set方法加进去.

applicationContext.xml 应该配置不对,再看看哈~