I am trying to build a SpringMVCProject on Eclipse, but I failed.
When I run the project on the server, there is something wrong.
the last sentence in the console is that:
Error creating bean with name ‘sessionFactory’ defined in ServletContext resource [/WEB-INF/springcfg.xml]: Invocation of init method failed; nested exception is
org.hibernate.MappingException: Could not get constructor for org.hibernate.persister.entity.SingleTableEntityPersister
Those are my codes that mentioned in the console:
part of the springcfg.xml
<bean id="sessionFactory"
class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"></property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
</props>
</property>
<property name="packagesToScan" value="com.code.mvc.entity"></property>
</bean>
I searched for the internet and tried some method, but no of them worked.
At first I think that is because there is some class with spell mistaks, but after checking ,I didn’t find them,so maybe it is some other problems
ガンダムエクシア is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.