[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] the SQL-update statement happens while Eclipselink is looking for a record

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>ÐÐÑÐÐÐÐÐÐÐÑÐÐÐ ÑÐÐÐÐÐ ÐÐÐ ÐÐÐ
> &quot;ÐÐÐÐÐÐÐ&quot;</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
> 
> 


-----
---
http://wiki.eclipse.org/User:James.sutherland.oracle.com James Sutherland 
http://www.eclipse.org/eclipselink/
 EclipseLink ,  http://www.oracle.com/technology/products/ias/toplink/
TopLink 
Wiki:  http://wiki.eclipse.org/EclipseLink EclipseLink , 
http://wiki.oracle.com/page/TopLink TopLink 
Forums:  http://forums.oracle.com/forums/forum.jspa?forumID=48 TopLink , 
http://www.nabble.com/EclipseLink-f26430.html EclipseLink 
Book:  http://en.wikibooks.org/wiki/Java_Persistence Java Persistence 
-- 
View this message in context: http://www.nabble.com/the-SQL-update-statement-happens-while-Eclipselink-is-looking-for-a-record-tp18965374p18981343.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.