Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Question regarding odd behavior of EclipseLink with Derby

Hi Tom,

Thank you for your help. Please find attached two files; one with the derby logs (derby-log.txt) and the other with the postgresql logs (postgres-log.txt). As I had mentioned before, the problem occurs when I try to persist the 'Service' object and so I have included the logs for just that. As you can see the persist operation works fine in postgresql but fails in derby.

Note: 
1. The relation between Service (maps to table called physical_endpoints) and Endpoint (maps to table logical_endpoints) is of type 'many-to-one' as specified in the orm.xml.
2. I have attached the relevant portions of my pom.xml file (pom.xml) to tell you which versions of what libraries I am using.

Thank you very much in advance.

Gopi

[EL Finest]: 2010-01-20 09:58:06.362--UnitOfWork(75518616)--Thread(Thread[main,5,main])--PERSIST operation called on: org.globus.go.jom.entity.Service@3c9076d.
[EL Finer]: 2010-01-20 09:58:06.362--UnitOfWork(75518616)--Thread(Thread[main,5,main])--begin unit of work commit
[EL Finer]: 2010-01-20 09:58:06.362--ClientSession(1529594887)--Connection(1854599344)--Thread(Thread[main,5,main])--begin transaction
[EL Finest]: 2010-01-20 09:58:06.363--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Execute query InsertObjectQuery(org.globus.go.jom.entity.Service@3c9076d)
[EL Fine]: 2010-01-20 09:58:06.363--ClientSession(1529594887)--Connection(1854599344)--Thread(Thread[main,5,main])--INSERT INTO physical_endpoints (port, description, hostname, x509_dn, alive, logical_id, xfer_service_id, user_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
	bind => [1234, hostName1_description, hostName1, hostName1_x509_dn, 1, 1, 1, 1]
[EL Finest]: 2010-01-20 09:58:06.371--ClientSession(1529594887)--Thread(Thread[main,5,main])--Execute query ValueReadQuery(sql="values IDENTITY_VAL_LOCAL()")
[EL Fine]: 2010-01-20 09:58:06.371--ClientSession(1529594887)--Connection(1854599344)--Thread(Thread[main,5,main])--values IDENTITY_VAL_LOCAL()
[EL Finest]: 2010-01-20 09:58:06.371--UnitOfWork(75518616)--Thread(Thread[main,5,main])--assign sequence to the object (1 -> org.globus.go.jom.entity.Service@3c9076d)
[EL Finer]: 2010-01-20 09:58:06.372--ClientSession(1529594887)--Connection(1854599344)--Thread(Thread[main,5,main])--commit transaction
[EL Finer]: 2010-01-20 09:58:06.372--UnitOfWork(75518616)--Thread(Thread[main,5,main])--end unit of work commit
[EL Finer]: 2010-01-20 09:58:06.373--UnitOfWork(75518616)--Thread(Thread[main,5,main])--resume unit of work
[EL Finest]: 2010-01-20 09:58:06.375--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Execute query ReportQuery(name="Endpoint.countEndpoints" referenceClass=Endpoint sql="SELECT COUNT(id) FROM logical_endpoints")
[EL Fine]: 2010-01-20 09:58:06.375--ServerSession(297900313)--Connection(1854599344)--Thread(Thread[main,5,main])--SELECT COUNT(id) FROM logical_endpoints
[EL Finest]: 2010-01-20 09:58:06.409--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Execute query ReadAllQuery(name="Endpoint.getAllEndpointsForAdmin" referenceClass=Endpoint sql="SELECT id, description, site_name, user_id FROM logical_endpoints")
[EL Fine]: 2010-01-20 09:58:06.409--ServerSession(297900313)--Connection(1854599344)--Thread(Thread[main,5,main])--SELECT id, description, site_name, user_id FROM logical_endpoints
[EL Finest]: 2010-01-20 09:58:06.414--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Register the existing object org.globus.go.jom.entity.Endpoint@6ea53502
[EL Finest]: 2010-01-20 09:58:06.414--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Register the existing object org.globus.go.jom.entity.Endpoint@203b4f0e
[EL Finest]: 2010-01-20 09:58:06.415--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Execute query ReportQuery(name="Service.countServicesAtEndpoint" referenceClass=Service sql="SELECT COUNT(t0.id) FROM physical_endpoints t0, logical_endpoints t1 WHERE ((t1.id = ?) AND (t1.id = t0.logical_id))")
[EL Fine]: 2010-01-20 09:58:06.415--ServerSession(297900313)--Connection(1854599344)--Thread(Thread[main,5,main])--SELECT COUNT(t0.id) FROM physical_endpoints t0, logical_endpoints t1 WHERE ((t1.id = ?) AND (t1.id = t0.logical_id))
	bind => [1]
[EL Finest]: 2010-01-20 09:58:06.44--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Execute query ReadAllQuery(name="Service.getServicesAtEndpoint" referenceClass=Service sql="SELECT t1.id, t1.port, t1.description, t1.hostname, t1.x509_dn, t1.alive, t1.logical_id, t1.xfer_service_id, t1.user_id FROM logical_endpoints t0, physical_endpoints t1 WHERE ((t0.id = ?) AND (t0.id = t1.logical_id))")
[EL Fine]: 2010-01-20 09:58:06.44--ServerSession(297900313)--Connection(1854599344)--Thread(Thread[main,5,main])--SELECT t1.id, t1.port, t1.description, t1.hostname, t1.x509_dn, t1.alive, t1.logical_id, t1.xfer_service_id, t1.user_id FROM logical_endpoints t0, physical_endpoints t1 WHERE ((t0.id = ?) AND (t0.id = t1.logical_id))
	bind => [1]
[EL Finest]: 2010-01-20 09:58:06.452--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Register the existing object org.globus.go.jom.entity.Service@3f363271
[EL Finest]: 2010-01-20 09:58:06.452--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Execute query ReportQuery(name="Service.countServicesAtEndpoint" referenceClass=Service sql="SELECT COUNT(t0.id) FROM physical_endpoints t0, logical_endpoints t1 WHERE ((t1.id = ?) AND (t1.id = t0.logical_id))")
[EL Fine]: 2010-01-20 09:58:06.452--ServerSession(297900313)--Connection(1854599344)--Thread(Thread[main,5,main])--SELECT COUNT(t0.id) FROM physical_endpoints t0, logical_endpoints t1 WHERE ((t1.id = ?) AND (t1.id = t0.logical_id))
	bind => [2]
[EL Finest]: 2010-01-20 09:58:06.453--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Execute query ReadAllQuery(name="Service.getServicesAtEndpoint" referenceClass=Service sql="SELECT t1.id, t1.port, t1.description, t1.hostname, t1.x509_dn, t1.alive, t1.logical_id, t1.xfer_service_id, t1.user_id FROM logical_endpoints t0, physical_endpoints t1 WHERE ((t0.id = ?) AND (t0.id = t1.logical_id))")
[EL Fine]: 2010-01-20 09:58:06.453--ServerSession(297900313)--Connection(1854599344)--Thread(Thread[main,5,main])--SELECT t1.id, t1.port, t1.description, t1.hostname, t1.x509_dn, t1.alive, t1.logical_id, t1.xfer_service_id, t1.user_id FROM logical_endpoints t0, physical_endpoints t1 WHERE ((t0.id = ?) AND (t0.id = t1.logical_id))
	bind => [2]
[EL Finer]: 2010-01-20 09:58:06.454--ClientSession(1529594887)--Connection(1854599344)--Thread(Thread[main,5,main])--begin transaction
[EL Finest]: 2010-01-20 09:58:06.454--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Execute query UpdateObjectQuery(org.globus.go.jom.entity.Endpoint@7377711)
[EL Finest]: 2010-01-20 09:58:06.455--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Execute query DataModifyQuery()
[EL Fine]: 2010-01-20 09:58:06.455--ClientSession(1529594887)--Connection(1854599344)--Thread(Thread[main,5,main])--INSERT INTO logical_endpoints_physical_endpoints (services_id, Endpoint_id) VALUES (?, ?)
	bind => [1, 1]
[EL Fine]: 2010-01-20 09:58:06.458--ClientSession(1529594887)--Thread(Thread[main,5,main])--VALUES(1)
[EL Warning]: 2010-01-20 09:58:06.461--UnitOfWork(75518616)--Thread(Thread[main,5,main])--Local Exception Stack: 
Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'LOGICAL_ENDPOINTS_PHYSICAL_ENDPOINTS' does not exist.
Error Code: 20000
Call: INSERT INTO logical_endpoints_physical_endpoints (services_id, Endpoint_id) VALUES (?, ?)
	bind => [1, 1]
Query: DataModifyQuery(sql="INSERT INTO logical_endpoints_physical_endpoints (services_id, Endpoint_id) VALUES (?, ?)")
	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:333)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:686)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:529)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeCall(AbstractSession.java:914)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:205)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:191)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelectCall(DatasourceCallQueryMechanism.java:234)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeNoSelect(DatasourceCallQueryMechanism.java:214)
	at org.eclipse.persistence.internal.queries.StatementQueryMechanism.executeNoSelect(StatementQueryMechanism.java:115)
	at org.eclipse.persistence.queries.DataModifyQuery.executeDatabaseQuery(DataModifyQuery.java:85)
	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:675)
	at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:589)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2863)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1225)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1207)
	at org.eclipse.persistence.mappings.ManyToManyMapping.insertAddedObjectEntry(ManyToManyMapping.java:614)
	at org.eclipse.persistence.mappings.ManyToManyMapping.performDataModificationEvent(ManyToManyMapping.java:817)
	at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:130)
	at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3260)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1405)
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:547)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1551)
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:360)
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:696)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.performPreQueryFlush(EJBQueryImpl.java:1182)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeUpdate(EJBQueryImpl.java:506)
	at org.globus.go.datasource.impl.test.util.GlobusOrgDataSourceImplTestUtil.dropAllTables(GlobusOrgDataSourceImplTestUtil.java:41)
	at org.globus.go.datasource.impl.test.GlobusOrgDataSourceImplTest.tearDown(GlobusOrgDataSourceImplTest.java:41)
	at org.globus.go.datasource.impl.test.EndpointDataSourceImplTest.tearDown(EndpointDataSourceImplTest.java:61)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:73)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)
	at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:220)
	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
	at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
	at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: java.sql.SQLSyntaxErrorException: Table/View 'LOGICAL_ENDPOINTS_PHYSICAL_ENDPOINTS' does not exist.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver40.newEmbedPreparedStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1397)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.prepareStatement(DatabaseAccessor.java:1346)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.prepareStatement(DatabaseCall.java:645)
	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:579)
	... 53 more
