Home » Eclipse Projects » EclipseLink » Error on Test #2 JPA/DCN Example Code(Error running example code: EclipseLink/Examples/JPA/DCN)
Error on Test #2 JPA/DCN Example Code [message #906203] |
Fri, 31 August 2012 16:53  |
Eclipse User |
|
|
|
Hello. As can be seen at the very bottom of this post, the example starts to run however it fails on the second test. I believe it has to do with the earlier warnings which are indications that things are not being set up properly. I am surprised that the author did not encounter these issues as well. I tried using @IdClass in the OrderLine class to no avail. I don't think it's hurting that the tables are trying to be recreated, even though it puts out errors. I changed the log level from 'FINE' to 'WARNING' but can change it back if necessary. Has anyone seen this problem? Does anyone have any suggestions please? Thanks.
C:\Documents and Settings\schenkjd\My Documents\NetBeansProjects\jpa-dcn>ant example
Buildfile: C:\Documents and Settings\schenkjd\My Documents\NetBeansProjects\jpa-dcn\build.xml
clean:
[delete] Deleting directory C:\Documents and Settings\schenkjd\My Documents\NetBeansProjects\jpa-dcn\classes
init:
[mkdir] Created dir: C:\Documents and Settings\schenkjd\My Documents\NetBeansProjects\jpa-dcn\classes
build:
[echo] org.eclipse.persistence.example.jpa.databaseevent: C:\Documents and Settings\schenkjd\My Documents\NetBeansProjects\jpa-dcn\build.xml
[javac] C:\Documents and Settings\schenkjd\My Documents\NetBeansProjects\jpa-dcn\build.xml:24: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 4 source files to C:\Documents and Settings\schenkjd\My Documents\NetBeansProjects\jpa-dcn\classes
[copy] Copying 1 file to C:\Documents and Settings\schenkjd\My Documents\NetBeansProjects\jpa-dcn\classes\META-INF
example:
[java] [EL Warning]: metadata: 2012-08-31 16:35:07.192--ServerSession(30199356)--You have specified multiple ids for the entity class [model.OrderLine] without specifying an @IdClass. By doing this you may lose the ability to find by identity, distributed cache support etc. Note: You may however use entity manager find operations by passing a list of primary key fields. Else, you will have touse JPQL queries to read your entities. For other id options see @PrimaryKey.
[java] [EL Warning]: metadata: 2012-08-31 16:35:07.27--ServerSession(32392776)--You have specified multiple ids for the entity class [model.OrderLine] without specifying an @IdClass. By doing this you may lose the ability to find by identity, distributed cache support etc. Note: You may however use entity manager find operations by passing a list of primary key fields. Else, you will have touse JPQL queries to read your entities. For other id options see @PrimaryKey.
[java] Setting up database.
[java] [EL Warning]: metadata: 2012-08-31 16:35:07.301--ServerSession(25589390)--You have specified multiple ids for the entity class [model.OrderLine] without specifying an @IdClass. By doing this you may lose the ability to find by identity, distributed cache support etc. Note: You may however use entity manager find operations by passing a list of primary key fields. Else, you will have to use JPQL queries to read your entities. For other id options see @PrimaryKey.
[java] [EL Warning]: sql: 2012-08-31 16:35:09.52--ServerSession(25589390)--
java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
[java]
[java] Setup complete.
[java] [EL Warning]: metadata: 2012-08-31 16:36:00.661--ServerSession(28819334)--You have specified multiple ids for the entity class [model.OrderLine] without specifying an @IdClass. By doing this you may lose the ability to find by identity, distributed cache support etc. Note: You may however use entity manager find operations by passing a list of primary key fields. Else, you will have to use JPQL queries to read your entities. For other id options see @PrimaryKey.
[java] [EL Warning]: metadata: 2012-08-31 16:36:00.677--ServerSession(11147203)--You have specified multiple ids for the entity class [model.OrderLine] without specifying an @IdClass. By doing this you may lose the ability to find by identity, distributed cache support etc. Note: You may however use entity manager find operations by passing a list of primary key fields. Else, you will have to use JPQL queries to read your entities. For other id options see @PrimaryKey.
[java] [EL Warning]: 2012-08-31 16:36:01.927--ServerSession(28819334)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
[java]
[java] Error Code: 955
[java] Call: CREATE TABLE DBE_ORDER (ORDER_ID NUMBER(19) NOT NULL, DESCRIPT
ION VARCHAR2(255) NULL, TOTALCOST NUMBER(38) NULL, VERSION NUMBER(19) NULL, CUST
OMER_ID NUMBER(19) NULL, PRIMARY KEY (ORDER_ID))
[java] Query: DataModifyQuery(sql="CREATE TABLE DBE_ORDER (ORDER_ID NUMBER(
19) NOT NULL, DESCRIPTION VARCHAR2(255) NULL, TOTALCOST NUMBER(38) NULL, VERSION
NUMBER(19) NULL, CUSTOMER_ID NUMBER(19) NULL, PRIMARY KEY (ORDER_ID))")
[java] [EL Warning]: 2012-08-31 16:36:15.505--ServerSession(28819334)--Exce
ption [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652)
: org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
[java]
[java] Error Code: 955
[java] Call: CREATE TABLE DBE_ORDERLINE (LINENUMBER NUMBER(10) NOT NULL, CO
ST NUMBER(38) NULL, DESCRIPTION VARCHAR2(255) NULL, ORDER_ID NUMBER(19) NOT NULL
, PRIMARY KEY (LINENUMBER, ORDER_ID))
[java] Query: DataModifyQuery(sql="CREATE TABLE DBE_ORDERLINE (LINENUMBER N
UMBER(10) NOT NULL, COST NUMBER(38) NULL, DESCRIPTION VARCHAR2(255) NULL, ORDER_
ID NUMBER(19) NOT NULL, PRIMARY KEY (LINENUMBER, ORDER_ID))")
[java] [EL Warning]: 2012-08-31 16:36:15.63--ServerSession(28819334)--Excep
tion [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652):
org.eclipse.persistence.exceptions.DatabaseException: org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
[java]
[java] Error Code: 955
[java] Call: CREATE TABLE DBE_CUSTOMER (ID NUMBER(19) NOT NULL, NAME VARCHA
R2(255) NULL, VERSION NUMBER(19) NULL, PRIMARY KEY (ID))
[java] Query: DataModifyQuery(sql="CREATE TABLE DBE_CUSTOMER (ID NUMBER(19)
NOT NULL, NAME VARCHAR2(255) NULL, VERSION NUMBER(19) NULL, PRIMARY KEY (ID))")
[java] [EL Warning]: 2012-08-31 16:24:29.367--ServerSession(11147203)--Exce
ption [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-02275: such a referential constraint already exists in the table
[java]
[java] Error Code: 2275
[java] Call: ALTER TABLE DBE_ORDER ADD CONSTRAINT FK_DBE_ORDER_CUSTOMER_ID
FOREIGN KEY (CUSTOMER_ID) REFERENCES DBE_CUSTOMER (ID)
[java] Query: DataModifyQuery(sql="ALTER TABLE DBE_ORDER ADD CONSTRAINT FK_
DBE_ORDER_CUSTOMER_ID FOREIGN KEY (CUSTOMER_ID) REFERENCES DBE_CUSTOMER (ID)")
[java] [EL Warning]: 2012-08-31 16:24:29.539--ServerSession(11147203)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652) : org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-02275: such a referential constraint already exists in the table
[java]
[java] Error Code: 2275
[java] Call: ALTER TABLE DBE_ORDERLINE ADD CONSTRAINT FK_DBE_ORDERLINE_ORDE
R_ID FOREIGN KEY (ORDER_ID) REFERENCES DBE_ORDER (ORDER_ID)
[java] Query: DataModifyQuery(sql="ALTER TABLE DBE_ORDERLINE ADD CONSTRAINT
FK_DBE_ORDERLINE_ORDER_ID FOREIGN KEY (ORDER_ID) REFERENCES DBE_ORDER (ORDER_ID
)")
[java] [EL Warning]: 2012-08-31 16:24:29.742--ServerSession(11147203)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
[java]
[java] Error Code: 955
[java] Call: CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR2(50) NOT NULL, SEQ_COUNT NUMBER(38) NULL, PRIMARY KEY (SEQ_NAME))
[java] Query: DataModifyQuery(sql="CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR2
(50) NOT NULL, SEQ_COUNT NUMBER(38) NULL, PRIMARY KEY (SEQ_NAME))")
[java]
[java]
[java] Starting example.
[java]
[java]
[java] Selecting all customer on application #2.
[java]
[java]
[java] Inserting new customer on application #1.
[java]
[java]
[java] Selecting new customer on application #2.
[java]
[java]
[java] Customer name on application #1: Test1
[java] Customer name on application #2: Test1
[java]
[java]
[java] Updating customer name to 'Test2' on application #1.
[java]
[java]
[java] Selecting customer on application #2.
[java]
[java]
[java] Customer name on application #1: Test2
[java] Customer name on application #2: Test1
[java] java.lang.RuntimeException: Test #2 failed
[java] at example.Example.run(Example.java:116)
[java] at example.Example.main(Example.java:35)
BUILD SUCCESSFUL
Total time: 1 minute 30 seconds
|
|
| |
Re: Error on Test #2 JPA/DCN Example Code [message #908161 is a reply to message #908104] |
Tue, 04 September 2012 17:10   |
Eclipse User |
|
|
|
Thank you for the message. I did both things- increased the sleep time and changed the log level to 'FINEST'. Following is the tail- hope it is enough but not too much (see end please).
I actually did some digging myself and notice that "ORA-29970: Specified registration id does not exist" indicates that I might need to "Clear out Change Notification Registrations". I have asked my DBA if he's willing to do that. Could the connection pool have passed an incorrect regid value to the dbms_chnf procedure? Any additional thoughts and suggestions are much welcomed and appreciated.
Here's the end of the log messages:
...
in])--JavaSECMPInitializer - global instrumentation is null.
[java] [EL Finest]: jpa: 2012-09-04 16:15:12.551--ServerSession(2978880)--Thread(Thread[main,5,main])--Begin predeploying Persistence Unit order2; session
order2; state Predeployed; factoryCount 0
[java] [EL Finest]: jpa: 2012-09-04 16:15:12.567--ServerSession(2978880)--Thread(Thread[main,5,main])--End predeploying Persistence Unit order2; session order2; state Predeployed; factoryCount 1
[java] [EL Warning]: 2012-09-04 16:15:13.833--ServerSession(29326115)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: nam
e is already used by an existing object
[java]
[java] Error Code: 955
[java] Call: CREATE TABLE DBE_ORDER (ORDER_ID NUMBER(19) NOT NULL, DESCRIPT
ION VARCHAR2(255) NULL, TOTALCOST NUMBER(38) NULL, VERSION NUMBER(19) NULL, CUST
OMER_ID NUMBER(19) NULL, PRIMARY KEY (ORDER_ID))
[java] Query: DataModifyQuery(sql="CREATE TABLE DBE_ORDER (ORDER_ID NUMBER(
19) NOT NULL, DESCRIPTION VARCHAR2(255) NULL, TOTALCOST NUMBER(38) NULL, VERSION
NUMBER(19) NULL, CUSTOMER_ID NUMBER(19) NULL, PRIMARY KEY (ORDER_ID))")
[java] [EL Warning]: 2012-09-04 16:15:14.02--ServerSession(29326115)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652):
org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
[java]
[java] Error Code: 955
[java] Call: CREATE TABLE DBE_ORDERLINE (LINENUMBER NUMBER(10) NOT NULL, CO
ST NUMBER(38) NULL, DESCRIPTION VARCHAR2(255) NULL, ORDER_ID NUMBER(19) NOT NULL
, PRIMARY KEY (LINENUMBER, ORDER_ID))
[java] Query: DataModifyQuery(sql="CREATE TABLE DBE_ORDERLINE (LINENUMBER NUMBER(10) NOT NULL, COST NUMBER(38) NULL, DESCRIPTION VARCHAR2(255) NULL, ORDER_
ID NUMBER(19) NOT NULL, PRIMARY KEY (LINENUMBER, ORDER_ID))")
[java] [EL Warning]: 2012-09-04 16:15:14.27--ServerSession(29326115)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652):
org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
[java]
[java] Error Code: 955
[java] Call: CREATE TABLE DBE_CUSTOMER (ID NUMBER(19) NOT NULL, NAME VARCHA
R2(255) NULL, VERSION NUMBER(19) NULL, PRIMARY KEY (ID))
[java] Query: DataModifyQuery(sql="CREATE TABLE DBE_CUSTOMER (ID NUMBER(19)
NOT NULL, NAME VARCHAR2(255) NULL, VERSION NUMBER(19) NULL, PRIMARY KEY (ID))")
[java] [EL Warning]: 2012-09-04 16:15:14.473--ServerSession(29326115)--Exce
ption [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652)
: org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-02275: such a referential constraint already exists in the table
[java]
[java] Error Code: 2275
[java] Call: ALTER TABLE DBE_ORDER ADD CONSTRAINT FK_DBE_ORDER_CUSTOMER_ID
FOREIGN KEY (CUSTOMER_ID) REFERENCES DBE_CUSTOMER (ID)
[java] Query: DataModifyQuery(sql="ALTER TABLE DBE_ORDER ADD CONSTRAINT FK_
DBE_ORDER_CUSTOMER_ID FOREIGN KEY (CUSTOMER_ID) REFERENCES DBE_CUSTOMER (ID)")
[java] [EL Warning]: 2012-09-04 16:15:14.583--ServerSession(29326115)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-02275: suc
h a referential constraint already exists in the table
[java]
[java] Error Code: 2275
[java] Call: ALTER TABLE DBE_ORDERLINE ADD CONSTRAINT FK_DBE_ORDERLINE_ORDE
R_ID FOREIGN KEY (ORDER_ID) REFERENCES DBE_ORDER (ORDER_ID)
[java] Query: DataModifyQuery(sql="ALTER TABLE DBE_ORDERLINE ADD CONSTRAINT
FK_DBE_ORDERLINE_ORDER_ID FOREIGN KEY (ORDER_ID) REFERENCES DBE_ORDER (ORDER_ID
)")
[java] [EL Warning]: 2012-09-04 16:15:14.801--ServerSession(29326115)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652)
: org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLSyntaxErrorException: ORA-00955: name is already used by an existing object
[java]
[java] Error Code: 955
[java] Call: CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR2(50) NOT NULL, SEQ_COUNT NUMBER(38) NULL, PRIMARY KEY (SEQ_NAME))
[java] Query: DataModifyQuery(sql="CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR2
(50) NOT NULL, SEQ_COUNT NUMBER(38) NULL, PRIMARY KEY (SEQ_NAME))")
[java]
[java]
[java] Starting example.
[java]
[java]
[java] Selecting all customer on application #2.
[java] [EL Finest]: jpa: 2012-09-04 16:15:15.129--ServerSession(2978880)--Thread(Thread[main,5,main])--Begin deploying Persistence Unit order2; session order2; state Predeployed; factoryCount 1
[java] [EL Finer]: 2012-09-04 16:15:15.129--ServerSession(2978880)--Thread(
Thread[main,5,main])--Could not initialize Validation Factory. Encountered following exception: java.lang.NoClassDefFoundError: javax/validation/Validation
[java] [EL Finest]: properties: 2012-09-04 16:15:15.129--ServerSession(2978
880)--Thread(Thread[main,5,main])--property=eclipselink.logging.level; value=FINEST; translated value=FINEST
[java] [EL Finest]: properties: 2012-09-04 16:15:15.223--ServerSession(2978
880)--Thread(Thread[main,5,main])--property=eclipselink.logging.level; value=FIN
EST; translated value=FINEST
[java] [EL Finest]: properties: 2012-09-04 16:15:15.223--ServerSession(2978
880)--Thread(Thread[main,5,main])--property=javax.persistence.jdbc.user; value=f
pa_dev
[java] [EL Finest]: properties: 2012-09-04 16:15:15.223--ServerSession(2978880)--Thread(Thread[main,5,main])--property=javax.persistence.jdbc.password; value=xxxxxx
[java] [EL Finest]: properties: 2012-09-04 16:15:15.239--ServerSession(2978880)--Thread(Thread[main,5,main])--property=javax.persistence.jdbc.driver; value
=oracle.jdbc.OracleDriver
[java] [EL Finest]: properties: 2012-09-04 16:15:15.254--ServerSession(2978
880)--Thread(Thread[main,5,main])--property=javax.persistence.jdbc.url; value=jd
bc:oracle:thin:@scladb08.fuel.wec.com:1521:dev
[java] [EL Finest]: properties: 2012-09-04 16:15:15.254--ServerSession(2978
880)--Thread(Thread[main,5,main])--property=eclipselink.cache.database-event-lis
tener; value=org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNo
tificationListener
[java] [EL Info]: 2012-09-04 16:15:15.254--ServerSession(2978880)--Thread(Thread[main,5,main])--EclipseLink, version: Eclipse Persistence Services - 2.4.0.v20120608-r11652
[java] [EL Finest]: dbPlatformHelper_regExprDbPlatform: 2012-09-04 16:15:15
.864--Thread(Thread[main,5,main])--(?i)oracle.*11 (There is no English translati
on for this message.)
[java] [EL Fine]: connection: 2012-09-04 16:15:15.864--Thread(Thread[main,5,main])--Detected database platform: org.eclipse.persistence.platform.database.o
racle.Oracle11Platform
[java] [EL Config]: connection: 2012-09-04 16:15:15.895--ServerSession(2978880)--Connection(6447371)--Thread(Thread[main,5,main])--connecting(DatabaseLogin(
[java] platform=>Oracle11Platform
[java] user name=> ""
[java] datasource URL=> "jdbc:oracle:thin:@:1521:dev"
[java] ))
[java] [EL Config]: connection: 2012-09-04 16:15:16.426--ServerSession(2978880)--Connection(13709034)--Thread(Thread[main,5,main])--Connected: jdbc:oracle:thin:@:1521:dev
[java] User: FPA_DEV
[java] Database: Oracle Version: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
[java] With the Partitioning, OLAP, Data Mining and Real Application Testing options
[java] Driver: Oracle JDBC driver Version: 11.2.0.3.0
[java] [EL Finest]: connection: 2012-09-04 16:15:16.426--ServerSession(2978880)--Connection(13709034)--Thread(Thread[main,5,main])--Connection acquired from connection pool [default].
[java] [EL Finest]: connection: 2012-09-04 16:15:16.52--ServerSession(2978880)--Connection(13709034)--Thread(Thread[main,5,main])--Connection released to connection pool [default].
[java] [EL Finest]: sequencing: 2012-09-04 16:15:16.52--ServerSession(2978880)--Thread(Thread[main,5,main])--sequencing connected, state is Preallocation_Transaction_NoAccessor_State
[java] [EL Finest]: sequencing: 2012-09-04 16:15:16.52--ServerSession(2978880)--Thread(Thread[main,5,main])--sequence ORD_SEQ: preallocation size 50
[java] [EL Finest]: sequencing: 2012-09-04 16:15:16.52--ServerSession(2978880)--Thread(Thread[main,5,main])--sequence CUST_SEQ: preallocation size 50
[java] [EL Info]: connection: 2012-09-04 16:15:16.536--ServerSession(2978880)--Thread(Thread[main,5,main])--order2 login successful
[java] [EL Finest]: connection: 2012-09-04 16:15:16.536--ServerSession(2978880)--Thread(Thread[main,5,main])--Registering for database change event notification.
[java] [EL Finest]: connection: 2012-09-04 16:15:16.723--ServerSession(2978880)--Thread(Thread[main,5,main])--Registering table [DBE_CUSTOMER] for database
change event notification.
[java] [EL Finer]: metamodel: 2012-09-04 16:15:16.739--ServerSession(297888
0)--Thread(Thread[main,5,main])--Canonical Metamodel class [model.OrderLine_] not found during initialization.
[java] [EL Finer]: metamodel: 2012-09-04 16:15:16.739--ServerSession(297888
0)--Thread(Thread[main,5,main])--Canonical Metamodel class [model.Order_] not fo
und during initialization.
[java] [EL Finer]: metamodel: 2012-09-04 16:15:16.77--ServerSession(2978880
)--Thread(Thread[main,5,main])--Canonical Metamodel class [model.Customer_] not
found during initialization.
[java] [EL Finest]: jpa: 2012-09-04 16:15:16.77--ServerSession(2978880)--Th
read(Thread[main,5,main])--End deploying Persistence Unit order2; session order2
; state Deployed; factoryCount 1
[java] [EL Finer]: connection: 2012-09-04 16:15:16.77--ServerSession(297888
0)--Thread(Thread[main,5,main])--client acquired: 24615045
[java] [EL Finer]: transaction: 2012-09-04 16:15:16.77--ClientSession(24615
045)--Thread(Thread[main,5,main])--acquire unit of work: 12482247
[java] [EL Finest]: query: 2012-09-04 16:15:16.77--UnitOfWork(12482247)--Th
read(Thread[main,5,main])--Execute query ReadAllQuery(referenceClass=Customer sql="SELECT ID, NAME, VERSION, ROWID FROM DBE_CUSTOMER")
[java] [EL Finest]: connection: 2012-09-04 16:15:16.77--ServerSession(2978880)--Connection(13709034)--Thread(Thread[main,5,main])--Connection acquired from
connection pool [default].
[java] [EL Fine]: sql: 2012-09-04 16:15:16.77--ServerSession(2978880)--Connection(13709034)--Thread(Thread[main,5,main])--SELECT ID, NAME, VERSION, ROWID FROM DBE_CUSTOMER
[java] [EL Finest]: connection: 2012-09-04 16:15:17.411--ServerSession(2978
880)--Connection(13709034)--Thread(Thread[main,5,main])--Connection released to
connection pool [default].
[java]
[java]
[java] Inserting new customer on application #1.
[java]
[java]
[java] Selecting new customer on application #2.
[java] [EL Finer]: connection: 2012-09-04 16:16:57.772--ServerSession(29788
80)--Thread(Thread[main,5,main])--client acquired: 8861475
[java] [EL Finer]: transaction: 2012-09-04 16:16:57.772--ClientSession(8861
475)--Thread(Thread[main,5,main])--acquire unit of work: 20245380
[java] [EL Finest]: query: 2012-09-04 16:16:57.772--UnitOfWork(20245380)--T
hread(Thread[main,5,main])--Execute query ReadObjectQuery(referenceClass=Custome
r jpql="Select c from Customer c where c.id = 201")
[java] [EL Finest]: connection: 2012-09-04 16:16:57.772--ServerSession(2978
880)--Connection(13709034)--Thread(Thread[main,5,main])--Connection acquired from connection pool [default].
[java] [EL Fine]: sql: 2012-09-04 16:16:57.819--ServerSession(2978880)--Con
nection(13709034)--Thread(Thread[main,5,main])--SELECT ID, NAME, VERSION, ROWID
FROM DBE_CUSTOMER WHERE (ID = ?)
[java] bind => [201]
[java] [EL Finest]: connection: 2012-09-04 16:16:57.866--ServerSession(2978
880)--Connection(13709034)--Thread(Thread[main,5,main])--Connection released to
connection pool [default].
[java]
[java]
[java] Customer name on application #1: Test1
[java] Customer name on application #2: Test1
[java]
[java]
[java] Updating customer name to 'Test2' on application #1.
[java]
[java]
[java] Selecting customer on application #2.
[java] [EL Finer]: connection: 2012-09-04 16:18:37.977--ServerSession(2978880)--Thread(Thread[main,5,main])--client acquired: 11382417
[java] [EL Finer]: transaction: 2012-09-04 16:18:37.977--ClientSession(11382417)--Thread(Thread[main,5,main])--acquire unit of work: 10479694
[java] [EL Finest]: query: 2012-09-04 16:18:37.993--UnitOfWork(10479694)--Thread(Thread[main,5,main])--Execute query ReadObjectQuery(referenceClass=Custome
r jpql="Select c from Customer c where c.id = 201")
[java] [EL Finest]: transaction: 2012-09-04 16:18:37.993--UnitOfWork(10479694)--Thread(Thread[main,5,main])--Register the existing object model.Customer@4c71d2
[java]
[java]
[java] Customer name on application #1: Test2
[java] Customer name on application #2: Test1
[java] Local Exception Stack:
[java] Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.0.v20120608-r11652): org.eclipse.persistence.exceptions.DatabaseException
[java] Internal Exception: java.sql.SQLException: ORA-29970: Specified registration id does not exist
[java]
[java] Error Code: 29970
[java] at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:324)
[java] at org.eclipse.persistence.platform.database.oracle.dcn.OracleChangeNotificationListener.remove(OracleChangeNotificationListener.java:249)
[java] at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.logout(DatabaseSessionImpl.java:888)
[java] at org.eclipse.persistence.sessions.server.ServerSession.logout(ServerSession.java:748)
[java] at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.removeSessionFromGlobalSessionManager(EntityManagerSetupImpl.java:396)
[java] at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.undeploy(EntityManagerSetupImpl.java:2392)
[java] at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.close(EntityManagerFactoryDelegate.java:249)
[java] at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.close(EntityManagerFactoryImpl.java:267)
[java] at example.Example.run(Example.java:192)
[java] at example.Example.main(Example.java:35)
[java] Caused by: java.sql.SQLException: ORA-29970: Specified registration id does not exist
[java]
[java] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
[java] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:389)
[java] at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:382)
[java] at oracle.jdbc.driver.T4CTTIfun.processError(T4CTTIfun.java:600)
[java] at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
[java] at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
[java] at oracle.jdbc.driver.T4CTTIokpn.doOKPN(T4CTTIokpn.java:282)
[java] at oracle.jdbc.driver.T4CConnection.doUnregisterDatabaseChangeNotification(T4CConnection.java:4560)
[java] at oracle.jdbc.driver.T4CConnection.doUnregisterDatabaseChangeNo\tification(T4CConnection.java:4606)
[java] at oracle.jdbc.driver.PhysicalConnection.unregisterDatabaseChang
eNotification(PhysicalConnection.java:10624)
[java] at org.eclipse.persistence.platform.database.oracle.dcn.OracleCh
angeNotificationListener.remove(OracleChangeNotificationListener.java:247)
[java] ... 8 more
[java] [EL Config]: metadata: 2012-09-04 16:15:12.52--ServerSession(2978880
)--Thread(Thread[main,5,main])--The foreign key column name for the mapping elem
|
|
| | | | | | | |
Re: Error on Test #2 JPA/DCN Example Code [message #988224 is a reply to message #987693] |
Wed, 28 November 2012 17:36  |
Eclipse User |
|
|
|
SUCCESS! For the most part...
Trying the simpler example was a splendid idea. The DBChangeNotification.java example from the link (same one is on Oracle web-site) showed me that indeed things were being set up properly but that the code waited and waited for the listener to be notified of db events, which ultimately never came. After Googling and seeing something about a firewall I got to thinking about the setup on which I was running. To make a long story short, I ran the DBChangeNotification example and then subsequently the JPA/DCN example on one of our Linux machines and was immediately successful. I am however, still facing the problems discussed above when running on my PC. No matter! At least I now know where the issue is and can design my application to use the JPA DCN! I just need to work with the IT folks to let the Oracle server talk to the PC application. Thank goodness.
When I get it resolved I'll post my solution in the event it will help someone else.
|
|
|
Goto Forum:
Current Time: Wed Jul 23 15:41:18 EDT 2025
Powered by FUDForum. Page generated in 0.06128 seconds
|