tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laird Nelson <ljnel...@gmail.com>
Subject Re: JPA 2.0?
Date Fri, 26 Feb 2010 16:29:22 GMT
Aaaand, because of course the best way to find prior solutions or problems
is to actually write an email, I just found this:
http://n4.nabble.com/openejb-jpa-2-0-hibernate-td1055654.html

So it looks like this IS the end of the road for now.  :-(

Best,
Laird

On Fri, Feb 26, 2010 at 11:25 AM, Laird Nelson <ljnelson@gmail.com> wrote:

> Of course, after sending that message I found
> https://issues.apache.org/jira/browse/OPENEJB-1236.  For the short term,
> however, I'd be happy with any kind of hackish solution involving pom
> surgery that anyone knows of.
>
> Here's my latest (failed) attempt.  The weird <scope>compile</scope>
> elements are because this is from a POM that is used to build an
> AbstractOpenEJBTestCase from which other JUnit test cases inherit.
>
>     <dependency>
>       <groupId>org.apache.openjpa</groupId>
>       <artifactId>openjpa</artifactId>
>       <version>2.0.0-SNAPSHOT</version>
>       <scope>compile</scope>
>       <exclusions>
>         <exclusion>
>           <groupId>org.apache.geronimo.specs</groupId>
>           <artifactId>geronimo-jms_1.1_spec</artifactId>
>         </exclusion>
>         <exclusion>
>           <groupId>org.apache.geronimo.specs</groupId>
>           <artifactId>geronimo-jta_1.1_spec</artifactId>
>         </exclusion>
>       </exclusions>
>     </dependency>
>
>     <dependency>
>       <groupId>org.apache.openejb</groupId>
>       <artifactId>openejb-core</artifactId>
>       <scope>compile</scope>
>       <exclusions>
>         <exclusion>
>           <groupId>org.apache.openjpa</groupId>
>           <artifactId>openjpa</artifactId>
>         </exclusion>
>         <exclusion>
>           <groupId>org.apache.geronimo.specs</groupId>
>           <artifactId>geronimo-jpa_2.0_spec</artifactId>
>         </exclusion>
>       </exclusions>
>     </dependency>
>
> This gets me close.  I get an AbstractMethodError (instead of a previous
> NoSuchMethodError), so that tells me that I'm getting the JPA 2.0
> interfaces, but I'm still getting an OpenEJB implementation that is 1.0
> compliant:
>
> Caused by: java.lang.AbstractMethodError:
> org.apache.openejb.persistence.PersistenceUnitInfoImpl.getValidationMode()Ljavax/persistence/ValidationMode;
>     at
> org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:457)
>     at
> org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:313)
>     at
> org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:160)
>     at
> org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:64)
>     at
> org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:184)
>
> Is this the end of the road for now?
>
> Best,
> Laird
>
>
> On Fri, Feb 26, 2010 at 11:13 AM, Laird Nelson <ljnelson@gmail.com> wrote:
>
>> Hello; I'm attempting to Frankenstein my way through getting an OpenEJB
>> 3.1.3-SNAPSHOT instance up and running via LocalInitialContextFactory with a
>> JPA 2.0 provider.
>>
>> I'm doing this in Maven.
>>
>> So far, however, no matter what I attempt it seems like something,
>> somewhere, is picking up a JPA 1.0 PersistenceUnitInfo interface, so the
>> OpenJPA 2.0-SNAPSHOT distribution I'm trying to use runs into an interface
>> incompatibility (specifically, I get an error from deep in the bowels of
>> OpenJPA 2.0 telling me that javax.persistence.spi.PersistenceUnitInfo
>> doesn't have a getValidationMode() method, which it would if it were JPA
>> 2.0).
>>
>> Obviously the root of the problem is trying to get the JPA 2.0
>> javax.persistence.* interfaces and classes to show up first in the
>> classpath, so that they shadow anything that OpenEJB might be dragging along
>> with it (like, oh, say, the Java EE 5.0.x APIs, which include a 1.0 version
>> of javax.persistence).
>>
>> Anyhow, has anyone actually shoehorned in OpenJPA 2.0 as OpenEJB's JPA
>> provider?
>>
>> Thanks,
>> Laird
>>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message