-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: WAS 4.0.2, transactions and CORBA exception
PostPosted: Thu Mar 11, 2004 7:40 am 
Newbie

Joined: Thu Mar 11, 2004 6:56 am
Posts: 5
I have problems with getting Hibernate to integrate with WAS, transactions and data sources. Have configured a data source named jdbc/rkt inside WAS.

It works if i use a standalone JDBC connection, but it does not if i try to let Hibernate use the already existing data source inside WAS. (See the hibernate.cfg.xml.) The exception is CORBA TRANSACTION_ROLLEDBACK.

Have not included mapping cfg as i think this is not a mapping problem.

Am using the following setup:
* Hibernate 2.1.1
* WAS 4.0.2 (IBM JDK 1.3.0 build cn130-20010925was)
* DB/2 7.2 on Windows

Here is some more info:

hibernate.cfg.xml:

Code:
<session-factory>
  <property name="dialect">net.sf.hibernate.dialect.DB2Dialect</property>

  <!-- Database properties, in app server environment. Gives CORBA error  -->
  <property name="hibernate.connection.datasource">jdbc/rkt</property>
  <property name="hibernate.transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
  <property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</property>
  <property name="hibernate.jndi.class">com.ibm.websphere.naming.WsnInitialContextFactory</property>
  <property name="jta.UserTransaction">java:comp/UserTransaction</property>

<!-- Database properties, stand alone. The application works when the block above is commented out and this block is uncommented -->
  <!--
  <property name="connection.driver_class">COM.ibm.db2.jdbc.app.DB2Driver</property>
  <property name="connection.url">jdbc:db2:rkt</property>
  <property name="connection.username">user</property>
  <property name="connection.password">password</property>
  <property name="connection.pool_size">20</property>
  -->
  ...
</session-factory>



My Java code looks like this:

Code:
    public Item findById(Long id, SecurityIdentification identification) throws IllegalArgumentException, PersistException {

        Item item = null;
        Session session = null;
        try {
            session = SessionFactoryPlant.getSessionFactory().openSession();
            item = (Item) session.get( Item.class, id );
        } catch (HibernateException e) {
            throw new PersistException(e);
        } finally {
            try {
                if (session != null) {
                    session.close();
                }
            } catch (HibernateException h) {
                LOGGER.warn("Exception while closing session.", h);
            }
        }
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("findById(" + id + ") found: " + item.getId());
        }
        return item;
    }




The code fails on session.close(), with the following exception:

Code:
2004-03-11 12:19:58,515 ERROR no.mycomp.rkt.action.LoadHandler                      - An exception occured while executing the load action for id 18003 [Servlet.Engine.Transports:8] 
javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 0 No; nested exception is:
   org.omg.CORBA.TRANSACTION_ROLLEDBACK: com.ibm.websphere.csi.CSITransactionRolledbackException:
   at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:194)
   at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:67)
   at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:414)
   at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:1772)
   at no.mycomp.ekomp.rkt.domain.ejb.EJSRemoteStatelessSearch.findById(EJSRemoteStatelessSearch.java:146)
   at no.mycomp.ekomp.rkt.domain.ejb._Search_Stub.findById(_Search_Stub.java:260)
   at no.mycomp.rkt.action.LoadHandler.execute(LoadHandler.java:88)
   at no.mycomp.pf.fw.mvc.action.PfaActionController.processAction(PfaActionController.java:40)
   at no.mycomp.pf.pc.PfoGenericPC.processRequest(PfoGenericPC.java:139)
   at com.sssw.portal.tag.EboFireComponentProcessRequestTag.doEndTag(EboFireComponentProcessRequestTag.java:116)
   at _register_jsp_0._jspService(_register_jsp_0.java:113)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:300)
   at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
   at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
   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:523)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
   at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
   at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
   at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
   at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
   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:122)
