Tag Archives: Caused by: java.lang.ClassNotFoundException: org.hibernate.impl.SessionImpl

How hibernate 3 used in jbpm4.4 is compatible with spring 5.X and the exception caused by: java.lang.classnotfoundexception: org.hibernate.impl.sessionimpl

Hibernate 3 core package for jBPM 4.4.

There is only hibernate 5 package in spring-orm-5.0.2.release.jar of spring.

Solution: therefore, in spring 5. X, you only need to replace the introduced spring-orm-5.0.2.release.jar with spring-orm-4.2.6.release.jar (i.e. 4. X).

Hibernate 3, 4, 5.0 in spring-orm-4.x.x.release.jar

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"><!-- hibernate3 -->
        <property name="dataSource" ref="dataSource"></property>
        <property name="configLocation">
            <value>classpath:hibernate.cfg.xml</value>
        </property>
    </bean>

In this way, the configuration will not report an error because of spring-orm-5.0.2.release.jar. You can find hibernate3.localsessionfactorybean.