PrimaryKeyExists Error

From: Yan Yan Che <yysydney(at)yahoo(dot)com(dot)au>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: PrimaryKeyExists Error
Date: 2003-02-17 04:21:20
Message-ID: 20030217042120.39469.qmail@web11304.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Dear psql friends,
I am trying to replace an Oracle Db by Postgresql.
The problem is that I am using Borland Appserver
application which talks to the oracle db. After i
changed to a postgresql db, i re-imported the data
schemas in JBuilder and changed the driver to jdbc.
all are fine. but when i tried to insert into the db,
tables with a single primary key field was inserted
fine, but tables with composit primary keys reports a
"primaryKeyExists" error like this:

-- Calling
create(Stub[repository_id=RMI:au.com.cybernetics.thinkplando.ejb.ActivityRemote:000000000000
...

java.rmi.ServerException: java.rmi.ServerException:
primaryKeyExists failed; nested exception is:
java.sql.SQLException: ERROR: current transaction is
aborted, queries ignored until end of transaction
block
; nested exception is:
java.sql.SQLException: ERROR: current transaction is
aborted, queries ignored until end of transaction
block

java.sql.SQLException: ERROR: current transaction is
aborted, queries ignored until end of transaction
block

at
org.postgresql.core.QueryExecutor.execute(QueryExecutor.java:131)

at
org.postgresql.jdbc1.AbstractJdbc1Connection.ExecSQL(AbstractJdbc1Connection.java:505)

etc etc

the ejb's create method failed, but i have printed out
the primary keys valules that i was trying o insert,
and it is unique.

Does anyone have any experience like mine? is this
caused by the internal queries generated by jdbc???

Any help or comment will be much appreciated!!!

Yan Yan

http://mobile.yahoo.com.au - Yahoo! Mobile
- Exchange IMs with Messenger friends on your Telstra or Vodafone mobile phone.

Browse pgsql-jdbc by date

  From Date Subject
Next Message Barry Lind 2003-02-17 04:45:01 Re: Good performance?
Previous Message Rafal Kedziorski 2003-02-17 00:23:45 Re: Good performance?