Caused by: java.sql.SQLException: Table/View 'LOGICAL_ENDPOINTS_PHYSICAL_ENDPOINTS' does not exist.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
	... 70 more
Caused by: ERROR 42X05: Table/View 'LOGICAL_ENDPOINTS_PHYSICAL_ENDPOINTS' does not exist.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.impl.sql.compile.DMLModStatementNode.verifyTargetTable(Unknown Source)
	at org.apache.derby.impl.sql.compile.InsertNode.bindStatement(Unknown Source)
	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
	... 64 more
[EL Finest]: 2010-01-20 10:09:47.127--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--PERSIST operation called on: org.globus.go.jom.entity.Service@686c9f0f.
[EL Finer]: 2010-01-20 10:09:47.127--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--begin unit of work commit
[EL Finer]: 2010-01-20 10:09:47.128--ClientSession(848516929)--Connection(1692694379)--Thread(Thread[main,5,main])--begin transaction
[EL Finest]: 2010-01-20 10:09:47.128--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Execute query InsertObjectQuery(org.globus.go.jom.entity.Service@686c9f0f)
[EL Fine]: 2010-01-20 10:09:47.128--ClientSession(848516929)--Connection(1692694379)--Thread(Thread[main,5,main])--INSERT INTO physical_endpoints (port, description, hostname, x509_dn, alive, user_id, xfer_service_id, logical_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?)
	bind => [1234, hostName1_description, hostName1, hostName1_x509_dn, 1, 1, 1, 1]