:javax.transaction.TransactionRolledbackException: com.ibm.websphere.csi.CSITransactionRolledbackException:
   at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:194)
   at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:67)
   at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:414)
   at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:1772)
   at no.mycomp.ekomp.rkt.domain.ejb.EJSRemoteStatelessSearch.findById(EJSRemoteStatelessSearch.java:146)
   at no.mycomp.ekomp.rkt.domain.ejb._Search_Stub.findById(_Search_Stub.java:260)
   at no.mycomp.rkt.action.LoadHandler.execute(LoadHandler.java:88)
   at no.mycomp.pf.fw.mvc.action.PfaActionController.processAction(PfaActionController.java:40)
   at no.mycomp.pf.pc.PfoGenericPC.processRequest(PfoGenericPC.java:139)
   at com.sssw.portal.tag.EboFireComponentProcessRequestTag.doEndTag(EboFireComponentProcessRequestTag.java:116)
   at _register_jsp_0._jspService(_register_jsp_0.java:113)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:300)
   at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
   at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
   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:523)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
   at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
   at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
   at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
   at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
   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:122)

   at com.ibm.ejs.container.util.ExceptionUtil.mapCSIException(ExceptionUtil.java:37)
   at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:1825)
   at no.mycomp.ekomp.rkt.domain.ejb.EJSRemoteStatelessSearch.findById(EJSRemoteStatelessSearch.java:146)
   at no.mycomp.ekomp.rkt.domain.ejb._Search_Stub.findById(_Search_Stub.java:260)
   at no.mycomp.rkt.action.LoadHandler.execute(LoadHandler.java:88)
   at no.mycomp.pf.fw.mvc.action.PfaActionController.processAction(PfaActionController.java:40)
   at no.mycomp.pf.pc.PfoGenericPC.processRequest(PfoGenericPC.java:139)
   at com.sssw.portal.tag.EboFireComponentProcessRequestTag.doEndTag(EboFireComponentProcessRequestTag.java:116)
   at _register_jsp_0._jspService(_register_jsp_0.java:113)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:300)
   at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
   at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
   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:523)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
   at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
   at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
   at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
   at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
   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:122)
  minor code: 0  completed: No
org.omg.CORBA.TRANSACTION_ROLLEDBACK: com.ibm.websphere.csi.CSITransactionRolledbackException:
   at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:194)
   at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:67)
   at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:414)
   at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:1772)
   at no.mycomp.ekomp.rkt.domain.ejb.EJSRemoteStatelessSearch.findById(EJSRemoteStatelessSearch.java:146)
   at no.mycomp.ekomp.rkt.domain.ejb._Search_Stub.findById(_Search_Stub.java:260)
   at no.mycomp.rkt.action.LoadHandler.execute(LoadHandler.java:88)
   at no.mycomp.pf.fw.mvc.action.PfaActionController.processAction(PfaActionController.java:40)
   at no.mycomp.pf.pc.PfoGenericPC.processRequest(PfoGenericPC.java:139)
   at com.sssw.portal.tag.EboFireComponentProcessRequestTag.doEndTag(EboFireComponentProcessRequestTag.java:116)
   at _register_jsp_0._jspService(_register_jsp_0.java:113)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:300)
   at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
   at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
   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:523)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
   at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
   at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
   at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
   at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
   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:122)
