java.lang.NullPointerException

Hibernate JIRA | christine | 1 decade ago
  1. 0

    I encountered java.lang.NullPointerException when start up a jbpm process. but the same code work fine in BES and WAS 5.0 and WAS 5.0.2. anybody know where goes wrong? stacktrace: I encountered java.lang.NullPointerException when start up a jbpm process. but the same code work fine in BES and WAS 5.0 and WAS 5.0.2. anybody know where goes wrong? stacktrace: [11/29/04 14:08:42:156 SGT] 50d504ad ExecutionServ I org.jbpm.impl.ExecutionServiceImpl starting a process instance for 'actor8' of definition '6553601'... [11/29/04 14:08:42:453 SGT] 50d504ad SystemOut O ERROR [] com.phs.ihis.web.workflow.WorkflowFactory.processWorkflowInstance(Unknown Source) : exec java.lang.NullPointerException at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:312) at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:2154) at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:2519) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.resetStatement(WSJdbcConnection.java:1767) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1462) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1425) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:57) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:105) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:461) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187) at org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:55) at org.jbpm.impl.ExecutionServiceImpl.startProcessInstance(ExecutionServiceImpl.java:103) at com.phs.ihis.web.workflow.WorkflowFactory.processWorkflowInstance(Unknown Source) at com.phs.ihis.web.workflow.WorkflowFactory.triggerWorkflowProcess(Unknown Source) at com.phs.ihis.web.pm.admission.quickadmission.AdmitQuickAdmissionAction.perform(Unknown Source) at com.phs.web.WebAction.execute(WebAction.java:287) at com.phs.web.WebRequestProcessor.processActionPerform(WebRequestProcessor.java:255) at com.phs.web.WebRequestProcessor.process(WebRequestProcessor.java:218) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76) at com.phs.web.filter.ContentTypeFilter.doFilter(ContentTypeFilter.java:72) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1050) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:588) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:206) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:214) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:449) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) [11/29/04 14:08:42:453 SGT] 50d504ad SystemOut O DEBUG [] com.phs.web.WebExceptionHandler.execute(WebExceptionHandler.java:90) : original exception com.phs.commons.lang.exception.UnHandledException: java.lang.NullPointerException at com.phs.ihis.web.workflow.WorkflowFactory.processWorkflowInstance(Unknown Source) at com.phs.ihis.web.workflow.WorkflowFactory.triggerWorkflowProcess(Unknown Source) at com.phs.ihis.web.pm.admission.quickadmission.AdmitQuickAdmissionAction.perform(Unknown Source) at com.phs.web.WebAction.execute(WebAction.java:287) at com.phs.web.WebRequestProcessor.processActionPerform(WebRequestProcessor.java:255) at com.phs.web.WebRequestProcessor.process(WebRequestProcessor.java:218) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76) at com.phs.web.filter.ContentTypeFilter.doFilter(ContentTypeFilter.java:72) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1050) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:588) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:206) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:214) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:449) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) Caused by: java.lang.NullPointerException at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:312) at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:2154) at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:2519) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.resetStatement(WSJdbcConnection.java:1767) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1462) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1425) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:57) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:105) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:461) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187) at org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:55) at org.jbpm.impl.ExecutionServiceImpl.startProcessInstance(ExecutionServiceImpl.java:103) ... 33 more

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

    I encountered java.lang.NullPointerException when start up a jbpm process. but the same code work fine in BES and WAS 5.0 and WAS 5.0.2. anybody know where goes wrong? stacktrace: I encountered java.lang.NullPointerException when start up a jbpm process. but the same code work fine in BES and WAS 5.0 and WAS 5.0.2. anybody know where goes wrong? stacktrace: [11/29/04 14:08:42:156 SGT] 50d504ad ExecutionServ I org.jbpm.impl.ExecutionServiceImpl starting a process instance for 'actor8' of definition '6553601'... [11/29/04 14:08:42:453 SGT] 50d504ad SystemOut O ERROR [] com.phs.ihis.web.workflow.WorkflowFactory.processWorkflowInstance(Unknown Source) : exec java.lang.NullPointerException at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:312) at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:2154) at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:2519) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.resetStatement(WSJdbcConnection.java:1767) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1462) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1425) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:57) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:105) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:461) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187) at org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:55) at org.jbpm.impl.ExecutionServiceImpl.startProcessInstance(ExecutionServiceImpl.java:103) at com.phs.ihis.web.workflow.WorkflowFactory.processWorkflowInstance(Unknown Source) at com.phs.ihis.web.workflow.WorkflowFactory.triggerWorkflowProcess(Unknown Source) at com.phs.ihis.web.pm.admission.quickadmission.AdmitQuickAdmissionAction.perform(Unknown Source) at com.phs.web.WebAction.execute(WebAction.java:287) at com.phs.web.WebRequestProcessor.processActionPerform(WebRequestProcessor.java:255) at com.phs.web.WebRequestProcessor.process(WebRequestProcessor.java:218) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76) at com.phs.web.filter.ContentTypeFilter.doFilter(ContentTypeFilter.java:72) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1050) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:588) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:206) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:214) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:449) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) [11/29/04 14:08:42:453 SGT] 50d504ad SystemOut O DEBUG [] com.phs.web.WebExceptionHandler.execute(WebExceptionHandler.java:90) : original exception com.phs.commons.lang.exception.UnHandledException: java.lang.NullPointerException at com.phs.ihis.web.workflow.WorkflowFactory.processWorkflowInstance(Unknown Source) at com.phs.ihis.web.workflow.WorkflowFactory.triggerWorkflowProcess(Unknown Source) at com.phs.ihis.web.pm.admission.quickadmission.AdmitQuickAdmissionAction.perform(Unknown Source) at com.phs.web.WebAction.execute(WebAction.java:287) at com.phs.web.WebRequestProcessor.processActionPerform(WebRequestProcessor.java:255) at com.phs.web.WebRequestProcessor.process(WebRequestProcessor.java:218) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174) at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313) at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116) at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283) at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42) at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:76) at com.phs.web.filter.ContentTypeFilter.doFilter(ContentTypeFilter.java:72) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:132) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:71) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1050) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:588) at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:206) at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80) at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:214) at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71) at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182) at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334) at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56) at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615) at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:449) at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code)) Caused by: java.lang.NullPointerException at oracle.jdbc.dbaccess.DBData.clearItem(DBData.java:312) at oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:2154) at oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:2519) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.resetStatement(WSJdbcConnection.java:1767) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1462) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1425) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:57) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:105) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:461) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187) at org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:55) at org.jbpm.impl.ExecutionServiceImpl.startProcessInstance(ExecutionServiceImpl.java:103) ... 33 more

    Hibernate JIRA | 1 decade ago | christine
    java.lang.NullPointerException
  3. 0

    Hi, I just recently started using hibernate for my O/R mapping, after using Toplink for sometime. I have some issues and questions hopefully can be cleared out. Facts/environment: 1- We've created a simple thin layer around hibernate for the developer to interface with instead of going directly to hibernate APIs. 2- We are using Websphere studio 5.1.1 (WAS 5.1.0 and JRE 1.4.1) 3- hibernate 2.1 4- JTATransactionFactory, WebSphereTransactionManagerLookup, DatasourceConnectionProvider, OracleDialect, TreeCacheProvider (JBoss) 5- Session façade -> CMT (transaction-type=Container) 6- oracle.jdbc.xa.client.OracleXADataSource, ojdbc14.jar 7- We keep the session in a ThreadLocal, to make sure we hold the session for the current executing thread. We close the session when all work is completed. Since we depend on WebSphere JTA Tranaction Manager, we don't explicitly commit or rollback. We open the session, execute the action, flush, and then close the session - that all in the session façade (CMT). Issues: - I have been testing hibernate with Websphere studio 5.1.0 (WAS 5.0 and JRE 1.3) before, and it was working perfectly, then after I upgraded to Websphere studio 5.1.1 (WAS 5.1.0 and JRE 1.4.1), the problems started: 1- TransactionManagerFactory class package was changed in WAS 5.1. So basically it's as following: WAS 4.0: c com.ibm.ejs.jts.jta.JTSXA WAS 5.0: com.ibm.ejs.jts.jta.TransactionManagerFactory WAS 5.1: com.ibm.ws.Transaction.TransactionManagerFactory So I had to apply the change in net.sf.hibernate.transaction.WebSphereTransactionManagerLookup I realized now that other people fixed it in this forum. so skip this one. 2- A strange problem has started, the first instance of an operation regardless if it is create, update, or delete works fine, then I the second time I try to do another create, update or delete, and when I try to flush the session, I get an oracle NullPointerException: 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.ws.rsadapter.jdbc.WSJdbcConnection.resetStatement(WSJdbcConnection.java:1719) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1415) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1381) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:230) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:57) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:105) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:461) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187) I go around this problem by catching the exception, clearing the session, and trying again, then it works fine the second time. I'm not sure, if the problem is a threading issues or what? What I know is I don't want it to be solved this way, although it is apparently not affecting the performance that much. Keep in mind that the same code works fine with the previous environment WAS 5.0 and JRE 1.3. And it happens either if I set transaction.manager_lookup_class to WebSphereTransactionManagerLookup or not. - It seems that after I do a session flush, data gets commited, if I fire a RuntimeException after flushing Websphere JTA Tranaction Manager doesn't rollback. Do I have to call rollback my self, am I allowed to rollback if Websphere JTA Tranaction Manager is demecrating the tranasctions, then whats the purpose of using Websphere JTA Tranaction Manager? Thanks, Hadi

    Hibernate JIRA | 1 decade ago | Hadi Mallah
    java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hi, I just recently started using hibernate for my O/R mapping, after using Toplink for sometime. I have some issues and questions hopefully can be cleared out. Facts/environment: 1- We've created a simple thin layer around hibernate for the developer to interface with instead of going directly to hibernate APIs. 2- We are using Websphere studio 5.1.1 (WAS 5.1.0 and JRE 1.4.1) 3- hibernate 2.1 4- JTATransactionFactory, WebSphereTransactionManagerLookup, DatasourceConnectionProvider, OracleDialect, TreeCacheProvider (JBoss) 5- Session façade -> CMT (transaction-type=Container) 6- oracle.jdbc.xa.client.OracleXADataSource, ojdbc14.jar 7- We keep the session in a ThreadLocal, to make sure we hold the session for the current executing thread. We close the session when all work is completed. Since we depend on WebSphere JTA Tranaction Manager, we don't explicitly commit or rollback. We open the session, execute the action, flush, and then close the session - that all in the session façade (CMT). Issues: - I have been testing hibernate with Websphere studio 5.1.0 (WAS 5.0 and JRE 1.3) before, and it was working perfectly, then after I upgraded to Websphere studio 5.1.1 (WAS 5.1.0 and JRE 1.4.1), the problems started: 1- TransactionManagerFactory class package was changed in WAS 5.1. So basically it's as following: WAS 4.0: c com.ibm.ejs.jts.jta.JTSXA WAS 5.0: com.ibm.ejs.jts.jta.TransactionManagerFactory WAS 5.1: com.ibm.ws.Transaction.TransactionManagerFactory So I had to apply the change in net.sf.hibernate.transaction.WebSphereTransactionManagerLookup I realized now that other people fixed it in this forum. so skip this one. 2- A strange problem has started, the first instance of an operation regardless if it is create, update, or delete works fine, then I the second time I try to do another create, update or delete, and when I try to flush the session, I get an oracle NullPointerException: 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.ws.rsadapter.jdbc.WSJdbcConnection.resetStatement(WSJdbcConnection.java:1719) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1415) at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1381) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:230) at net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:57) at net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:105) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:461) at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443) at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29) at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308) at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261) at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187) I go around this problem by catching the exception, clearing the session, and trying again, then it works fine the second time. I'm not sure, if the problem is a threading issues or what? What I know is I don't want it to be solved this way, although it is apparently not affecting the performance that much. Keep in mind that the same code works fine with the previous environment WAS 5.0 and JRE 1.3. And it happens either if I set transaction.manager_lookup_class to WebSphereTransactionManagerLookup or not. - It seems that after I do a session flush, data gets commited, if I fire a RuntimeException after flushing Websphere JTA Tranaction Manager doesn't rollback. Do I have to call rollback my self, am I allowed to rollback if Websphere JTA Tranaction Manager is demecrating the tranasctions, then whats the purpose of using Websphere JTA Tranaction Manager? Thanks, Hadi

    Hibernate JIRA | 1 decade ago | Hadi Mallah
    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:312)
      2. oracle.jdbc.dbaccess.DBDataSetImpl.clearItem(DBDataSetImpl.java:2154)
      2 frames
    3. Oracle jdbc
      OraclePreparedStatement.clearParameters
      1. oracle.jdbc.driver.OraclePreparedStatement.clearParameters(OraclePreparedStatement.java:2519)
      1 frame
    4. com.ibm.ws
      WSJdbcConnection.prepareStatement
      1. com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.resetStatement(WSJdbcConnection.java:1767)
      2. com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1462)
      3. com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1425)
      3 frames
    5. net.sf.hibernate
      SessionImpl.flush
      1. net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:228)
      2. net.sf.hibernate.impl.BatcherImpl.prepareStatement(BatcherImpl.java:57)
      3. net.sf.hibernate.impl.BatcherImpl.prepareBatchStatement(BatcherImpl.java:105)
      4. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:461)
      5. net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:443)
      6. net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:29)
      7. net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
      8. net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2261)
      9. net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
      9 frames
    6. org.jbpm.persistence
      HibernateSession.commitTransaction
      1. org.jbpm.persistence.hibernate.HibernateSession.commitTransaction(HibernateSession.java:55)
      1 frame
    7. org.jbpm.impl
      ExecutionServiceImpl.startProcessInstance
      1. org.jbpm.impl.ExecutionServiceImpl.startProcessInstance(ExecutionServiceImpl.java:103)
      1 frame