[EL Finest]: 2010-01-20 10:09:47.13--ClientSession(848516929)--Thread(Thread[main,5,main])--Execute query ValueReadQuery(sql="select lastval()")
[EL Fine]: 2010-01-20 10:09:47.13--ClientSession(848516929)--Connection(1692694379)--Thread(Thread[main,5,main])--select lastval()
[EL Finest]: 2010-01-20 10:09:47.131--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--assign sequence to the object (1 -> org.globus.go.jom.entity.Service@686c9f0f)
[EL Finer]: 2010-01-20 10:09:47.131--ClientSession(848516929)--Connection(1692694379)--Thread(Thread[main,5,main])--commit transaction
[EL Finer]: 2010-01-20 10:09:47.132--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--end unit of work commit
[EL Finer]: 2010-01-20 10:09:47.132--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--resume unit of work
[EL Finest]: 2010-01-20 10:09:47.138--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Execute query ReportQuery(name="Endpoint.countEndpoints" referenceClass=Endpoint sql="SELECT COUNT(id) FROM logical_endpoints")
[EL Fine]: 2010-01-20 10:09:47.139--ServerSession(1384698649)--Connection(1692694379)--Thread(Thread[main,5,main])--SELECT COUNT(id) FROM logical_endpoints
[EL Finest]: 2010-01-20 10:09:47.157--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Execute query ReadAllQuery(name="Endpoint.getAllEndpointsForAdmin" referenceClass=Endpoint sql="SELECT id, description, site_name, user_id FROM logical_endpoints")
[EL Fine]: 2010-01-20 10:09:47.157--ServerSession(1384698649)--Connection(1692694379)--Thread(Thread[main,5,main])--SELECT id, description, site_name, user_id FROM logical_endpoints
[EL Finest]: 2010-01-20 10:09:47.158--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Register the existing object org.globus.go.jom.entity.Endpoint@2598a35d
[EL Finest]: 2010-01-20 10:09:47.159--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Register the existing object org.globus.go.jom.entity.Endpoint@480d41f3
[EL Finest]: 2010-01-20 10:09:47.159--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Execute query ReportQuery(name="Service.countServicesAtEndpoint" referenceClass=Service sql="SELECT COUNT(t0.id) FROM physical_endpoints t0, logical_endpoints t1 WHERE ((t1.id = ?) AND (t1.id = t0.logical_id))")
[EL Fine]: 2010-01-20 10:09:47.159--ServerSession(1384698649)--Connection(1692694379)--Thread(Thread[main,5,main])--SELECT COUNT(t0.id) FROM physical_endpoints t0, logical_endpoints t1 WHERE ((t1.id = ?) AND (t1.id = t0.logical_id))
	bind => [1]
