Return-Path: X-Original-To: apmail-openjpa-users-archive@minotaur.apache.org Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C8F29C1E3 for ; Thu, 7 Jun 2012 05:52:38 +0000 (UTC) Received: (qmail 1579 invoked by uid 500); 7 Jun 2012 05:52:38 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 1516 invoked by uid 500); 7 Jun 2012 05:52:38 -0000 Mailing-List: contact users-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@openjpa.apache.org Delivered-To: mailing list users@openjpa.apache.org Delivered-To: moderator for users@openjpa.apache.org Received: (qmail 90946 invoked by uid 99); 5 Jun 2012 08:06:10 -0000 X-ASF-Spam-Status: No, hits=4.2 required=5.0 tests=HTML_MESSAGE,SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.26 is neither permitted nor denied by domain of sursini@gmail.com) Date: Tue, 5 Jun 2012 01:05:45 -0700 (PDT) From: ubiteck To: users@openjpa.apache.org Message-ID: <1338883544965-7580208.post@n2.nabble.com> Subject: PostgreSQL 9.1 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_105039_33331344.1338883545020" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_105039_33331344.1338883545020 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'm using *OpenJPA 2.1.1* with *Postgres 9.1*. My persistence.xml file contains the following parameters : =09<property name=3D"openjpa.jdbc.SynchronizeMappings" value=3D"buildSchema(SchemaAction=3Dadd,ForeignKeys=3Dtrue)" /> =09<property name=3D"openjpa.ConnectionFactoryProperties" value=3D"PrettyPrint=3Dtrue, PrettyPrintLineLength=3D200" /> =09<property name=3D"openjpa.jdbc.DBDictionary" value=3D"postgres(SearchStringEscape=3D\)"/> I got a ReportingSQLException when JPA tries to get the name of a sequence to define the identity of my entity bean. *Exception stack trace* 2012-06-04 23:09:24,038 WARN =C2=A0[JDBC] Unable to determine which sequenc= es are owned by the database. OpenJPA will consider all sequences suffixed with "_seq" as database managed. =C2=A0This may result in improper creation or r= emoval of sequences with this suffix. The original PostgreSQL driver exception is being logged for your reference. org.apache.openjpa.lib.jdbc.ReportingSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block {prepstmnt 155836080=C2=A0 SELECT pg_get_serial_sequence(?, ?)=C2=A0 [params=3D?, ?]} [code=3D0, state=3D25P02] at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnecti= onDecorator.java:281) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnecti= onDecorator.java:257) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$1000(LoggingC= onnectionDecorator.java:72) at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$Lo= ggingPreparedStatement.execute(LoggingConnectionDecorator.java:1295) at org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.execute(DelegatingP= reparedStatement.java:386) at org.apache.openjpa.jdbc.sql.PostgresDictionary.queryOwnership(PostgresDicti= onary.java:467) at org.apache.openjpa.jdbc.sql.PostgresDictionary.isOwnedSequence(PostgresDict= ionary.java:441) at org.apache.openjpa.jdbc.sql.PostgresDictionary.isSystemSequence(PostgresDic= tionary.java:409) at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSequences(SchemaGene= rator.java:960) at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSchema(SchemaGenerat= or.java:367) at org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSchemas(SchemaGenera= tor.java:300) at org.apache.openjpa.jdbc.schema.SchemaTool.getDBSchemaGroup(SchemaTool.java:= 1163) at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:363) at org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:340) at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:505) at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:456) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBr= okerFactory.java:160) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBr= okerFactory.java:164) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFa= ctory.java:122) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFac= tory.java:210) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBroke= rFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager= (EntityManagerFactoryImpl.java:227) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager= (EntityManagerFactoryImpl.java:60) at org.apache.geronimo.persistence.CMPEntityManagerTxScoped.createEntityManage= r(CMPEntityManagerTxScoped.java:77) at org.apache.geronimo.persistence.CMPEntityManagerTxScoped.getEntityManager(C= MPEntityManagerTxScoped.java:58) at org.apache.geronimo.persistence.CMPEntityManagerTxScoped.createNamedQuery(C= MPEntityManagerTxScoped.java:419) ...... Thanks in advance -- View this message in context: http://openjpa.208410.n2.nabble.com/PostgreSQ= L-9-1-tp7580208.html Sent from the OpenJPA Users mailing list archive at Nabble.com. ------=_Part_105039_33331344.1338883545020--