Hi Joep, You're posting to the right forum. The stack indicates that there's a problem with a connection. Have you changed anything in the sample related to the database?
I just downloaded a fresh copy and I wasn't able to reproduce the problem (Oracle Java 1.6.0_24 on Linux). -mike On Mon, Apr 11, 2011 at 2:20 PM, Joep Simons <[email protected]> wrote: > Hello, > > I downloaded apache-openjpa-2.1.0 in order to try it out, starting with a > simple example. Unfortunately I cannot get the simple hellojpa example from > the examples working. I use apple snow-leopard (java 1.6.0_24) > > > I am not sure if I am posting in the right forum since I am totally new to > openjpa. On the other hand, I get the same error when trying my own 'demo' > project, so I am quite stuck right now. > > Thanks in advance > > best regards, > Joep > > hellojpa simons$ ant > Buildfile: > > /Users/simons/Downloads/apache-openjpa-2.1.0/examples/simple/hellojpa/build.xml > > pre-compile: > > compile: > [javac] > /Users/simons/Downloads/apache-openjpa-2.1.0/examples/simple/build.xml:104: > warning: 'includeantruntime' was not set, defaulting to > build.sysclasspath=last; set to false for repeatable builds > > run: > [java] Exception in thread "main" > org.apache.openjpa.persistence.PersistenceException: Already closed. > [java] at > org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:558) > [java] at > org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:456) > [java] at > > org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:160) > [java] at > > org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings(JDBCBrokerFactory.java:164) > [java] at > > org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl(JDBCBrokerFactory.java:122) > [java] at > > org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:210) > [java] at > > org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:156) > [java] at > > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:227) > [java] at > > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:154) > [java] at > > org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:60) > [java] at hellojpa.Main.main(Main.java:43) > [java] Caused by: java.sql.SQLException: Already closed. > [java] at > > org.apache.commons.dbcp.PoolableConnection.close(PoolableConnection.java:114) > [java] at > > org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.close(PoolingDataSource.java:191) > [java] at > > org.apache.openjpa.lib.jdbc.DelegatingConnection.close(DelegatingConnection.java:205) > [java] at > > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.close(LoggingConnectionDecorator.java:431) > [java] at > > org.apache.openjpa.lib.jdbc.DelegatingConnection.close(DelegatingConnection.java:205) > [java] at > > org.apache.openjpa.jdbc.schema.SchemaGenerator.closeConn(SchemaGenerator.java:1072) > [java] at > > org.apache.openjpa.jdbc.schema.SchemaGenerator.generateSchemas(SchemaGenerator.java:327) > [java] at > > org.apache.openjpa.jdbc.schema.SchemaTool.getDBSchemaGroup(SchemaTool.java:1163) > [java] at > org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:363) > [java] at > org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:340) > [java] at > org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:505) > [java] ... 10 more > > BUILD FAILED > /Users/simons/Downloads/apache-openjpa-2.1.0/examples/simple/build.xml:115: > Java returned: 1 > > Total time: 5 seconds > :hellojpa simons$ > > > -- > View this message in context: > http://openjpa.208410.n2.nabble.com/Can-t-get-hellopjpa-from-examples-working-tp6262603p6262603.html > Sent from the OpenJPA Users mailing list archive at Nabble.com. >
