Home » Eclipse Projects » Gemini » Gemini JPA Getting Started Sample App(Gemini JPA Getting Started Sample App)
Gemini JPA Getting Started Sample App [message #780514] |
Wed, 18 January 2012 12:22 |
Stijn Deroo Messages: 4 Registered: January 2012 |
Junior Member |
|
|
Hi,
I'm trying to run the sample application contained in the latest gemini jpa download (gemini-jpa-1.0.0.RELEASE.zip)
I followed the getting started guide, but only changed the jdbc driver of the sample app (org.eclipse.gemini.jpa.samples_1.0.0.RELEASE.jar) (to use an embedded driver instead):
<property name="javax.persistence.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:derby:comics;create=true"/>
Following bundles are started:
javax.persistence 2.0.3
org.apache.derby 10.5.11
org.eclipse.gemini.dbaccess.derby 1.0.0
org.eclipse.gemini.jpa 1.0.0
org.eclipse.osgi 3.7.1
org.eclipse.persistence.antlr 2.3.1
org.eclipse.persistence.asm 2.3.1
org.eclipse.persistence.core 2.3.1
org.eclipse.persistence.jpa 2.3.1
osgi.enterprise 4.2
And off course the sample application bundle (org.eclipse.gemini.jpa.samples).
When running this configuration, I get following error trace:
osgi> Gemini DBAccess Derby starting
Gemini JPA Sample started
Gemini JPA Sample stopped
!SESSION 2012-01-18 13:23:30.509 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments: -dev file:/home/stijn/workspace_jpatest/.metadata/.plugins/org.eclipse.pde.core/jpatest/dev.properties -os linux -ws gtk -arch x86 -consoleLog -console -clean
!ENTRY org.eclipse.osgi 2 0 2012-01-18 13:23:31.225
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-18 13:23:31.225
!MESSAGE Bundle org.eclipse.gemini.jpa.samples_1.2.0.RELEASE [2] was not resolved.
[EL Config]: ServerSession(17131806)--The access type for the persistent class [class model.account.Customer] is set to [FIELD].
[EL Config]: ServerSession(17131806)--The target entity (reference) class for the one to one mapping element [field account] is being defaulted to: class model.account.Account.
[EL Config]: ServerSession(17131806)--The access type for the persistent class [class model.account.Transaction] is set to [FIELD].
[EL Config]: ServerSession(17131806)--The target entity (reference) class for the many to one mapping element [field account] is being defaulted to: class model.account.Account.
[EL Config]: ServerSession(17131806)--The access type for the persistent class [class model.account.Account] is set to [FIELD].
[EL Config]: ServerSession(17131806)--The target entity (reference) class for the one to many mapping element [field txns] is being defaulted to: class model.account.Transaction.
[EL Config]: ServerSession(17131806)--The target entity (reference) class for the one to one mapping element [field customer] is being defaulted to: class model.account.Customer.
[EL Config]: ServerSession(17131806)--The alias name for the entity class [class model.account.Customer] is being defaulted to: Customer.
[EL Config]: ServerSession(17131806)--The table name for entity [class model.account.Customer] is being defaulted to: CUSTOMER.
[EL Config]: ServerSession(17131806)--The column name for element [id] is being defaulted to: ID.
[EL Config]: ServerSession(17131806)--The alias name for the entity class [class model.account.Transaction] is being defaulted to: Transaction.
[EL Config]: ServerSession(17131806)--The column name for element [id] is being defaulted to: ID.
[EL Config]: ServerSession(17131806)--The column name for element [amount] is being defaulted to: AMOUNT.
[EL Config]: ServerSession(17131806)--The column name for element [txTime] is being defaulted to: TXTIME.
[EL Config]: ServerSession(17131806)--The alias name for the entity class [class model.account.Account] is being defaulted to: Account.
[EL Config]: ServerSession(17131806)--The table name for entity [class model.account.Account] is being defaulted to: ACCOUNT.
[EL Config]: ServerSession(17131806)--The column name for element [id] is being defaulted to: ID.
[EL Config]: ServerSession(17131806)--The column name for element [balance] is being defaulted to: BALANCE.
[EL Config]: ServerSession(17131806)--The column name for element [dateCreated] is being defaulted to: DATECREATED.
[EL Config]: ServerSession(17131806)--The primary key column name for the mapping element [field account] is being defaulted to: ID.
[EL Config]: ServerSession(17131806)--The foreign key column name for the mapping element [account] is being defaulted to: ACCOUNT_ID.
[EL Config]: ServerSession(17131806)--The primary key column name for the mapping element [field account] is being defaulted to: ID.
[EL Config]: ServerSession(17131806)--The foreign key column name for the mapping element [account] is being defaulted to: ACCOUNT_ID.
Gemini JPA Sample started
[EL Config]: ServerSession(24678922)--The access type for the persistent class [class model.account.Customer] is set to [FIELD].
[EL Config]: ServerSession(24678922)--The target entity (reference) class for the one to one mapping element [field account] is being defaulted to: class model.account.Account.
[EL Config]: ServerSession(24678922)--The access type for the persistent class [class model.account.Transaction] is set to [FIELD].
[EL Config]: ServerSession(24678922)--The target entity (reference) class for the many to one mapping element [field account] is being defaulted to: class model.account.Account.
[EL Config]: ServerSession(24678922)--The access type for the persistent class [class model.account.Account] is set to [FIELD].
[EL Config]: ServerSession(24678922)--The target entity (reference) class for the one to many mapping element [field txns] is being defaulted to: class model.account.Transaction.
[EL Config]: ServerSession(24678922)--The target entity (reference) class for the one to one mapping element [field customer] is being defaulted to: class model.account.Customer.
[EL Config]: ServerSession(24678922)--The alias name for the entity class [class model.account.Customer] is being defaulted to: Customer.
[EL Config]: ServerSession(24678922)--The table name for entity [class model.account.Customer] is being defaulted to: CUSTOMER.
[EL Config]: ServerSession(24678922)--The column name for element [id] is being defaulted to: ID.
[EL Config]: ServerSession(24678922)--The alias name for the entity class [class model.account.Transaction] is being defaulted to: Transaction.
[EL Config]: ServerSession(24678922)--The column name for element [id] is being defaulted to: ID.
[EL Config]: ServerSession(24678922)--The column name for element [amount] is being defaulted to: AMOUNT.
[EL Config]: ServerSession(24678922)--The column name for element [txTime] is being defaulted to: TXTIME.
[EL Config]: ServerSession(24678922)--The alias name for the entity class [class model.account.Account] is being defaulted to: Account.
[EL Config]: ServerSession(24678922)--The table name for entity [class model.account.Account] is being defaulted to: ACCOUNT.
[EL Config]: ServerSession(24678922)--The column name for element [id] is being defaulted to: ID.
[EL Config]: ServerSession(24678922)--The column name for element [balance] is being defaulted to: BALANCE.
[EL Config]: ServerSession(24678922)--The column name for element [dateCreated] is being defaulted to: DATECREATED.
[EL Config]: ServerSession(24678922)--The primary key column name for the mapping element [field account] is being defaulted to: ID.
[EL Config]: ServerSession(24678922)--The foreign key column name for the mapping element [account] is being defaulted to: ACCOUNT_ID.
[EL Config]: ServerSession(24678922)--The primary key column name for the mapping element [field account] is being defaulted to: ID.
[EL Config]: ServerSession(24678922)--The foreign key column name for the mapping element [account] is being defaulted to: ACCOUNT_ID.
[EL Info]: ServerSession(24678922)--EclipseLink, version: Eclipse Persistence Services - 2.3.1.v20110908-r10021
[EL Config]: ServerSession(24678922)--Connection(26625789)--connecting(DatabaseLogin(
platform=>DerbyPlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
[EL Config]: ServerSession(24678922)--Connection(15860788)--Connected: jdbc:derby:comics
User: APP
Database: Apache Derby Version: 10.5.1.1 - (764942)
Driver: Apache Derby Embedded JDBC Driver Version: 10.5.1.1 - (764942)
[EL Config]: ServerSession(24678922)--Connection(15865423)--connecting(DatabaseLogin(
platform=>DerbyPlatform
user name=> ""
connector=>JNDIConnector datasource name=>null
))
[EL Config]: ServerSession(24678922)--Connection(27750143)--Connected: jdbc:derby:comics
User: APP
Database: Apache Derby Version: 10.5.1.1 - (764942)
Driver: Apache Derby Embedded JDBC Driver Version: 10.5.1.1 - (764942)
[EL Info]: ServerSession(24678922)--Accounts_nonJtaDataSource=33440105 login successful
[EL Fine]: ServerSession(24678922)--Connection(24803078)--ALTER TABLE CUSTOMER DROP CONSTRAINT CUSTOMERACCOUNT_ID
[EL Fine]: ServerSession(24678922)--Connection(11369856)--ALTER TABLE ACCT_TXN DROP CONSTRAINT ACCT_TXNACCOUNT_ID
[EL Fine]: ServerSession(24678922)--Connection(13743917)--DROP TABLE ACCOUNT
[EL Fine]: ServerSession(24678922)--Connection(6200759)--CREATE TABLE ACCOUNT (ID INTEGER NOT NULL, BALANCE FLOAT, DATECREATED DATE, PRIMARY KEY (ID))
[EL Fine]: ServerSession(24678922)--Connection(5329507)--DROP TABLE CUSTOMER
[EL Fine]: ServerSession(24678922)--Connection(12793227)--CREATE TABLE CUSTOMER (ID INTEGER NOT NULL, ADDR VARCHAR(255), FNAME VARCHAR(255), LNAME VARCHAR(255), ACCOUNT_ID INTEGER, PRIMARY KEY (ID))
[EL Fine]: ServerSession(24678922)--Connection(11800934)--DROP TABLE ACCT_TXN
[EL Fine]: ServerSession(24678922)--Connection(6546787)--CREATE TABLE ACCT_TXN (ID INTEGER NOT NULL, AMOUNT FLOAT, OP INTEGER, TXTIME TIME, ACCOUNT_ID INTEGER, PRIMARY KEY (ID))
[EL Fine]: ServerSession(24678922)--Connection(31596370)--ALTER TABLE CUSTOMER ADD CONSTRAINT CUSTOMERACCOUNT_ID FOREIGN KEY (ACCOUNT_ID) REFERENCES ACCOUNT (ID)
[EL Fine]: ServerSession(24678922)--Connection(11970262)--ALTER TABLE ACCT_TXN ADD CONSTRAINT ACCT_TXNACCOUNT_ID FOREIGN KEY (ACCOUNT_ID) REFERENCES ACCOUNT (ID)
[EL Fine]: ServerSession(24678922)--Connection(29083513)--CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(15), PRIMARY KEY (SEQ_NAME))
[EL Fine]: ServerSession(24678922)--VALUES(1)
[EL Warning]: ServerSession(24678922)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.1.v20110908-r10021): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Table/View 'SEQUENCE' already exists in Schema 'APP'.
Error Code: 30000
Call: CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(15), PRIMARY KEY (SEQ_NAME))
Query: DataModifyQuery(sql="CREATE TABLE SEQUENCE (SEQ_NAME VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(15), PRIMARY KEY (SEQ_NAME))")
[EL Fine]: ServerSession(24678922)--Connection(28681226)--DELETE FROM SEQUENCE WHERE SEQ_NAME = SEQ_GEN
[EL Fine]: ServerSession(24678922)--Connection(13261823)--SELECT * FROM SEQUENCE WHERE SEQ_NAME = SEQ_GEN
[EL Fine]: ServerSession(24678922)--Connection(28926916)--INSERT INTO SEQUENCE(SEQ_NAME, SEQ_COUNT) values (SEQ_GEN, 0)
[EL Fine]: ClientSession(6040101)--Connection(13823905)--UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + ? WHERE SEQ_NAME = ?
[EL Fine]: ClientSession(6040101)--Connection(13823905)-- bind => [50, SEQ_GEN]
[EL Fine]: ClientSession(6040101)--Connection(13823905)--SELECT SEQ_COUNT FROM SEQUENCE WHERE SEQ_NAME = ?
bind => [SEQ_GEN]
[EL Fine]: ClientSession(6040101)--Connection(21018877)--INSERT INTO ACCOUNT (ID, BALANCE, DATECREATED) VALUES (?, ?, ?)
[EL Fine]: ClientSession(6040101)--Connection(21018877)-- bind => [2, 100.0, 2012-01-18]
[EL Fine]: ClientSession(6040101)--Connection(21018877)--INSERT INTO CUSTOMER (ID, ADDR, FNAME, LNAME, ACCOUNT_ID) VALUES (?, ?, ?, ?, ?)
[EL Fine]: ClientSession(6040101)--Connection(21018877)-- bind => [1, 1034 KingFu Lane, Los Angeles, CA, Jackie, Chan, 2]
[EL Fine]: ServerSession(24678922)--Connection(10039205)--SELECT ID, BALANCE, DATECREATED FROM ACCOUNT
*** Account Report ***
Account: Account(2, Chan, Balance: $100.0)
Someone any clue?
Thanks in advance!
Stijn.
[Updated on: Wed, 18 January 2012 12:24] Report message to a moderator
|
|
| | | | | |
Re: Gemini JPA Getting Started Sample App [message #783161 is a reply to message #780567] |
Wed, 25 January 2012 07:41 |
Stijn Deroo Messages: 4 Registered: January 2012 |
Junior Member |
|
|
Hi,
I'm still struggling with the run order of the different bundles. I can 't get rid of following message:
!ENTRY org.eclipse.osgi 2 0 2012-01-25 08:27:52.097
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-25 08:27:52.097
!MESSAGE Bundle org.eclipse.gemini.jpa.samples_1.2.0.RELEASE [9] was not resolved.
Gemini JPA Sample started
My run order can be seen in the attachment.
Someone any idea why this order is not respected? When I manually start the JPA Samples bundle, the message above is not printed, and everything runs fine.
osgi> Gemini DBAccess - MySQL JDBC starting
Gemini JPA Sample started
Gemini JPA Sample stopped
!SESSION 2012-01-25 08:27:51.382 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US
Command-line arguments: -dev file:/home/stijn/workspace_jpatest (backup)/.metadata/.plugins/org.eclipse.pde.core/jpatest/dev.properties -os linux -ws gtk -arch x86 -consoleLog -console -clean
!ENTRY org.eclipse.osgi 2 0 2012-01-25 08:27:52.097
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2012-01-25 08:27:52.097
!MESSAGE Bundle org.eclipse.gemini.jpa.samples_1.2.0.RELEASE [9] was not resolved.
Gemini JPA Sample started
*** Account Report ***
Account: Account(2, Chan, Balance: $100.0)
Kind regards,
Stijn.
|
|
| | | |
Goto Forum:
Current Time: Thu Apr 25 12:13:50 GMT 2024
Powered by FUDForum. Page generated in 0.03946 seconds
|