Hi Joep,
Can you modify the build.xml file in the simple directory with this (it
should go right after the tag for <target name="run"...>. It's line 113 in
my copy.
<property name="myClasspath" refid="classpath"/>
<echo> ============================================= </echo>
<echo> javaagent: ${javaagent} </echo>
<echo> parent : ${parent} </echo>
<echo> root : ${root} </echo>
<echo> myCp : ${myClasspath} </echo>
<echo> ============================================= </echo>
The output should look something like this
run:
[echo]
===============================================================================
[echo] javaagent:
/home/mikedd/apache-openjpa-2.2.0-SNAPSHOT/openjpa-2.2.0-SNAPSHOT.jar
[echo] parent :
/home/mikedd/apache-openjpa-2.2.0-SNAPSHOT/examples/simple
[echo] root : /home/mikedd/apache-openjpa-2.2.0-SNAPSHOT
[echo] myCp :
/home/mikedd/apache-openjpa-2.2.0-SNAPSHOT/examples/simple:/home/mikedd/apache-openjpa-2.2.0-SNAPSHOT/lib/derby-10.5.3.0_1.jar:/home/mikedd/apache-openjpa-2.2.0-SNAPSHOT/openjpa-all-2.2.0-SNAPSHOT.jar
[echo]
===============================================================================
It looks like you're loading a different version. Running ant -v might also
help but there'll be a lot of data to parse through.
-mike
On Mon, Apr 18, 2011 at 1:42 PM, Joep Simons <[email protected]> wrote:
> hi,
>
> I tried it and it still gives the same error. What I find strange is that
> the 'relations' demo does work, although it looks quite the same as the
> hellojpa demo. Another thing is that it gives the build from the 2.1
> version
> in the exception description.
>
> best regards,
>
> Joep
>
> ant
> Buildfile:
>
> /Users/simons/openjpa/apache-openjpa-2.2.0-SNAPSHOT/examples/simple/hellojpa/build.xml
>
> pre-compile:
>
> compile:
> [javac]
>
> /Users/simons/openjpa/apache-openjpa-2.2.0-SNAPSHOT/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" <openjpa-2.1.0-r422266:1071316
> nonfatal general error>
> 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
>
>
> --
> View this message in context:
> http://openjpa.208410.n2.nabble.com/Can-t-get-hellopjpa-from-examples-working-tp6262603p6284708.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>