15:47:28, 328 error [org. springframework. Web. Context. contextloader]-context initialization failed
Org. springframework. Beans. Factory. beancreationexception:
Error creating bean with name 'yonghushuxingaction' defined in servletcontext Resource
[/WEB-INF/Context/applicationContext-action.xml]: cannot resolve reference to bean 'yonghushuxingservice'
While setting bean property 'yonghushuxingservice ';
Nested exception is org. springframework. Beans. Factory. beancreationexception:
Error creating bean with name 'yonghushuxingservice' defined in servletcontext Resource
[/WEB-INF/Context/applicationContext-service.xml]:
Cannot resolve reference to bean 'yonghushuxingdao'
While setting bean property 'yonghushuxingdao ';
Nested exception is org. springframework. Beans. Factory. beancreationexception:
Error creating bean with name 'yonghushuxingdao 'defined in servletcontext Resource
[/WEB-INF/Context/applicationContext-dao.xml]:
Cannot resolve reference to bean 'sessionfactory 'while setting bean property 'sessionfactory ';
Nested exception is org. springframework. Beans. Factory. beancreationexception:
Error creating bean with name 'sessionfactory 'defined in servletcontext Resource
[/WEB-INF/Context/applicationContext-hibernate.xml]:
Invocation of init method failed; Nested exception is org. hibernate. hibernateexception:
Unable to instantiate default tuplizer [org. hibernate. tuple. entity. pojoentitytuplizer]
After I deployed the project, there were so many errors that Baidu and Google did not find a specific solution, so they had to solve it by themselves.
In the console, there are many errors behind the above errors. I found the last one.
Caused by: org. hibernate. propertynotfoundexception: cocould not find a getter for flag in class cn.com. hanker. fengdian. model. yonghushuxing
At org. hibernate. Property. basicpropertyaccessor. creategetter (basicpropertyaccessor. Java: 306)
At org. hibernate. Property. basicpropertyaccessor. getgetter (basicpropertyaccessor. Java: 299)
At org. hibernate. Mapping. Property. getgetter (property. Java: 294)
At org. hibernate. tuple. entity. pojoentitytuplizer. buildpropertygetter (pojoentitytuplizer. Java: 300)
At org. hibernate. tuple. entity. abstractentitytuplizer. <init> (abstractentitytuplizer. Java: 141)
At org. hibernate. tuple. entity. pojoentitytuplizer. <init> (pojoentitytuplizer. Java: 78)
... 87 more
Let's take a look at the font amplification section. I found the flag attribute in the configuration file,
Originally, In the hibernate ing configuration file, there was a space behind my flag. This property configuration does not match the attributes in the database, so I changed it.
Run again and finally succeeded.
Through the above errors, I think we should be more serious. The attribute name and the field name in the database should be pasted and copied to avoid errors.