Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 50391 invoked from network); 9 Sep 2010 19:25:29 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Sep 2010 19:25:29 -0000 Received: (qmail 53591 invoked by uid 500); 9 Sep 2010 19:25:29 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 53476 invoked by uid 500); 9 Sep 2010 19:25:28 -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 82709 invoked by uid 99); 9 Sep 2010 17:46:25 -0000 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=FREEMAIL_FROM,SPF_HELO_PASS,SPF_NEUTRAL,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: 216.139.236.158 is neither permitted nor denied by domain of netmaniac@libero.it) Date: Thu, 9 Sep 2010 10:45:59 -0700 (PDT) From: Diego Cattelan To: users@openjpa.apache.org Message-ID: <1284054359642-5515440.post@n2.nabble.com> Subject: Problem with database schema creation MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Please help a JPA primer - JDK 1.6.0_21 - OpenJPA 2.0.1 - FirebirdSQL 2.1.3 + Jaybird 2.1.6 I manually created a new empty database. I have only 1 entity : ----------------------------------------------------------------------------- @Entity public class ana_anagrafica implements Serializable { private static final long serialVersionUID = 1L; private Long id; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE,generator="ANA_ANAGRAFICA_GEN") public Long getId() { return id; } public void setId(Long id) { this.id = id; } } -------------------------------------------------------------------------------- on persistence.xml : but when i run the application I get the exception 1161 it.diegocattelan.ninphea-persistence TRACE [mod_BootModule_2] openjpa.jdbc.JDBC - Initial connection autoCommit: false, holdability: 2, TransactionIsolation: 2 1218 it.diegocattelan.ninphea-persistence TRACE [mod_BootModule_2] openjpa.jdbc.JDBC - [50 ms] close 9-set-2010 19.32.56 it.ninphea.boot.BootController moduleInit GRAVE: null org.apache.openjpa.persistence.ArgumentException: Could not locate the sequence with name "ANA_ANAGRAFICA_GEN". It is possible that the metadata file c ontaining the sequence has not been parsed yet. Make sure to use a persistent class whose metadata is in the same file somewhere in your application before requesting the sequence. at org.apache.openjpa.meta.MetaDataRepository.getSequenceMetaDataInternal(MetaDataRepository.java:2105) at org.apache.openjpa.meta.MetaDataRepository.getSequenceMetaData(MetaDataRepository.java:2090) at org.apache.openjpa.meta.MetaDataRepository.getSequenceMetaData(MetaDataRepository.java:2117) at org.apache.openjpa.meta.FieldMetaData.getValueSequenceMetaData(FieldMetaData.java:1052) at org.apache.openjpa.jdbc.meta.MappingTool.addSequenceComponents(MappingTool.java:623) at org.apache.openjpa.jdbc.meta.MappingTool.addSequenceComponents(MappingTool.java:597) at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:484) at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:456) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:155) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:159) at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:117) at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:212) at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154) at org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60) at it.ninphea.boot.BootController.moduleInit(BootController.java:68) 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 it.diegocattelan.services.application.modules.proxy_spi.ModuleThread.elaboraEventoDiSistema(ModuleThread.java:238) at it.diegocattelan.services.application.modules.proxy_spi.ModuleThread.elaboraEvento(ModuleThread.java:301) at it.diegocattelan.services.application.modules.proxy_spi.ModuleThread.run(ModuleThread.java:184) if I manually create the sequence the error doesn't change. Any hint ? Thank you -- View this message in context: http://openjpa.208410.n2.nabble.com/Problem-with-database-schema-creation-tp5515440p5515440.html Sent from the OpenJPA Users mailing list archive at Nabble.com.