The annotation... error of using hibernate for SSH :"
Caused by: org. hibernate. mappingexception: An annotationconfiguration instance is required to use <mapping class = "com. feikecom. developer. Po. Module"/>
At org. hibernate. cfg. configuration. parsemappingelement (configuration. Java: 1648)
At org. hibernate. cfg. configuration. parsesessionfactory (configuration. Java: 1603)
At org. hibernate. cfg. configuration. doconfigure (configuration. Java: 1582)
At org. hibernate. cfg. configuration. doconfigure (configuration. Java: 1556)
At org. hibernate. cfg. configuration. Configure (configuration. Java: 1491)
At org. springframework. Orm. hibernate3.localsessionfactorybean. buildsessionfactory (localsessionfactorybean. Java: 601)
At org. springframework. Orm. hibernate3.abstractsessionfactorybean. afterpropertiesset (abstractsessionfactorybean. Java: 211)
At org. springframework. Beans. Factory. Support. abstractautowirecapablebeanfactory. invokeinitmethods (abstractautowirecapablebeanfactory. Java: 1369)
At org. springframework. Beans. Factory. Support. abstractautowirecapablebeanfactory. initializebean (abstractautowirecapablebeanfactory. Java: 1335)
... 39 more
Solution:
Assemble the spring configuration file into the class of sessionfactory.
Org. springframework. Orm. hibernate3.localsessionfactorybean
Change
Org. springframework. Orm. hibernate3.annotation. annotationsessionfactorybean