You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Laird Nelson <lj...@gmail.com> on 2010/02/26 17:13:47 UTC
JPA 2.0?
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
Re: JPA 2.0?
Posted by Laird Nelson <lj...@gmail.com>.
On Thu, Mar 18, 2010 at 11:48 AM, Jean-Louis MONTEIRO <
jean-louis.monteiro@atosorigin.com> wrote:
> just in case you want to get inputs.
>
Hey, this is great to hear!
Best,
Laird
Re: JPA 2.0?
Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
Hi Laird,
just in case you want to get inputs.
Jean-Louis
ljnelson wrote:
>
> 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 <lj...@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 <lj...@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
>>>
>>
>>
>
>
--
View this message in context: http://n4.nabble.com/JPA-2-0-tp1570854p1598170.html
Sent from the OpenEJB User mailing list archive at Nabble.com.
Re: JPA 2.0?
Posted by Laird Nelson <lj...@gmail.com>.
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 <lj...@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 <lj...@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
>>
>
>
Re: JPA 2.0?
Posted by Laird Nelson <lj...@gmail.com>.
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 <lj...@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
>