I am enable to insert the this data to the data base
i am able to to it with other table .
Code between sessionFactory.openSession() and session.close():
Session hsession =null;
try{
log.debug("hibernate test one called");
EmsPoll emsPoll = new EmsPoll();
Date startdate = new Date(System.currentTimeMillis());
Date enddate = new Date(System.currentTimeMillis());
byte s = 1;
emsPoll.setEmsUuid("1000017");
emsPoll.setSuccess(s);
emsPoll.setLastState("Testing");
emsPoll.setStartTime(startdate);
emsPoll.setEndTime(enddate);
hsession = sessionFactory.getCurrentSession();
log.debug("log for testign the insert in to Atp Table:");
hsession.save(emsPoll);
Full stack trace of any exception that occurs:
[org.jboss.resource.connectionmanager.TxConnectionManager] Connection error occured: org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener@447828[state=NORMAL mc=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@15d9ee6 handles=1 lastUse=1219959577812 permit=true trackByTx=true mcp=org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool@1923700 context=org.jboss.resource.connectionmanager.InternalManagedConnectionPool@590ff7 xaResource=org.jboss.resource.adapter.jdbc.xa.XAManagedConnection@15d9ee6 txSync=null]
java.lang.NullPointerException
and info statment from hibernate code
[org.hibernate.type.StringType] could not bind value '1000017' to parameter: 1; Error; - nested throwable: (java.lang.NullPointerException)
Name and version of the database you are using:
mysql 5.4
The generated SQL (show_sql=true):
insert into bms.ems_poll (ems_uuid, success, last_state, start_time, end_time) values (?, ?, ?, ?, ?)
Debug level Hibernate log excerpt:
Problems with Session and transaction handling?
Read this:
http://hibernate.org/42.html