:javax.transaction.TransactionRolledbackException: com.ibm.websphere.csi.CSITransactionRolledbackException:
   at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:194)
   at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:67)
   at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:414)
   at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:1772)
   at no.mycomp.ekomp.rkt.domain.ejb.EJSRemoteStatelessSearch.findById(EJSRemoteStatelessSearch.java:146)
   at no.mycomp.ekomp.rkt.domain.ejb._Search_Stub.findById(_Search_Stub.java:260)
   at no.mycomp.rkt.action.LoadHandler.execute(LoadHandler.java:88)
   at no.mycomp.pf.fw.mvc.action.PfaActionController.processAction(PfaActionController.java:40)
   at no.mycomp.pf.pc.PfoGenericPC.processRequest(PfoGenericPC.java:139)
   at com.sssw.portal.tag.EboFireComponentProcessRequestTag.doEndTag(EboFireComponentProcessRequestTag.java:116)
   at _register_jsp_0._jspService(_register_jsp_0.java:113)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:300)
   at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
   at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
   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:523)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
   at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
   at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
   at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
   at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
   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:122)

   at com.ibm.ejs.container.util.ExceptionUtil.mapCSIException(ExceptionUtil.java:37)
   at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:1825)
   at no.mycomp.ekomp.rkt.domain.ejb.EJSRemoteStatelessSearch.findById(EJSRemoteStatelessSearch.java:146)
   at no.mycomp.ekomp.rkt.domain.ejb._Search_Stub.findById(_Search_Stub.java:260)
   at no.mycomp.rkt.action.LoadHandler.execute(LoadHandler.java:88)
   at no.mycomp.pf.fw.mvc.action.PfaActionController.processAction(PfaActionController.java:40)
   at no.mycomp.pf.pc.PfoGenericPC.processRequest(PfoGenericPC.java:139)
   at com.sssw.portal.tag.EboFireComponentProcessRequestTag.doEndTag(EboFireComponentProcessRequestTag.java:116)
   at _register_jsp_0._jspService(_register_jsp_0.java:113)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:300)
   at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
   at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
   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:523)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
   at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
   at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
   at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
   at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
   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:122)
  minor code: 0  completed: No
   at java.lang.reflect.Constructor.newInstance(Native Method)
   at com.ibm.rmi.javax.rmi.CORBA.Util.copyObject(Util.java:611)
   at javax.rmi.CORBA.Util.copyObject(Util.java:317)
   at no.mycomp.ekomp.rkt.domain.ejb._Search_Stub.findById(_Search_Stub.java:263)
   at no.mycomp.rkt.action.LoadHandler.execute(LoadHandler.java:88)
   at no.mycomp.pf.fw.mvc.action.PfaActionController.processAction(PfaActionController.java:40)
   at no.mycomp.pf.pc.PfoGenericPC.processRequest(PfoGenericPC.java:139)
   at com.sssw.portal.tag.EboFireComponentProcessRequestTag.doEndTag(EboFireComponentProcessRequestTag.java:116)
   at _register_jsp_0._jspService(_register_jsp_0.java:113)
   at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:142)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
   at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:300)
   at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:430)
   at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:565)
   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:523)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:282)
   at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:112)
   at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:91)
   at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:184)
   at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:67)
   at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:122)
   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:122)


After startup, my Hibernate log contains the following (an excerpt):

