java.lang.NullPointerException

Hibernate JIRA | Leonardo Quijano | 1 decade ago
  1. 0

    I got the following NPE while doing a session.flush() in Oracle: [02/05/03 12:51:55:266 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - saving [com.grupoice.general.model.Evento#13130] [02/05/03 12:51:55:266 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - saving [com.grupoice.general.model.DetalleEvento#com.grupoice.general.model.DetalleEvento@45119206[codEvento=13130,nomAtributo=indHomologado,valViejo=No,valNuevo=Si]] [02/05/03 12:51:55:281 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - flushing session [02/05/03 12:51:55:281 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Flushing entities and processing referenced collections [02/05/03 12:51:55:281 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Processing unreferenced collections [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Scheduling collection removes/(re)creates/updates [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Flushed: 2 insertions, 0 updates, 0 deletions to 2 objects [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - executing flush [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG EntityPersister - Inserting entity: com.grupoice.general.model.Evento#13130 [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG BatcherImpl - 1 open PreparedStatements [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionFactoryImpl - prepared statement get: insert into GE_EVENTOS (fec_registro, nom_usuario, nom_tabla, tip_evento, cod_evento) values (?, ?, ?, ?, ?) [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionFactoryImpl - preparing statement [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DRVR SQLS SQL: "insert into GE_EVENTOS (fec_registro, nom_usuario, nom_tabla, tip_evento, cod_evento) values (?, ?, ?, ?, ?)" [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DRVR OPER OracleConnection.getDefaultFixedString() returning false [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DRVR OPER ResultSetUtil.needIdentifier(typeCode=1): return: false [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DRVR SQLS Input SQL: "insert into GE_EVENTOS (fec_registro, nom_usuario, nom_tabla, tip_evento, cod_evento) values (?, ?, ?, ?, ?)" [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG EntityPersister - Dehydrating entity: com.grupoice.general.model.Evento#13130 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG TimestampType - binding '02 mayo 2003 12:51:55' to parameter: 1 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setTimestamp(paramIndex=1, timestamp) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG StringType - binding 'DEFAULT' to parameter: 2 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setString(paramIndex=2, x=DEFAULT) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG StringType - binding 'com.grupoice.celular.ga.model.Aparato' to parameter: 3 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setString(paramIndex=3, x=com.grupoice.celular.ga.model.Aparato) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG StringType - binding 'U' to parameter: 4 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setString(paramIndex=4, x=U) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG LongType - binding '13130' to parameter: 5 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setLong(paramIndex=5, x=13130) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG BatcherImpl - Adding to batch [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.addBatch() [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG BatcherImpl - Executing batch size: 1 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.executeBatch() [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DRVR OPER OracleConnection.getAutoCommit() returned false [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DRVR OPER OracleStatement.cleanupForBatching() [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DEBUG EntityPersister - Inserting entity: com.grupoice.general.model.DetalleEvento#com.grupoice.general.model.DetalleEvento@45119206[codEvento=13130,nomAtributo=indHomologado,valViejo=No,valNuevo=Si] [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DEBUG BatcherImpl - Executing batch size: 0 [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DEBUG SessionFactoryImpl - closing statement [02/05/03 12:51:55:359 GMT-06:00] 34385228 ExceptionUtil X CNTR0020E: Ha ocurrido una excepción que no forma parte de la aplicación al procesar el método modificarAparato en el bean BeanId(portal#gaEJB.jar#AparatosEJB, null): java.lang.NullPointerException at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431) at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:3528) at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:3401) at com.ibm.ejs.cm.cache.CachedStatement.clearParameters(CachedStatement.java:432) at com.ibm.ejs.cm.proxy.PreparedStatementProxy.clearParameters(PreparedStatementProxy.java:201) at net.sf.hibernate.impl.SessionFactoryImpl.closePreparedStatement(SessionFactoryImpl.java:579) at net.sf.hibernate.impl.BatcherImpl.closeStatement(BatcherImpl.java:66) at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:86) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:46) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:71) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:439) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2065) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2037) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1981) at com.grupoice.general.dao.impl.HibernateDAO.flushSession(HibernateDAO.java:168) at com.grupoice.general.dao.impl.HibernateDAO.disconnect(HibernateDAO.java:234) at com.grupoice.general.controller.impl.DefaultEventosController.registrarEvento(DefaultEventosController.java:78) at com.grupoice.general.util.EventoDAOLogger.logUpdateObject(EventoDAOLogger.java:103) at com.grupoice.general.dao.impl.DAOInterceptor.onFlushDirty(DAOInterceptor.java:332) at net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java:2168) at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:1993) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1980) at com.grupoice.general.dao.impl.HibernateDAO.flushSession(HibernateDAO.java:168) at com.grupoice.general.dao.impl.HibernateDAO.disconnect(HibernateDAO.java:234) at com.grupoice.celular.ga.controller.impl.DefaultAparatosController.modificarAparato(DefaultAparatosController.java:249) at com.grupoice.celular.ga.ejb.AparatosEJBBean.modificarAparato(AparatosEJBBean.java:185) at com.grupoice.celular.ga.ejb.EJSRemoteStatelessAparatosEJB.modificarAparato(EJSRemoteStatelessAparatosEJB.java:242) at com.grupoice.celular.ga.ejb._AparatosEJB_Stub.modificarAparato(_AparatosEJB_Stub.java:591) at com.grupoice.celular.ga.controller.remote.EJBAparatosController.modificarAparato(EJBAparatosController.java:175) at com.grupoice.celular.ga.web.action.aparato.RegistrarAparatoAction.execute(RegistrarAparatoAction.java:72) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:479) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1421) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:678) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:117) at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:151) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315) at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252) at com.ibm.ws.util.CachedThread.run(ThreadPool.java:137) This problem shows up if i'm using a PreparedStatement with a batch size greater than 0. Seems like an Oracle JDBC bug in method DBData.clearItem(int): http://www.oracle.com/forums/thread.jsp?forum=99&thread=57275&message=452059&q=636c6561724974656d#452059 In that page they suggest a workaround: catching and ignoring the NPE, so I modified SessionFactoryImpl to look like this: public void closePreparedStatement(PreparedStatement ps) throws SQLException { if (statementCache!=null) { statementCache.closePreparedStatement(ps); } else { try { log.trace("closing statement"); try { ps.close(); } catch(NullPointerException e) { log.trace("NPE ignored while closing statement: ", e); } } catch (SQLException sqle) { JDBCExceptionReporter.logExceptions(sqle); throw sqle; } } } What do you think? Was this problem reported before? I'm using JDBC Driver 9.2.0, latest version. Seems like the forum's message is from April 17... Leonardo

    Hibernate JIRA | 1 decade ago | Leonardo Quijano
    java.lang.NullPointerException
  2. 0

    I got the following NPE while doing a session.flush() in Oracle: [02/05/03 12:51:55:266 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - saving [com.grupoice.general.model.Evento#13130] [02/05/03 12:51:55:266 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - saving [com.grupoice.general.model.DetalleEvento#com.grupoice.general.model.DetalleEvento@45119206[codEvento=13130,nomAtributo=indHomologado,valViejo=No,valNuevo=Si]] [02/05/03 12:51:55:281 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - flushing session [02/05/03 12:51:55:281 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Flushing entities and processing referenced collections [02/05/03 12:51:55:281 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Processing unreferenced collections [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Scheduling collection removes/(re)creates/updates [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Flushed: 2 insertions, 0 updates, 0 deletions to 2 objects [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - Flushed: 0 (re)creations, 0 updates, 0 removals to 0 collections [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionImpl - executing flush [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG EntityPersister - Inserting entity: com.grupoice.general.model.Evento#13130 [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG BatcherImpl - 1 open PreparedStatements [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionFactoryImpl - prepared statement get: insert into GE_EVENTOS (fec_registro, nom_usuario, nom_tabla, tip_evento, cod_evento) values (?, ?, ?, ?, ?) [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG SessionFactoryImpl - preparing statement [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DRVR SQLS SQL: "insert into GE_EVENTOS (fec_registro, nom_usuario, nom_tabla, tip_evento, cod_evento) values (?, ?, ?, ?, ?)" [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DRVR OPER OracleConnection.getDefaultFixedString() returning false [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DRVR OPER ResultSetUtil.needIdentifier(typeCode=1): return: false [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DRVR SQLS Input SQL: "insert into GE_EVENTOS (fec_registro, nom_usuario, nom_tabla, tip_evento, cod_evento) values (?, ?, ?, ?, ?)" [02/05/03 12:51:55:312 GMT-06:00] 34385228 SystemOut U DEBUG EntityPersister - Dehydrating entity: com.grupoice.general.model.Evento#13130 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG TimestampType - binding '02 mayo 2003 12:51:55' to parameter: 1 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setTimestamp(paramIndex=1, timestamp) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG StringType - binding 'DEFAULT' to parameter: 2 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setString(paramIndex=2, x=DEFAULT) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG StringType - binding 'com.grupoice.celular.ga.model.Aparato' to parameter: 3 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setString(paramIndex=3, x=com.grupoice.celular.ga.model.Aparato) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG StringType - binding 'U' to parameter: 4 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setString(paramIndex=4, x=U) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG LongType - binding '13130' to parameter: 5 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.setLong(paramIndex=5, x=13130) [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG BatcherImpl - Adding to batch [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.addBatch() [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DEBUG BatcherImpl - Executing batch size: 1 [02/05/03 12:51:55:344 GMT-06:00] 34385228 SystemOut U DRVR OPER OraclePreparedStatement.executeBatch() [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DRVR OPER OracleConnection.getAutoCommit() returned false [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DRVR OPER OracleStatement.cleanupForBatching() [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DEBUG EntityPersister - Inserting entity: com.grupoice.general.model.DetalleEvento#com.grupoice.general.model.DetalleEvento@45119206[codEvento=13130,nomAtributo=indHomologado,valViejo=No,valNuevo=Si] [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DEBUG BatcherImpl - Executing batch size: 0 [02/05/03 12:51:55:359 GMT-06:00] 34385228 SystemOut U DEBUG SessionFactoryImpl - closing statement [02/05/03 12:51:55:359 GMT-06:00] 34385228 ExceptionUtil X CNTR0020E: Ha ocurrido una excepción que no forma parte de la aplicación al procesar el método modificarAparato en el bean BeanId(portal#gaEJB.jar#AparatosEJB, null): java.lang.NullPointerException at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431) at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:3528) at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:3401) at com.ibm.ejs.cm.cache.CachedStatement.clearParameters(CachedStatement.java:432) at com.ibm.ejs.cm.proxy.PreparedStatementProxy.clearParameters(PreparedStatementProxy.java:201) at net.sf.hibernate.impl.SessionFactoryImpl.closePreparedStatement(SessionFactoryImpl.java:579) at net.sf.hibernate.impl.BatcherImpl.closeStatement(BatcherImpl.java:66) at net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:86) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:46) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:71) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:439) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2065) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2037) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1981) at com.grupoice.general.dao.impl.HibernateDAO.flushSession(HibernateDAO.java:168) at com.grupoice.general.dao.impl.HibernateDAO.disconnect(HibernateDAO.java:234) at com.grupoice.general.controller.impl.DefaultEventosController.registrarEvento(DefaultEventosController.java:78) at com.grupoice.general.util.EventoDAOLogger.logUpdateObject(EventoDAOLogger.java:103) at com.grupoice.general.dao.impl.DAOInterceptor.onFlushDirty(DAOInterceptor.java:332) at net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java:2168) at net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:1993) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1980) at com.grupoice.general.dao.impl.HibernateDAO.flushSession(HibernateDAO.java:168) at com.grupoice.general.dao.impl.HibernateDAO.disconnect(HibernateDAO.java:234) at com.grupoice.celular.ga.controller.impl.DefaultAparatosController.modificarAparato(DefaultAparatosController.java:249) at com.grupoice.celular.ga.ejb.AparatosEJBBean.modificarAparato(AparatosEJBBean.java:185) at com.grupoice.celular.ga.ejb.EJSRemoteStatelessAparatosEJB.modificarAparato(EJSRemoteStatelessAparatosEJB.java:242) at com.grupoice.celular.ga.ejb._AparatosEJB_Stub.modificarAparato(_AparatosEJB_Stub.java:591) at com.grupoice.celular.ga.controller.remote.EJBAparatosController.modificarAparato(EJBAparatosController.java:175) at com.grupoice.celular.ga.web.action.aparato.RegistrarAparatoAction.execute(RegistrarAparatoAction.java:72) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:479) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1421) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:518) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167) at com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297) at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110) at com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472) at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012) at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:678) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331) at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:117) at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134) at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239) at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67) at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:151) at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315) at com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252) at com.ibm.ws.util.CachedThread.run(ThreadPool.java:137) This problem shows up if i'm using a PreparedStatement with a batch size greater than 0. Seems like an Oracle JDBC bug in method DBData.clearItem(int): http://www.oracle.com/forums/thread.jsp?forum=99&thread=57275&message=452059&q=636c6561724974656d#452059 In that page they suggest a workaround: catching and ignoring the NPE, so I modified SessionFactoryImpl to look like this: public void closePreparedStatement(PreparedStatement ps) throws SQLException { if (statementCache!=null) { statementCache.closePreparedStatement(ps); } else { try { log.trace("closing statement"); try { ps.close(); } catch(NullPointerException e) { log.trace("NPE ignored while closing statement: ", e); } } catch (SQLException sqle) { JDBCExceptionReporter.logExceptions(sqle); throw sqle; } } } What do you think? Was this problem reported before? I'm using JDBC Driver 9.2.0, latest version. Seems like the forum's message is from April 17... Leonardo

    Hibernate JIRA | 1 decade ago | Leonardo Quijano
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    problem in data migration of wpsportal cloudscape to oracle 9i(Release 2)

    Google Groups | 10 years ago | svir...@ggn.hcltech.com
    java.lang.NullPointerException
  5. 0

    data migration from wps cloudscape to oracle 9i(Release 2)

    Google Groups | 10 years ago | svir...@ggn.hcltech.com
    java.lang.NullPointerException

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at oracle.jdbc.dbaccess.DBData.clearItem()
    2. oracle.jdbc.dbaccess
      DBDataSetImpl.clearItem
      1. oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:431)
      2. oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:3528)
      2 frames
    3. Oracle jdbc
      OraclePreparedStatement.clearParameters
      1. oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:3401)
      1 frame
    4. com.ibm.ejs
      PreparedStatementProxy.clearParameters
      1. com.ibm.ejs.cm.cache.CachedStatement.clearParameters(CachedStatement.java:432)
      2. com.ibm.ejs.cm.proxy.PreparedStatementProxy.clearParameters(PreparedStatementProxy.java:201)
      2 frames
    5. net.sf.hibernate
      SessionImpl.flush
      1. net.sf.hibernate.impl.SessionFactoryImpl.closePreparedStatement(SessionFactoryImpl.java:579)
      2. net.sf.hibernate.impl.BatcherImpl.closeStatement(BatcherImpl.java:66)
      3. net.sf.hibernate.impl.BatcherImpl.executeBatch(BatcherImpl.java:86)
      4. net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:46)
      5. net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:71)
      6. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:439)
      7. net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:20)
      8. net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2065)
      9. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2037)
      10. net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1981)
      10 frames
    6. com.grupoice.general
      DAOInterceptor.onFlushDirty
      1. com.grupoice.general.dao.impl.HibernateDAO.flushSession(HibernateDAO.java:168)
      2. com.grupoice.general.dao.impl.HibernateDAO.disconnect(HibernateDAO.java:234)
      3. com.grupoice.general.controller.impl.DefaultEventosController.registrarEvento(DefaultEventosController.java:78)
      4. com.grupoice.general.util.EventoDAOLogger.logUpdateObject(EventoDAOLogger.java:103)
      5. com.grupoice.general.dao.impl.DAOInterceptor.onFlushDirty(DAOInterceptor.java:332)
      5 frames
    7. net.sf.hibernate
      SessionImpl.flush
      1. net.sf.hibernate.impl.SessionImpl.flushEntities(SessionImpl.java:2168)
      2. net.sf.hibernate.impl.SessionImpl.flushEverything(SessionImpl.java:1993)
      3. net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:1980)
      3 frames
    8. com.grupoice.general
      HibernateDAO.disconnect
      1. com.grupoice.general.dao.impl.HibernateDAO.flushSession(HibernateDAO.java:168)
      2. com.grupoice.general.dao.impl.HibernateDAO.disconnect(HibernateDAO.java:234)
      2 frames
    9. com.grupoice.celular
      RegistrarAparatoAction.execute
      1. com.grupoice.celular.ga.controller.impl.DefaultAparatosController.modificarAparato(DefaultAparatosController.java:249)
      2. com.grupoice.celular.ga.ejb.AparatosEJBBean.modificarAparato(AparatosEJBBean.java:185)
      3. com.grupoice.celular.ga.ejb.EJSRemoteStatelessAparatosEJB.modificarAparato(EJSRemoteStatelessAparatosEJB.java:242)
      4. com.grupoice.celular.ga.ejb._AparatosEJB_Stub.modificarAparato(_AparatosEJB_Stub.java:591)
      5. com.grupoice.celular.ga.controller.remote.EJBAparatosController.modificarAparato(EJBAparatosController.java:175)
      6. com.grupoice.celular.ga.web.action.aparato.RegistrarAparatoAction.execute(RegistrarAparatoAction.java:72)
      6 frames
    10. struts
      ActionServlet.doPost
      1. org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:479)
      2. org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
      3. org.apache.struts.action.ActionServlet.process(ActionServlet.java:1421)
      4. org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:518)
      4 frames
    11. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      2 frames
    12. com.ibm.servlet
      HttpConnection.handleRequest
      1. com.ibm.servlet.engine.webapp.StrictServletInstance.doService(ServletManager.java:827)
      2. com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service(StrictLifecycleServlet.java:167)
      3. com.ibm.servlet.engine.webapp.IdleServletState.service(StrictLifecycleServlet.java:297)
      4. com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service(StrictLifecycleServlet.java:110)
      5. com.ibm.servlet.engine.webapp.ServletInstance.service(ServletManager.java:472)
      6. com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch(ServletManager.java:1012)
      7. com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch(ServletManager.java:913)
      8. com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:678)
      9. com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:331)
      10. com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:117)
      11. com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
      12. com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:239)
      13. com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
      14. com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:151)
      15. com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service(OSEListener.java:315)
      16. com.ibm.servlet.engine.http11.HttpConnection.handleRequest(HttpConnection.java:60)
      16 frames
    13. com.ibm.ws
      CachedThread.run
      1. com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
      2. com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
      3. com.ibm.ws.util.CachedThread.run(ThreadPool.java:137)
      3 frames