[EL Finest]: 2010-01-20 10:09:47.161--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Execute query ReadAllQuery(name="Service.getServicesAtEndpoint" referenceClass=Service sql="SELECT t1.id, t1.port, t1.description, t1.hostname, t1.x509_dn, t1.alive, t1.user_id, t1.xfer_service_id, t1.logical_id FROM logical_endpoints t0, physical_endpoints t1 WHERE ((t0.id = ?) AND (t0.id = t1.logical_id))")
[EL Fine]: 2010-01-20 10:09:47.161--ServerSession(1384698649)--Connection(1692694379)--Thread(Thread[main,5,main])--SELECT t1.id, t1.port, t1.description, t1.hostname, t1.x509_dn, t1.alive, t1.user_id, t1.xfer_service_id, t1.logical_id FROM logical_endpoints t0, physical_endpoints t1 WHERE ((t0.id = ?) AND (t0.id = t1.logical_id))
	bind => [1]
[EL Finest]: 2010-01-20 10:09:47.162--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Register the existing object org.globus.go.jom.entity.Service@74d175ff
[EL Finest]: 2010-01-20 10:09:47.162--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Execute query ReportQuery(name="Service.countServicesAtEndpoint" referenceClass=Service sql="SELECT COUNT(t0.id) FROM physical_endpoints t0, logical_endpoints t1 WHERE ((t1.id = ?) AND (t1.id = t0.logical_id))")
[EL Fine]: 2010-01-20 10:09:47.162--ServerSession(1384698649)--Connection(1692694379)--Thread(Thread[main,5,main])--SELECT COUNT(t0.id) FROM physical_endpoints t0, logical_endpoints t1 WHERE ((t1.id = ?) AND (t1.id = t0.logical_id))
	bind => [2]