Code:
2004-03-11 11:17:15,187 INFO  net.sf.hibernate.cfg.Environment                             - Hibernate 2.1.1 [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,187 INFO  net.sf.hibernate.cfg.Environment                             - hibernate.properties not found [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,203 INFO  net.sf.hibernate.cfg.Environment                             - using CGLIB reflection optimizer [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,203 INFO  net.sf.hibernate.cfg.Environment                             - JVM does not support LinkedHasMap, LinkedHashSet - ordered maps and sets disabled [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,203 INFO  net.sf.hibernate.cfg.Environment                             - using workaround for JVM bug in java.sql.Timestamp [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,218 INFO  net.sf.hibernate.cfg.Configuration                           - configuring from resource: /hibernate.cfg.xml [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,218 INFO  net.sf.hibernate.cfg.Configuration                           - Configuration resource: /hibernate.cfg.xml [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,531 DEBUG net.sf.hibernate.cfg.Configuration                           - show_sql=true [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,546 DEBUG net.sf.hibernate.cfg.Configuration                           - dialect=net.sf.hibernate.dialect.DB2Dialect [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,546 DEBUG net.sf.hibernate.cfg.Configuration                           - hibernate.connection.datasource=jdbc/rkt [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,546 DEBUG net.sf.hibernate.cfg.Configuration                           - hibernate.transaction.factory_class=net.sf.hibernate.transaction.JTATransactionFactory [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,546 DEBUG net.sf.hibernate.cfg.Configuration                           - hibernate.transaction.manager_lookup_class=net.sf.hibernate.transaction.WebSphereTransactionManagerLookup [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,546 DEBUG net.sf.hibernate.cfg.Configuration                           - hibernate.jndi.class=com.ibm.websphere.naming.WsnInitialContextFactory [Servlet.Engine.Transports:9] 
2004-03-11 11:17:15,546 DEBUG net.sf.hibernate.cfg.Configuration                           - jta.UserTransaction=java:comp/UserTransaction [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,796 INFO  net.sf.hibernate.dialect.Dialect                             - Using dialect: net.sf.hibernate.dialect.DB2Dialect [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,812 INFO  net.sf.hibernate.cfg.SettingsFactory                         - Use outer join fetching: true [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,828 INFO  net.sf.hibernate.util.NamingHelper                           - JNDI InitialContext properties:{java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory} [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,859 INFO  net.sf.hibernate.connection.DatasourceConnectionProvider     - Using datasource: jdbc/rkt [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,859 INFO  net.sf.hibernate.transaction.TransactionFactoryFactory       - Transaction strategy: net.sf.hibernate.transaction.JTATransactionFactory [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,875 INFO  net.sf.hibernate.util.NamingHelper                           - JNDI InitialContext properties:{java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory} [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,875 INFO  net.sf.hibernate.transaction.TransactionManagerLookupFactory - instantiating TransactionManagerLookup: net.sf.hibernate.transaction.WebSphereTransactionManagerLookup [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,890 INFO  net.sf.hibernate.transaction.TransactionManagerLookupFactory - instantiated TransactionManagerLookup [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,890 INFO  t.sf.hibernate.transaction.WebSphereTransactionManagerLookup - WebSphere 4 [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,906 INFO  net.sf.hibernate.transaction.TransactionManagerLookupFactory - instantiating TransactionManagerLookup: net.sf.hibernate.transaction.WebSphereTransactionManagerLookup [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,906 INFO  net.sf.hibernate.transaction.TransactionManagerLookupFactory - instantiated TransactionManagerLookup [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,906 INFO  net.sf.hibernate.cfg.SettingsFactory                         - Use scrollable result sets: true [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,906 INFO  net.sf.hibernate.cfg.SettingsFactory                         - echoing all SQL to stdout [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,906 INFO  net.sf.hibernate.cfg.SettingsFactory                         - Query language substitutions: {} [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,906 INFO  net.sf.hibernate.cfg.SettingsFactory                         - cache provider: net.sf.ehcache.hibernate.Provider [Servlet.Engine.Transports:9] 
2004-03-11 11:17:17,921 INFO  net.sf.hibernate.cfg.Configuration                           - instantiating and configuring caches [Servlet.Engine.Transports:9] 
2004-03-11 11:17:18,000 INFO  net.sf.hibernate.impl.SessionFactoryImpl                     - building session factory [Servlet.Engine.Transports:9] 
2004-03-11 11:17:18,640 INFO  net.sf.hibernate.impl.SessionFactoryObjectFactory            - no JNDI name configured [Servlet.Engine.Transports:9] 
2004-03-11 11:17:18,656 INFO  t.sf.hibernate.transaction.WebSphereTransactionManagerLookup - WebSphere 4 [Servlet.Engine.Transports:9] 
2004-03-11 11:17:18,656 INFO  no.mycomp.ekomp.rkt.persistence.SessionFactoryPlant             - Initialized the Hibernate SessionFactory instance. [Servlet.Engine.Transports:9]


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 12, 2004 6:51 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
I don't think it'srelated to Hibernate.
You somehow use a tx already rollbacked. This is forbidden

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 12, 2004 7:48 am 
Newbie

Joined: Thu Mar 11, 2004 6:56 am
Posts: 5
Thanks for you help! Did some more checking now, and got
Code:
Illegal use of 1PC resource in transaction

in one of my logs. This was a major discovery :) and i then changed my datasource to
Code:
COM.ibm.db2.jdbc.DB2XADataSource

instead of
Code:
COM.ibm.db2.jdbc.DB2ConnectionPoolDataSource

and now things got better - of course. However, got a JNDI error:
Code:
net.sf.hibernate.TransactionException: Could not find UserTransaction in JNDI:
   at net.sf.hibernate.transaction.JTATransaction.begin(JTATransaction.java:136)
   at net.sf.hibernate.transaction.JTATransactionFactory.beginTransaction(JTATransactionFactory.java:58)
   at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2195)


Although the JNDI name i used was the one recommended by IBM for my version of WAS. However, i decided to see what was actually provided, and used the dumpNameSpace utility provided with WAS. There i could see that jta/usertransaction was the right name, so i used that instead in hibernate.cfg.xml.

And now things work! Must do some more testing, but things seem to run very well.

Just wanted to include this description to confirm it was not a Hibernate error and perhaps also help others in the same situation.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.