the SQL-update statement happens while Eclipselink is looking for a record

View: New views
7 Messages — Rating Filter:   Alert me  

the SQL-update statement happens while Eclipselink is looking for a record

by dmitryerkin () :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
I am trying to implement the ejb3 bean which will find the row by a primary key.
Here is my code:

package ejb3;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless(name="OebsInterfaceImpl", mappedName="ejb/OebsInterfaceImpl")
public class OebsInterfaceImpl implements OebsInterface {
       
        @PersistenceContext(name="oebsEJB")
        EntityManager em;

        public ejb3.Oebs findOebs(String rowid) {
                ejb3.Oebs oebs = (ejb3.Oebs) em.find(ejb3.Oebs.class, rowid);
                return oebs;
        }
}

The persistence provider is Eclipselink.
Why does this implementation invoke an SQL-update statement which happens after a SQL-select statement and raises an exception?

Here is the log:

[13.08.08 19:07:12:125 MSD] 0000004c SystemOut     O [EL Info]: 2008.08.13 19:07:12.125--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--default-session login successful
[13.08.08 19:07:12:125 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:12.125--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--End deploying Persistence Unit oebsEJB; state Deployed; factoryCount 1
[13.08.08 19:07:12:281 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:12.281--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--client acquired
[13.08.08 19:07:12:296 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:12.296--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--TX binding to tx mgr, status=STATUS_ACTIVE
[13.08.08 19:07:12:328 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:12.328--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Execute query ReadObjectQuery(ejb3.Oebs)
[13.08.08 19:07:12:500 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:12.500--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--reconnecting to external connection pool
[13.08.08 19:07:12:500 MSD] 0000004c SystemOut     O [EL Fine]: 2008.08.13 19:07:12.500--ServerSession(553918724)--Connection(727722848)--Thread(Thread[WebContainer : 3,5,main])--SELECT rowid, SYS_NC_ROWINFO$ FROM OEBS WHERE (rowid = ?)
        bind => [AAAO6LAAEAAAAGkAAA]
[13.08.08 19:07:17:250 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:17.250--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Register the existing object ejb3.Oebs@56ce56ce
[13.08.08 19:07:17:312 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:17.312--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--TX beforeCompletion callback, status=STATUS_ACTIVE
[13.08.08 19:07:17:312 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:17.312--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--begin unit of work commit
[13.08.08 19:07:17:437 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:17.437--ClientSession(1093026086)--Thread(Thread[WebContainer : 3,5,main])--TX beginTransaction, status=STATUS_ACTIVE
[13.08.08 19:07:17:437 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:17.437--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Execute query UpdateObjectQuery(ejb3.Oebs@2d182d18)
[13.08.08 19:07:17:468 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:17.468--ClientSession(1093026086)--Thread(Thread[WebContainer : 3,5,main])--reconnecting to external connection pool
[13.08.08 19:07:17:468 MSD] 0000004c SystemOut     O [EL Fine]: 2008.08.13 19:07:17.468--ClientSession(1093026086)--Connection(1260538658)--Thread(Thread[WebContainer : 3,5,main])--UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, <o:root xmlns:o="http://www.rosbank.ru/oebs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rosbank.ru/oebs oebs.xsd">
  <h:header xmlns:h="http://www.rosbank.ru/oebs/header" xsi:schemaLocation="http://www.rosbank.ru/oebs/header oebs_header_element.xsd">
    <h:time>2008-05-21T15:18:07.802000+00:00</h:time>
  </h:header>
  <c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element.xsd" xmlns:org="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v">
    <c:organization>
      <org:org_structure_version_id>63</org:org_structure_version_id>
      <org:organization_id>2232</org:organization_id>
      <org:organization_id_parent_hrom>3108894</org:organization_id_parent_hrom>
      <org:event_name>CREATE</org:event_name>
      <org:org_name>Биробиджанский филиал ОАО АКБ "РОСБАНК"</org:org_name>
      <org:date_from>20.04.2005</org:date_from>
      <org:organization_id_parent>2209</org:organization_id_parent>
      <org:organization_code>01.00.076.0.000.000.00.000.00</org:organization_code>
      <org:organization_type>Филиал</org:organization_type>
      <org:max_last_update_date>04.12.2007 17:28:23</org:max_last_update_date>
      <org:p_union_par>2232|ORGANIZATION|CREATE|20.04.2005|04.12.2007 17:28:23|13.02.2007 15:56:28|27.11.2006 11:21:18|14.06.2006 00:00:00|20.04.2005|</org:p_union_par>
    </c:organization>
  </c:content>
</o:root>
, oracle.sql.ROWID@5ada5ada]
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@4b224b22
[13.08.08 19:07:18:031 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC открыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_0.txt
[13.08.08 19:07:18:140 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC закрыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_0.txt
[13.08.08 19:07:18:171 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC открыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_1.txt
[13.08.08 19:07:18:265 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC закрыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_1.txt
[13.08.08 19:07:18:281 MSD] 0000004c SystemOut     O [EL Fine]: 2008.08.13 19:07:18.281--ClientSession(1093026086)--Thread(Thread[WebContainer : 3,5,main])--SELECT 1 FROM DUAL
[13.08.08 19:07:18:437 MSD] 0000004c SystemOut     O [EL Warning]: 2008.08.13 19:07:18.406--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01747: неверные спецификации для user.table.column, table.column или column

Error Code: 1747
Call: UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, oracle.xdb.XMLType@ffc0ffc, oracle.sql.ROWID@5ada5ada]
Query: UpdateObjectQuery(ejb3.Oebs@2d182d18)
[13.08.08 19:07:18:437 MSD] 0000004c SystemOut     O [EL Warning]: 2008.08.13 19:07:18.437--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01747: неверные спецификации для user.table.column, table.column или column

Error Code: 1747
Call: UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, oracle.xdb.XMLType@ffc0ffc, oracle.sql.ROWID@5ada5ada]
Query: UpdateObjectQuery(ejb3.Oebs@2d182d18)
[13.08.08 19:07:18:437 MSD] 0000004c RegisteredSyn E   WTRN0074E: Возникла исключительная ситуация в операции синхронизации before_completion: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01747: неверные спецификации для user.table.column, table.column или column

Error Code: 1747
Call: UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, oracle.xdb.XMLType@ffc0ffc, oracle.sql.ROWID@5ada5ada]



Regards
Dmitry

Re: the SQL-update statement happens while Eclipselink is looking for a record

by James Sutherland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Could you include you class including its mapping.

My guess is the special Oracle types you are using are some how confusing EclipseLink's change tracking, such that it thinks they have changed.  Actually I'm surprised you don't get an error that your not allowed to update a primary key.

dmitryerkin wrote:
Hi
I am trying to implement the ejb3 bean which will find the row by a primary key.
Here is my code:

package ejb3;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless(name="OebsInterfaceImpl", mappedName="ejb/OebsInterfaceImpl")
public class OebsInterfaceImpl implements OebsInterface {
       
        @PersistenceContext(name="oebsEJB")
        EntityManager em;

        public ejb3.Oebs findOebs(String rowid) {
                ejb3.Oebs oebs = (ejb3.Oebs) em.find(ejb3.Oebs.class, rowid);
                return oebs;
        }
}

The persistence provider is Eclipselink.
Why does this implementation invoke an SQL-update statement which happens after a SQL-select statement and raises an exception?

Here is the log:

[13.08.08 19:07:12:125 MSD] 0000004c SystemOut     O [EL Info]: 2008.08.13 19:07:12.125--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--default-session login successful
[13.08.08 19:07:12:125 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:12.125--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--End deploying Persistence Unit oebsEJB; state Deployed; factoryCount 1
[13.08.08 19:07:12:281 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:12.281--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--client acquired
[13.08.08 19:07:12:296 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:12.296--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--TX binding to tx mgr, status=STATUS_ACTIVE
[13.08.08 19:07:12:328 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:12.328--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Execute query ReadObjectQuery(ejb3.Oebs)
[13.08.08 19:07:12:500 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:12.500--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--reconnecting to external connection pool
[13.08.08 19:07:12:500 MSD] 0000004c SystemOut     O [EL Fine]: 2008.08.13 19:07:12.500--ServerSession(553918724)--Connection(727722848)--Thread(Thread[WebContainer : 3,5,main])--SELECT rowid, SYS_NC_ROWINFO$ FROM OEBS WHERE (rowid = ?)
        bind => [AAAO6LAAEAAAAGkAAA]
[13.08.08 19:07:17:250 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:17.250--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Register the existing object ejb3.Oebs@56ce56ce
[13.08.08 19:07:17:312 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:17.312--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--TX beforeCompletion callback, status=STATUS_ACTIVE
[13.08.08 19:07:17:312 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:17.312--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--begin unit of work commit
[13.08.08 19:07:17:437 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:17.437--ClientSession(1093026086)--Thread(Thread[WebContainer : 3,5,main])--TX beginTransaction, status=STATUS_ACTIVE
[13.08.08 19:07:17:437 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:17.437--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Execute query UpdateObjectQuery(ejb3.Oebs@2d182d18)
[13.08.08 19:07:17:468 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:17.468--ClientSession(1093026086)--Thread(Thread[WebContainer : 3,5,main])--reconnecting to external connection pool
[13.08.08 19:07:17:468 MSD] 0000004c SystemOut     O [EL Fine]: 2008.08.13 19:07:17.468--ClientSession(1093026086)--Connection(1260538658)--Thread(Thread[WebContainer : 3,5,main])--UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, <o:root xmlns:o="http://www.rosbank.ru/oebs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rosbank.ru/oebs oebs.xsd">
  <h:header xmlns:h="http://www.rosbank.ru/oebs/header" xsi:schemaLocation="http://www.rosbank.ru/oebs/header oebs_header_element.xsd">
    <h:time>2008-05-21T15:18:07.802000+00:00</h:time>
  </h:header>
  <c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element.xsd" xmlns:org="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v">
    <c:organization>
      <org:org_structure_version_id>63</org:org_structure_version_id>
      <org:organization_id>2232</org:organization_id>
      <org:organization_id_parent_hrom>3108894</org:organization_id_parent_hrom>
      <org:event_name>CREATE</org:event_name>
      <org:org_name>Биробиджанский филиал ОАО АКБ "РОСБАНК"</org:org_name>
      <org:date_from>20.04.2005</org:date_from>
      <org:organization_id_parent>2209</org:organization_id_parent>
      <org:organization_code>01.00.076.0.000.000.00.000.00</org:organization_code>
      <org:organization_type>Филиал</org:organization_type>
      <org:max_last_update_date>04.12.2007 17:28:23</org:max_last_update_date>
      <org:p_union_par>2232|ORGANIZATION|CREATE|20.04.2005|04.12.2007 17:28:23|13.02.2007 15:56:28|27.11.2006 11:21:18|14.06.2006 00:00:00|20.04.2005|</org:p_union_par>
    </c:organization>
  </c:content>
</o:root>
, oracle.sql.ROWID@5ada5ada]
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@4b224b22
[13.08.08 19:07:18:031 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC открыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_0.txt
[13.08.08 19:07:18:140 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC закрыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_0.txt
[13.08.08 19:07:18:171 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC открыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_1.txt
[13.08.08 19:07:18:265 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC закрыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_1.txt
[13.08.08 19:07:18:281 MSD] 0000004c SystemOut     O [EL Fine]: 2008.08.13 19:07:18.281--ClientSession(1093026086)--Thread(Thread[WebContainer : 3,5,main])--SELECT 1 FROM DUAL
[13.08.08 19:07:18:437 MSD] 0000004c SystemOut     O [EL Warning]: 2008.08.13 19:07:18.406--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01747: неверные спецификации для user.table.column, table.column или column

Error Code: 1747
Call: UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, oracle.xdb.XMLType@ffc0ffc, oracle.sql.ROWID@5ada5ada]
Query: UpdateObjectQuery(ejb3.Oebs@2d182d18)
[13.08.08 19:07:18:437 MSD] 0000004c SystemOut     O [EL Warning]: 2008.08.13 19:07:18.437--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01747: неверные спецификации для user.table.column, table.column или column

Error Code: 1747
Call: UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, oracle.xdb.XMLType@ffc0ffc, oracle.sql.ROWID@5ada5ada]
Query: UpdateObjectQuery(ejb3.Oebs@2d182d18)
[13.08.08 19:07:18:437 MSD] 0000004c RegisteredSyn E   WTRN0074E: Возникла исключительная ситуация в операции синхронизации before_completion: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01747: неверные спецификации для user.table.column, table.column или column

Error Code: 1747
Call: UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, oracle.xdb.XMLType@ffc0ffc, oracle.sql.ROWID@5ada5ada]



Regards
Dmitry

Re: the SQL-update statement happens while Eclipselink is looking for a record

by dmitryerkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi, James Sutherland
Thanks a lot for your answer
Yes, I think so. Eclipselink desides that the values of Oebs's class attributes are changed so it updates the table.
My classes are posted there:
http://www.nabble.com/Why-does-Eclipselink-not-update-the-record-which-it-retrieved--to18979947.html


Regards
Dmitry



Could you include you class including its mapping.

My guess is the special Oracle types you are using are some how confusing EclipseLink's change tracking, such that it thinks they have changed.  Actually I'm surprised you don't get an error that your not allowed to update a primary key.

dmitryerkin wrote:
Hi
I am trying to implement the ejb3 bean which will find the row by a primary key.
Here is my code:

package ejb3;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless(name="OebsInterfaceImpl", mappedName="ejb/OebsInterfaceImpl")
public class OebsInterfaceImpl implements OebsInterface {
       
        @PersistenceContext(name="oebsEJB")
        EntityManager em;

        public ejb3.Oebs findOebs(String rowid) {
                ejb3.Oebs oebs = (ejb3.Oebs) em.find(ejb3.Oebs.class, rowid);
                return oebs;
        }
}

The persistence provider is Eclipselink.
Why does this implementation invoke an SQL-update statement which happens after a SQL-select statement and raises an exception?

Here is the log:

[13.08.08 19:07:12:125 MSD] 0000004c SystemOut     O [EL Info]: 2008.08.13 19:07:12.125--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--default-session login successful
[13.08.08 19:07:12:125 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:12.125--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--End deploying Persistence Unit oebsEJB; state Deployed; factoryCount 1
[13.08.08 19:07:12:281 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:12.281--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--client acquired
[13.08.08 19:07:12:296 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:12.296--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--TX binding to tx mgr, status=STATUS_ACTIVE
[13.08.08 19:07:12:328 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:12.328--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Execute query ReadObjectQuery(ejb3.Oebs)
[13.08.08 19:07:12:500 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:12.500--ServerSession(553918724)--Thread(Thread[WebContainer : 3,5,main])--reconnecting to external connection pool
[13.08.08 19:07:12:500 MSD] 0000004c SystemOut     O [EL Fine]: 2008.08.13 19:07:12.500--ServerSession(553918724)--Connection(727722848)--Thread(Thread[WebContainer : 3,5,main])--SELECT rowid, SYS_NC_ROWINFO$ FROM OEBS WHERE (rowid = ?)
        bind => [AAAO6LAAEAAAAGkAAA]
[13.08.08 19:07:17:250 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:17.250--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Register the existing object ejb3.Oebs@56ce56ce
[13.08.08 19:07:17:312 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:17.312--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--TX beforeCompletion callback, status=STATUS_ACTIVE
[13.08.08 19:07:17:312 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:17.312--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--begin unit of work commit
[13.08.08 19:07:17:437 MSD] 0000004c SystemOut     O [EL Finer]: 2008.08.13 19:07:17.437--ClientSession(1093026086)--Thread(Thread[WebContainer : 3,5,main])--TX beginTransaction, status=STATUS_ACTIVE
[13.08.08 19:07:17:437 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:17.437--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Execute query UpdateObjectQuery(ejb3.Oebs@2d182d18)
[13.08.08 19:07:17:468 MSD] 0000004c SystemOut     O [EL Finest]: 2008.08.13 19:07:17.468--ClientSession(1093026086)--Thread(Thread[WebContainer : 3,5,main])--reconnecting to external connection pool
[13.08.08 19:07:17:468 MSD] 0000004c SystemOut     O [EL Fine]: 2008.08.13 19:07:17.468--ClientSession(1093026086)--Connection(1260538658)--Thread(Thread[WebContainer : 3,5,main])--UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, <o:root xmlns:o="http://www.rosbank.ru/oebs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.rosbank.ru/oebs oebs.xsd">
  <h:header xmlns:h="http://www.rosbank.ru/oebs/header" xsi:schemaLocation="http://www.rosbank.ru/oebs/header oebs_header_element.xsd">
    <h:time>2008-05-21T15:18:07.802000+00:00</h:time>
  </h:header>
  <c:content xmlns:c="http://www.rosbank.ru/oebs/content/organization" xsi:schemaLocation="http://www.rosbank.ru/oebs/content/organization oebs_content_organization_element.xsd" xmlns:org="http://www.ibm.com/xmlns/prod/websphere/j2ca/jdbc/appsxx_organization_v">
    <c:organization>
      <org:org_structure_version_id>63</org:org_structure_version_id>
      <org:organization_id>2232</org:organization_id>
      <org:organization_id_parent_hrom>3108894</org:organization_id_parent_hrom>
      <org:event_name>CREATE</org:event_name>
      <org:org_name>Биробиджанский филиал ОАО АКБ "РОСБАНК"</org:org_name>
      <org:date_from>20.04.2005</org:date_from>
      <org:organization_id_parent>2209</org:organization_id_parent>
      <org:organization_code>01.00.076.0.000.000.00.000.00</org:organization_code>
      <org:organization_type>Филиал</org:organization_type>
      <org:max_last_update_date>04.12.2007 17:28:23</org:max_last_update_date>
      <org:p_union_par>2232|ORGANIZATION|CREATE|20.04.2005|04.12.2007 17:28:23|13.02.2007 15:56:28|27.11.2006 11:21:18|14.06.2006 00:00:00|20.04.2005|</org:p_union_par>
    </c:organization>
  </c:content>
</o:root>
, oracle.sql.ROWID@5ada5ada]
com.ibm.ws.rsadapter.jdbc.WSJdbcConnection@4b224b22
[13.08.08 19:07:18:031 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC открыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_0.txt
[13.08.08 19:07:18:140 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC закрыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_0.txt
[13.08.08 19:07:18:171 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl open FFDC0009I: FFDC открыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_1.txt
[13.08.08 19:07:18:265 MSD] 0000004c ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC закрыла файл потока для инцидента C:\Program Files\IBM\WebSphere\ProcServer\profiles\ProcSrv01\logs\ffdc\server1_0000004c_08.08.13_19.07.18_1.txt
[13.08.08 19:07:18:281 MSD] 0000004c SystemOut     O [EL Fine]: 2008.08.13 19:07:18.281--ClientSession(1093026086)--Thread(Thread[WebContainer : 3,5,main])--SELECT 1 FROM DUAL
[13.08.08 19:07:18:437 MSD] 0000004c SystemOut     O [EL Warning]: 2008.08.13 19:07:18.406--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01747: неверные спецификации для user.table.column, table.column или column

Error Code: 1747
Call: UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, oracle.xdb.XMLType@ffc0ffc, oracle.sql.ROWID@5ada5ada]
Query: UpdateObjectQuery(ejb3.Oebs@2d182d18)
[13.08.08 19:07:18:437 MSD] 0000004c SystemOut     O [EL Warning]: 2008.08.13 19:07:18.437--UnitOfWork(399513552)--Thread(Thread[WebContainer : 3,5,main])--Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01747: неверные спецификации для user.table.column, table.column или column

Error Code: 1747
Call: UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, oracle.xdb.XMLType@ffc0ffc, oracle.sql.ROWID@5ada5ada]
Query: UpdateObjectQuery(ejb3.Oebs@2d182d18)
[13.08.08 19:07:18:437 MSD] 0000004c RegisteredSyn E   WTRN0074E: Возникла исключительная ситуация в операции синхронизации before_completion: Local Exception Stack:
Exception [EclipseLink-4002] (Eclipse Persistence Services - 1.0 (Build 1.0 - 20080707)): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-01747: неверные спецификации для user.table.column, table.column или column

Error Code: 1747
Call: UPDATE OEBS SET rowid = ?, SYS_NC_ROWINFO$ = ? WHERE (rowid = ?)
        bind => [oracle.sql.ROWID@5ada5ada, oracle.xdb.XMLType@ffc0ffc, oracle.sql.ROWID@5ada5ada]



Regards
Dmitry


Re: the SQL-update statement happens while Eclipselink is looking for a record

by Rich Livingstone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I have what seems the same problem, except that I am not using any wacky Oracle XML classes in my table, just the Oracle NUMBER class. I also tried replacing it with INTEGER and still got the same problem namely:

- everything works just fine with Toplink Essentials
- when I use Eclipselink (latest release) and do a select, I get an update triggered with a null for the NUMBER/INTEGER field value which, since it is specified as NOT NULL, causes an exception and rollback (even though I didn't update anything)

I can post the classes concerned if it would help, plus the mappings (orm.xml) I am using

Regards

Richard

James Sutherland wrote:
Could you include you class including its mapping.

My guess is the special Oracle types you are using are some how confusing EclipseLink's change tracking, such that it thinks they have changed.  Actually I'm surprised you don't get an error that your not allowed to update a primary key.

Hi

...

The persistence provider is Eclipselink.
Why does this implementation invoke an SQL-update statement which happens after a SQL-select statement and raises an exception?

...


Regards
Dmitry

Re: the SQL-update statement happens while Eclipselink is looking for a record

by James Sutherland :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Can't think of any reason this would occur.  Please include your mapping and class and what you are doing.  If it worked on Essentials it could have something to do with change tracking, try disabling weaving to see if it is the cause, "eclipselink.weaving"="false".


Rich Livingstone wrote:
Hi

I have what seems the same problem, except that I am not using any wacky Oracle XML classes in my table, just the Oracle NUMBER class. I also tried replacing it with INTEGER and still got the same problem namely:

- everything works just fine with Toplink Essentials
- when I use Eclipselink (latest release) and do a select, I get an update triggered with a null for the NUMBER/INTEGER field value which, since it is specified as NOT NULL, causes an exception and rollback (even though I didn't update anything)

I can post the classes concerned if it would help, plus the mappings (orm.xml) I am using

Regards

Richard

James Sutherland wrote:
Could you include you class including its mapping.

My guess is the special Oracle types you are using are some how confusing EclipseLink's change tracking, such that it thinks they have changed.  Actually I'm surprised you don't get an error that your not allowed to update a primary key.

Hi

...

The persistence provider is Eclipselink.
Why does this implementation invoke an SQL-update statement which happens after a SQL-select statement and raises an exception?

...


Regards
Dmitry

Re: the SQL-update statement happens while Eclipselink is looking for a record

by Rich Livingstone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi James

Well, disabling weavng does work around that problem, although according to the documentation it also stops lazy loading so wouldn't be a production-friendly solution for us at present as it will result in some images being loaded on a regular basis which would kill the performance of my application.

I can't really post our production code as it is confidential but I'd be happy to derive a minimal test case if there is any likelihood of the problem being addressed sometime before May 2009. As we are going live shortly after that it isn't much use to us in the short term unless we can do that.

Seems that there are other issues for me with EclipseLink too - in my JUnit tests a while after this I have an EntityManager.delete call on another (related) entity which works fine using Toplink Essentials but in EclipseLink generates this exception:

Exception [EclipseLink-7197] (Eclipse Persistence Services - 1.0.2 (Build 20081024)): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Null primary key encountered in unit of work clone [com.prologic.cms.database.generated.CmsCategoryMap@3724bcd].

Any idea about that one ? Again, I'm happy to try and put together a minimal test case (though not one which involves a specific test IDE like JDeveloper as I've been requested to do via Oracle Support before now - Ant and the source code should be ok ?)

Cheers (and thanks for the helpful suggestion re weaving

Richard

James Sutherland wrote:
Can't think of any reason this would occur.  Please include your mapping and class and what you are doing.  If it worked on Essentials it could have something to do with change tracking, try disabling weaving to see if it is the cause, "eclipselink.weaving"="false".

Re: the SQL-update statement happens while Eclipselink is looking for a record

by Rich Livingstone :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sorry, I meant EntityManager.remove (obv).

Would this be related to this bug, do you think ? It's lited by Tom Ware as high priority for the next release - when are you guys planning that for ?

best,

Richard

https://bugs.eclipse.org/bugs/show_bug.cgi?id=221389

James Sutherland wrote:
Can't think of any reason this would occur.  Please include your mapping and class and what you are doing.  If it worked on Essentials it could have something to do with change tracking, try disabling weaving to see if it is the cause, "eclipselink.weaving"="false".