This is my servlet class
here set my hibernate session and sending the objects to the client class where are the get and set class and call CustomerDAO

```
// star hibernate session 4.x
    Configuration configuration = new Configuration().configure();
    ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(configuration.getProperties())
    .buildServiceRegistry();
    SessionFactory sessionFactory = configuration.buildSessionFactory(serviceRegistry);
    Session session = sessionFactory.openSession();

    // call the class
    Clientes clientes = new Clientes();
    ClienteDAO clientedao = new ClienteDAO();

 //send parameter to class

    clientes.setNombre("nombre");
    clientes.setApellido("apellido");
    clientes.setTelefono("telefono");
    clientes.setEmail("correo");
    clientes.setPass("clave1");

      //send the parameter to dao
    clientedao.createCliente(clientes);  // error here  at com.utp.soft6.RegistroSv.processRequest(RegistroSv.java:80)

```

this is the code of clientesdao when recive the parameter of Clientes.java

```
public class ClienteDAO {

private Session session;

public ClienteDAO() {
     this.session = session;
}

public long createCliente(Clientes cliente) {
    long clienteId = -1;
    Transaction tx = null;
    try {
    tx = session.beginTransaction();  //error here  at com.utp.soft6.model.ClienteDAO.createCliente(ClienteDAO.java:30)

    clienteId = (Long)session.save(cliente);
    tx.commit();
    } catch (Exception e) {

    e.printStackTrace();
    }
    return clienteId;
    }

```

}

When run the aplication show this error

```
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
Hibernate: drop table if exists clientes
Hibernate: create table clientes (id bigint not null auto_increment, apellido varchar(255), email varchar(255), nombre varchar(255), pass varchar(255), telefono varchar(255), primary key (id)) ENGINE=InnoDB
java.lang.NullPointerException
    at com.utp.soft6.model.ClienteDAO.createCliente(ClienteDAO.java:30)
    at com.utp.soft6.RegistroSv.processRequest(RegistroSv.java:80)
    at com.utp.soft6.RegistroSv.doGet(RegistroSv.java:124)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)

```

the class create table but have error when into values to table