Hi Paul, For Tomcat related information, you may be able to derive some information from this thread [1]. It began as a data source related issue but got into some configuration issues as well.
I've only used Tomcat 5.5 with OpenJPA. I'm not sure about Tomcat 6, but 5.5 did not come with geronimo spec api jars (or equivalents). Here are the OpenJPA bundled jars that I needed to copy into the tomcat/common/lib directory: - openjpa-1.2.0.jar - serp-1.13.1.jar - geronimo-jta_1.1_spec-1.1.jar - geronimo-jpa_3.0_spec-1.0.jar - commons-collections-3.2.jar - commons-lang-2.1.jar You'll also need to make your JDBC driver jar(s) available to your app(s). I added them to common/lib. You may also be able to bundle all these jars in your WAR, but I found it cleaner to make them common libs. You may choose to use JNDI data sources with Tomcat vs. direct configuration. Here is a an article for configuring pooled data sources with Tomcat.[2] Until you make the jump to Tomcat, here is a link for configuring pooled datasources with OpenJPA in a JSE environment using dbcp.[3] JRE 1.5.0_05 is fairly old. I'd try updating to a newer JRE. I'm currently using 1.5.0_15. Just a guess, but something may be relying on parser related updates in newer versions of the JRE. [1] http://n2.nabble.com/Using-datasource-from-tomcat-with-openjpa-tt1449575.html#a1449832 [2] http://www.onjava.com/pub/a/onjava/2006/04/19/database-connection-pooling-with-tomcat.html [3] http://webspherepersistence.blogspot.com/2009/01/jpa-connection-pooling.html hth, -Jeremy On Thu, Mar 19, 2009 at 2:33 PM, Paul Copeland <[email protected]> wrote: > I am just getting started and created a simple standalone (not in an app > server container) JPA application working with both TopLink and OpenJPA 1.2 > and tested with both MySQL and Postgres. This is with Java SE 1.5.0_05 > building with Ant (not in in an IDE). > > By trial and error I found I needed the jar files downloaded in the > apache-openjpa-1.2.0 lib directory. I also needed xercesImpl.jar. I did not > find these dependencies documented in the release notes, or in the manual, > or on the Quickstart page (http://openjpa.apache.org/quick-start.html). > > These were the necessary jars at either compile time or runtime - > > commons-collections-3.2.jar > commons-lang-2.1.jar > geronimo-jpa_3.0_spec-1.0.jar > geronimo-jta_1.1_spec-1.1.jar > openjpa-1.2.0.jar > serp-1.13.1.jar > xercesImpl.jar > > Probably I will also need commons-pool-1.3.jar or something similar for > Connection pooling. > > Presumably the geronimo jars are not needed in a Java 5 EE container. I'm > not sure why xerces is required since Java SE 1.5 has a SAX parser. I guess > all the other jars need to be deployed in the classpath in most other > contexts. > > This kind of dependency information might be usefully documented somewhere. > Every new user has to figure this stuff out. > > BTW - My target runtime environment will be Tomcat 6 + Java SE 1.6 + > OpenJPA 1.2 + Postgres 8.2.x > > Any experience or advice about what jars are required or is this already > documented somewhere? > > Thanks - Paul > > >
