Return-Path: Delivered-To: apmail-openjpa-users-archive@minotaur.apache.org Received: (qmail 64169 invoked from network); 20 Mar 2009 01:59:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Mar 2009 01:59:41 -0000 Received: (qmail 92979 invoked by uid 500); 20 Mar 2009 01:59:41 -0000 Delivered-To: apmail-openjpa-users-archive@openjpa.apache.org Received: (qmail 92948 invoked by uid 500); 20 Mar 2009 01:59:41 -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 Received: (qmail 92937 invoked by uid 99); 20 Mar 2009 01:59:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Mar 2009 18:59:41 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [69.49.111.76] (HELO mail176c2.megamailservers.com) (69.49.111.76) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Mar 2009 01:59:30 +0000 X-Authenticated-User: paul.copelandz.com Received: from [127.0.0.1] (ellen.pc.ashlandfiber.net [66.241.90.23] (may be forged)) (authenticated bits=0) by mail176c2.megamailservers.com (8.13.6/8.13.1) with ESMTP id n2K1x598029206 for ; Thu, 19 Mar 2009 21:59:08 -0400 Message-ID: <49C2F85E.7040404@jotobjects.com> Date: Thu, 19 Mar 2009 18:58:54 -0700 From: Paul Copeland Organization: JOT Object Technologies User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: users@openjpa.apache.org Subject: Re: Questions about classpath for OpenJPA References: <49C29DF0.2030404@jotobjects.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Thanks for the responses - Lots of good suggestions there. I had the older Java 1.5.0_05 already installed and haven't bothered to update since I plan to go to 1.6. Correct me if there is any reason why I shouldn't go to 1.6. My use case here is sort of the minimal case. Others are using an IDE or deploying on an application server where the dependencies are different. - Paul On 3/19/2009 2:11 PM, Jeremy Bauer wrote: > 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 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 >> >> >> >> > >