java.io.StreamCorruptedException on oracle (CLOB problem)

From: Parth Pandya (ppandy..voka.com)
Date: Tue Jul 08 2008 - 21:14:22 EDT

  • Next message: Parth Pandya: "RE: java.io.StreamCorruptedException on oracle (CLOB problem)"

     

    Hi Guys,

     

    I'm on weblogic-oracle combination and while trying to run a named query
    (listed below) I'm getting java.io.StreamCorruptedException(stack trace
    provided below).

    The sql is correct and I get results back when I run it in sql tools.
    The field types in 'submission' table have few varchar2, number,
    timespamp fields AND one CLOB type of field.

     

    I'm using Cayenne 3.0. And I'm using oracle thin driver for oracle 10g.

     

    It looks like some CLOB related read problem to me. I cleared the
    contents of that CLOB field and I didn't get any exceptions. But as soon
    as I ran the query on the record with some data in CLOB field I see the
    below exception.

     

    Can someone please suggest what can be the solution so reading CLOB
    contents happen properly?

     

    Thanks a lot,

    Parth

     

     

     

    Content of Named Query:

    SELECT s.* FROM submission s WHERE submission_oid IN

        (SELECT DISTINCT submission_oid FROM submission_version WHERE
    submission_status = 'submitted' AND assigned_user = 240)

    ORDER BY s.modification_timestamp DESC

     

    Exception:

    java.io.StreamCorruptedException: invalid stream header

            at
    java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)

            at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)

            at
    org.apache.cayenne.access.types.SerializableTypeFactory$SerializableType
    .toJavaObject(SerializableTypeFactory.java:113)

            at
    org.apache.cayenne.access.types.ExtendedTypeDecorator.materializeObject(
    ExtendedTypeDecorator.java:54)

            at
    org.apache.cayenne.access.jdbc.JDBCResultIterator.readDataRow(JDBCResult
    Iterator.java:296)

            at
    org.apache.cayenne.access.jdbc.JDBCResultIterator.nextDataRow(JDBCResult
    Iterator.java:142)

            at
    org.apache.cayenne.access.jdbc.JDBCResultIterator.dataRows(JDBCResultIte
    rator.java:112)

            at
    org.apache.cayenne.access.jdbc.SQLTemplateAction.processSelectResult(SQL
    TemplateAction.java:231)

            at
    org.apache.cayenne.dba.oracle.OracleSQLTemplateAction.processSelectResul
    t(OracleSQLTemplateAction.java:83)

            at
    org.apache.cayenne.access.jdbc.SQLTemplateAction.execute(SQLTemplateActi
    on.java:171)

            at
    org.apache.cayenne.access.jdbc.SQLTemplateAction.performAction(SQLTempla
    teAction.java:127)

            at
    org.apache.cayenne.access.DataNodeQueryAction.runQuery(DataNodeQueryActi
    on.java:58)

            at
    org.apache.cayenne.access.DataNode.performQueries(DataNode.java:230)

            at
    org.apache.cayenne.access.DataDomainQueryAction.runQuery(DataDomainQuery
    Action.java:424)

            at
    org.apache.cayenne.access.DataDomainQueryAction.access$000(DataDomainQue
    ryAction.java:68)

            at
    org.apache.cayenne.access.DataDomainQueryAction$2.transform(DataDomainQu
    eryAction.java:397)

            at
    org.apache.cayenne.access.DataDomain.runInTransaction(DataDomain.java:84
    7)

            at
    org.apache.cayenne.access.DataDomainQueryAction.runQueryInTransaction(Da
    taDomainQueryAction.java:394)

            at
    org.apache.cayenne.access.DataDomainQueryAction.execute(DataDomainQueryA
    ction.java:120)

            at
    org.apache.cayenne.access.DataDomain.onQuery(DataDomain.java:740)

            at
    org.apache.cayenne.util.ObjectContextQueryAction.runQuery(ObjectContextQ
    ueryAction.java:317)

            at
    org.apache.cayenne.util.ObjectContextQueryAction.execute(ObjectContextQu
    eryAction.java:96)

            at
    org.apache.cayenne.access.DataContext.onQuery(DataContext.java:1336)

            at
    org.apache.cayenne.access.DataContext.performQuery(DataContext.java:1325
    )

            at
    com.avoka.fcl.cayenne.CayenneTemplate.performQuery(CayenneTemplate.java:
    233)

            at
    com.avoka.fcl.dao.SubmissionDao.getParticipatedInSubmissions(SubmissionD
    ao.java:100)

            at
    com.avoka.fcl.page.admin.SubmissionsPage.onInit(SubmissionsPage.java:43)

            at net.sf.click.ClickServlet.processPage(ClickServlet.java:497)

            at
    net.sf.click.ClickServlet.handleRequest(ClickServlet.java:327)

            at net.sf.click.ClickServlet.doGet(ClickServlet.java:250)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)

            at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

            at
    weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(St
    ubSecurityHelper.java:227)

            at
    weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityH
    elper.java:125)

            at
    weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:2
    83)

            at
    weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)

     

     



    This archive was generated by hypermail 2.0.0 : Tue Jul 08 2008 - 21:20:14 EDT