Discussions

EJB programming & troubleshooting: StateFul session (container managed) bean gives error

  1. We are getting the following error from a stetful session bean, which is deployed as container managed.
    Any clue???

    Wed Oct 18 12:07:07 EDT 2000:<I> <TX> Transaction rolled back due to beforeCompl
    etion exception
    java.sql.SQLException: [OraDriver] ORA-01861: literal does not match format stri
    ng
            at com.inet.ora.e.a(Unknown Source)
            at com.inet.ora.a.int(Unknown Source)
            at com.inet.ora.a.executeUpdate(Unknown Source)
            at weblogic.jdbcbase.jts.Statement.executeUpdate(Statement.java:317)
            at gov.pay.beans.user.IndividualPSWebLogic_CMP_RDBMS.update(IndividualPS
    WebLogic_CMP_RDBMS.java:316)
            at gov.pay.beans.user.IndividualPSWebLogic_CMP_RDBMS.store(IndividualPSW
    ebLogic_CMP_RDBMS.java:269)
            at weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:19
    0)
            at weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBCont
    ext.java:222)
            at weblogic.jts.internal.CoordinatorImpl.notifyBefore(CoordinatorImpl.ja
    va, Compiled Code)
            at weblogic.jts.internal.CoordinatorImpl.prepare(CoordinatorImpl.java, C
    ompiled Code)
            at weblogic.jts.internal.CoordinatorImpl.commit(CoordinatorImpl.java:366
    )
            at weblogic.jts.internal.TxContext.commit(TxContext.java:246)
            at weblogic.ejb.internal.StatefulEJBObject.postInvokeOurTx(StatefulEJBOb
    ject.java:276)
            at weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:661
    )
            at gov.pay.beans.session.UserSessionBeanEOImpl.GetNewForm(UserSessionBea
    nEOImpl.java:289)
            at gov.pay.servlets.FormServlet.service(FormServlet.java:56)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:105)
            at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:742)
            at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:686)
            at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
    ContextManager.java:247)
            at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
    a:361)
            at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)

            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)
    --------------- nested within: ------------------
    weblogic.utils.NestedRuntimeException: Error writing 'Context hashcode: '1211296
    28', primaryKey: 'gov.pay.beans.user.IndividualPK@1', flags: '', needsRefresh: '
    false', needsFlush: 'true', pinned: 'true', ejbObject hashcode: '121391772', bea
    n hashcode: '119556764'' to persistent store - with nested exception:
    [java.sql.SQLException: [OraDriver] ORA-01861: literal does not match format str
    ing]
            at weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBCont
    ext.java:224)
            at weblogic.jts.internal.CoordinatorImpl.notifyBefore(CoordinatorImpl.ja
    va, Compiled Code)
            at weblogic.jts.internal.CoordinatorImpl.prepare(CoordinatorImpl.java, C
    ompiled Code)
            at weblogic.jts.internal.CoordinatorImpl.commit(CoordinatorImpl.java:366
    )
            at weblogic.jts.internal.TxContext.commit(TxContext.java:246)
            at weblogic.ejb.internal.StatefulEJBObject.postInvokeOurTx(StatefulEJBOb
    ject.java:276)
            at weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:661
    )
            at gov.pay.beans.session.UserSessionBeanEOImpl.GetNewForm(UserSessionBea
    nEOImpl.java:289)
            at gov.pay.servlets.FormServlet.service(FormServlet.java:56)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:105)
            at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:742)
            at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
    textImpl.java:686)
            at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
    ContextManager.java:247)
            at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
    a:361)
            at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)

            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)


    thanks
    Nazilin A

  2. hi,

    I think container managed or bean managed is for Entity Beans, not for Session Beans.
    I have developed session bean with
    transaction attribute TX_NOT_SUPPORTED and it's working.
    try this, it may help.

    Ambadas.