diff --git a/portal-impl/src/com/liferay/portal/dao/orm/hibernate/PortletSessionFactoryImpl.java b/portal-impl/src/com/liferay/portal/dao/orm/hibernate/PortletSessionFactoryImpl.java
index b19d9679cc460a3c8babed2de4f76b98fd454e16..c2919b77b822d10ef46cd6c687f1d23334c1f399 100644
--- a/portal-impl/src/com/liferay/portal/dao/orm/hibernate/PortletSessionFactoryImpl.java
+++ b/portal-impl/src/com/liferay/portal/dao/orm/hibernate/PortletSessionFactoryImpl.java
@@ -17,6 +17,7 @@ package com.liferay.portal.dao.orm.hibernate;
 import com.liferay.portal.kernel.dao.orm.Session;
 import com.liferay.portal.kernel.log.Log;
 import com.liferay.portal.kernel.log.LogFactoryUtil;
+import com.liferay.portal.kernel.portlet.PortletClassLoaderUtil;
 import com.liferay.portal.spring.hibernate.PortletHibernateConfiguration;
 
 import javax.sql.DataSource;
@@ -71,6 +72,10 @@ public class PortletSessionFactoryImpl extends SessionFactoryImpl {
 		return _dataSource;
 	}
 
+	protected ClassLoader getDefaultSessionFactoryClassLoader() {
+		return PortletClassLoaderUtil.getClassLoader();
+	}
+
 	/**
 	 * @deprecated As of Judson (7.1.x), with no direct replacement
 	 */