[EL Finest]: 2010-01-20 10:09:47.163--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--Execute query ReadAllQuery(name="Service.getServicesAtEndpoint" referenceClass=Service sql="SELECT t1.id, t1.port, t1.description, t1.hostname, t1.x509_dn, t1.alive, t1.user_id, t1.xfer_service_id, t1.logical_id FROM logical_endpoints t0, physical_endpoints t1 WHERE ((t0.id = ?) AND (t0.id = t1.logical_id))")
[EL Fine]: 2010-01-20 10:09:47.163--ServerSession(1384698649)--Connection(1692694379)--Thread(Thread[main,5,main])--SELECT t1.id, t1.port, t1.description, t1.hostname, t1.x509_dn, t1.alive, t1.user_id, t1.xfer_service_id, t1.logical_id FROM logical_endpoints t0, physical_endpoints t1 WHERE ((t0.id = ?) AND (t0.id = t1.logical_id))
	bind => [2]
[EL Finer]: 2010-01-20 10:09:47.164--UnitOfWork(1903506870)--Thread(Thread[main,5,main])--release unit of work
[EL Finer]: 2010-01-20 10:09:47.164--ClientSession(848516929)--Thread(Thread[main,5,main])--client released

Attachment: pom.xml
Description: XML document


On Jan 20, 2010, at 7:09 AM, Tom Ware wrote:

> Hi Gopi,
> 
>  Could you turn on logging and send the logged SQL from both your Derby and PostGreSQL test cases?  (persistence unit property: eclipselink.logging.level=FINEST)
> 
>  Please also include the full stack trace from the exception in Derby.
> 
> -Tom
> 
> Gopi Kandaswamy wrote:
>> Hi all,
>> I am using EclipseLink 2.1.0 and when I run my code against a Derby database, I get the following error message. Basically this is what is happening...
>> a) I have a class called 'Service' (maps to database table called physical_endpoints) which has a many-to-one relationship to a database table called logical_endpoints. So the orm.xml for physical_endpoints looks like this...
>> <entity class="Service">
>> 	<table name="physical_endpoints" />
>> 	<attributes>
>> 	.
>> 	.
>> 	.	
>> 	<many-to-one name="endpoint">
>>       	<join-column name="logical_id" />
>> 	</many-to-one>
>>       </attributes>
>> </entity>
>> As you can see, I have specified a <join-column name="logical_id">. I have not specified a <join-table name="the_join_table_name"> because such a join table does not exist and I do not want such a table to be created automatically by JPA. But when I run my code, EclipseLink tries to insert records into the join table for the above relationship. The join table for the above relation does not exist and hence the error below. The weird thing here is that when I use PostgreSQL database instead of Derby database, the following exception does not occur. In other words, the error occurs when I use EclipseLink + Derby and not EclipseLink + PostgreSQL.
>> Does anyone have any ideas? The error below occurs when I persists (em.persist(service)) to the database.
>> Thanks
>> Gopi
>> =======Exception=========
>> Internal Exception: java.sql.SQLSyntaxErrorException: Table/View 'LOGICAL_ENDPOINTS_PHYSICAL_ENDPOINTS' does not exist.
>> Error Code: 20000
>> Call: INSERT INTO logical_endpoints_physical_endpoints (services_id, Endpoint_id) VALUES (?, ?)
>> 	bind => [1, 1]
>> Query: DataModifyQuery(sql="INSERT INTO logical_endpoints_physical_endpoints (services_id, Endpoint_id) VALUES (?, ?)")
>> =========================_______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users


Back to the top