Please Help: Below error when I tried to add details to tables using hibernate:

java.lang.NullPointerException
org.hibernate.cache.impl.bridge.RegionFactoryCache ProviderBridge.nextTimestamp(RegionFactoryCachePro viderBridge.java:93)
org.hibernate.impl.SessionFactoryImpl.openSession( SessionFactoryImpl.java:639)
org.hibernate.impl.SessionFactoryImpl.openSession( SessionFactoryImpl.java:648)
com.package1.service.AuthenticateUser.addUser(Auth enticateUser.java:32)
com.package1.controllers.LoginServlet.doPost(Login Servlet.java:68)
AuthenticateUser
Java Code:
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;

import com.package1.model.User;
import com.package1.utilities.HibernateSessionManager;

public class AuthenticateUser {

	public String authenticateUser(String username, String password) {
		Session session = factory.openSession();
		Transaction txn = session.getTransaction();
		String usernamefromdb = user.getName();
		String passwordfromdb = user.getPassword();

		try {
			if (username.equals(usernamefromdb)
					&& password.equals(passwordfromdb)) {
				return "SUCCESS";
			} else {
				return "FAILURE";
			}
		} finally {
			factory.close();
		}
	}

	public void addUser(String uname, String uemail, String usrnme,
			String upass) {
		Session session = factory.openSession();                     //Line:32
		Transaction txn = session.beginTransaction();
		user.setName(uname);
		user.setEmail(uemail);
		user.setUsrname(usrnme);
		user.setPassword(upass);
		txn.commit();
		session.save(user);
		session.close();
		factory.close();
	}

	private static SessionFactory factory = HibernateSessionManager
			.getSessionFactory();
	private User user = new User();
}
LoginServlet:
Java Code:
import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.package1.service.AuthenticateUser;
import com.package1.utilities.CookieUtilities;

/**
 * Servlet implementation class LoginServlet
 */
@WebServlet(name="Login" ,description = "A Simple Login Servlet for Online Library", urlPatterns = { "/LoginServlet" })
public class LoginServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
	protected void doPost(HttpServletRequest request,
			HttpServletResponse response) throws ServletException, IOException {
		PrintWriter out = response.getWriter();
		String username = request.getParameter("user");
		String password = request.getParameter("pass");

		response.setContentType("text/html");
		String result = authenticateUser.authenticateUser(username, password);

		if (result == "SUCCESS") {
			RequestDispatcher rqdpr = request.getRequestDispatcher("Success.jsp");
			rqdpr.forward(request, response);
		}else {
			//response.sendRedirect("Register.jsp");
			authenticateUser.addUser("abcdef", "abcdef","abcdef", "abcdef");   //Line: 68
		}
		
		
	}
	
	private AuthenticateUser authenticateUser = new AuthenticateUser();
}
hibernate.cfg.xml
Java Code:
<hibernate-configuration>

     <session-factory>

        <!-- Database connection settings -->
        <property name="connection.driver_class">org.postgresql.Driver</property>
        <property name="connection.url">jdbc:postgresql://localhost:5432/hibernatedb</property>
        <property name="connection.username">web</property>
        <property name="connection.password">admin</property>

        <!-- JDBC connection pool (use the built-in) -->
        <property name="connection.pool_size">1</property>

        <!-- SQL dialect -->
        <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>

        <!-- Disable the second-level cache  -->
        <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>

        <!-- Echo all executed SQL to stdout -->
        <property name="show_sql">true</property>

        <!-- Drop and re-create the database schema on startup -->
        <property name="hbm2ddl.auto">Update</property>

        <!-- Names the annotated entity class -->
        <mapping class="com.package1.model.User"/>

    </session-factory>
</hibernate-configuration>